What do you do when your thriller of a movie based on one little insidious number, that isn't 13, falls flat? You have to become a gay inmate and lather yourself in some romantically dark comedy. Jim Carrey, fresh off The Number 23, has signed on to star in I Love You Phillip Morris. According to Variety, this is one in a heap of movies that Carrey is currently scheduling to wrap up before the SAG contract expires in a year. The Spotless Mind star will star as a conman who makes a number of prison escapes for the love of a cellmate.

The story is actually based on a true crime book by Steve McVicker, a Houston Chronicle crime reporter. As Variety describes it, Carrey is Steven Russell, a married dad who finds himself jailed in Texas. Unfortunately, he falls head over heels with his cellmate, who is inconveniently released before he is. This motivates Carrey's character to escape from the prison four times in pursuit of his love. But the story's quirks make things more interesting. It seems that the real Russell escaped each time on Friday the thirteenth (oh, Carrey and his superstition!), outwitting his captors each time. Once, he waved a walkie-talkie at a guard and walked right out. Another, he made a pair of scrubs with a green pen and water to walk out. With pranks like these, it seems right up Jim's alley to me.

The adaptation is coming from the guys behind Cats & Dogs, Bad Santa and The Bad News Bears -- John Requa and Glenn Ficarra. If this is anything like their Santa work, which it seems to be, this whole crazy love story should work well. Morris will also mark the pair's directorial debut, which should make things a bit more interesting. It was pitched in Cannes as a Catch Me if You Can meets Brokeback Mountain, and Luc Besson's Europacorp is about to close a financing deal for under $20 million. That's not much, but what do you really need for a prison romance?