Columbia Pictures and Imagine Entertainment present a Brian Grazer, JC 23 Entertainment, Bart/Palevsky production ; produced by Brian Grazer, Jim Carrey ; story by Gerald Gaiser and Judd Apatow & Nicholas Stoller ; screenplay by Judd Apatow & Nicholas Stoller ; directed by Dean Parisot