The tricky thing about parody movies is that the jokes get old fast and they’re hit-and-miss. Walk Hard, a spoof of every musical biopic from Ray to Walk the Line, is guilty on both counts. How lucky that when the jokes do hit, they kick major ass. It helps that producer-writer Judd Apatow (Knocked Up) and writer-director Jake Kasdan (The TV Set) have a similar sense of the silly and the good taste to cast the insanely funny John C. Reilly as Dewey Cox, an Alabama boy who covers every musical style from Elvis to the Beach Boys over five decades. Reilly, who plays Dewey from age fourteen to death, is so compelling during Dewey’s Bob Dylan phase that he should be the seventh Bobby D in I’m Not There. Dewey boozes, drugs and inserts his penis into 411 women, but his true love is Darlene (cutie-patootie Jenna Fischer), a backup singer who plays hottie June Carter to his Johnny Cash. Their “Let’s Duet” is real dirty (“In my dreams you’re blowin’ me” — deep pause — “some kisses”). You get the idea. The parody tunes, written by the likes of Van Dyke Parks, Mike Viola and Marshall Crenshaw, have a ballsy bounce. Reilly, Kasdan and Apatow contributed to the Oscar-worthy title song and the immortally awful “Mama You Got to Love Your Negro Man.” All these tunes will be available on CD as Box of Cox. And there’s a classic bit involving Dewey on an LSD trip with the Beatles: Paul Rudd as John, Jack Black as Paul, Jason Schwartzman as Ringo and Justin Long as George. The primo stuff comes to the rescue just as the movie wears out its welcome. And damn those Dewey ditties for sticking in my head. I’m walking hard to my Box of Cox.