(In theaters, July 2011) R-rated comedies often seem to live in a different universe than the rest of comedies, and one of their chief characteristic is how much irreverence they can throw at institutions and beliefs that are otherwise untouchable. Here, nothing less than the sacrosanct image of the teacher as a virtuous force is under full attack with Cameron Diaz’s unhinged portrait of a strikingly inappropriate junior-high teacher. Drugs, embezzlement, thievery, coarse language and wanton seduction are all part of her repertoire, and if nothing else, Bad Teacher provides Diaz with a plum comic opportunity. Diaz isn’t the only good actor in the mix: Lucy Punch is a revelation as the neurotic Amy Squirrel, while Jason Segel is unexpectedly sympathetic in an everyman role and Justin Timberlake takes a few risks with a dweebish performance. Too bad, then, that it’s handled so unevenly: The script doesn’t really start to click until its second half (where characters are forced to act against their nature in the hope of gaining something), and the touchy balance between portraying an offensive character entertainingly is sometimes in doubt. It’s almost, yes, as if Hollywood tried to soften the edges of an edgier kind of comedy; in the subgenre, Bad Santa will still remain a reference. Meanwhile, the end result of this film is average, although individual moments stand out as being better than their sum. Some people will be offended; the biggest problem with Bad Teacher, however, is that it doesn’t give nearly enough laughs to those who are willing to play along.