I must be honest, and confess that of the two faces of John Waters, I rather prefer the one responsible for such gleefully campy trash as Female Trouble to the one responsible for slightly naughty but essentially harmless mainstream fare like Cry-Baby. It feels to me that the less restraint he puts on bad taste, the more fun he has, and that generally shows up onscreen. Not that the director of mainstream fare like Serial Mom and Pecker could be fairly accused of restraining his bad taste.

I bring this up to explain why I was not especially looking forward to Hairspray, the director's first and only PG-rated film, which I was pleasantly shocked to find not merely it a sweet delight in and of itself, but to find it perhaps the most typically Watersesque of all his more comfortably Hollywood projects, despite two remarkable deviations from every other film in his canon.

"Typical" in the thematic sense, not in the specific sense of "this film will disgust you to your core." Indeed, Hairspray is pretty unflappably charming, the Waters film for your grandma, who will probably be only a little bit freaked out by it. It is the story of an overweight high-schooler, Tracy Turnblad (Ricki Lake; and God bless John Waters's character names, while we're in parentheses), who in 1962 joins the cast of a local Bandstand clone named The Corny Collins Show through determination and skill, quickly becomes the most popular kid on the show and indeed, the most famous teenager in Baltimore, before her well-developed sense of justice leads her to bring the fight for integration to the doors of the TV studio.

There are two discrete parts to the film, one following the other, although you don't really notice that until long after the second part has ended. It's the first part that I had in mind when I called this a typical Waters film: it is a joyful-unto-saccharine celebration of a social outcast. Kind of. Tracy, we are shown, is a bit fat; and we are told by her mother, Edna (Divine, in her final appearance with the director who made her famous) that fat people are generally lonely and friendless. But when Tracy gets out in the world and immediately shows that she can dance rings around everyone else she meets, nobody gets much of a chance to disparage her looks besides the evil racist sizeist rich bitch Amber Von Tussle (Colleen Fitzpatrick). They're too busy being in awe of her.

Despite his reputation as an audience-punishing schlockmeister, I've always thought of John Waters as being an exceptionally loving filmmaker; true, he probably doesn't have all that much concern for the viewers, but he has such a vast reservoir of affection for his characters, except for the cardboard villains! What I'm about to say is going to make me sound like a complete dick, but that affection doesn't serve Hairspray all that well. Simply put, it's a film in which the writer-director loves his leading lady so much, and is so concerned with ensuring that she has a fairy-tale happy ending in which she is accepted for who she is and not what she looks like, that he basically skips the part where she has even a whisper of adversity to overcome, except for the aforementioned rich bitch and her even bitchier mother (Debbie Harry, of Blondie, who is completely awesome).

As it turns out, that's not the story that Waters is primarily aiming to tell; so I am sympathetic to the rushed way he drags us through that storyline, even if I'm not all that happy about it. The second half of the film proves that Hairspray does not take place in some kind of mythic land of universal peace, love and understanding, and I totally fail to understand how an extra five minutes tacked onto the film's none-too-hefty running time, dedicated to an exploration of Tracy's (gently comic) suffering as an overweight girl, could possibly overwhelm the movie.

Ah, well. On to the back half of the film, where Waters springs his really big surprise on us: this is his career's single socio-political epic, in which he argues for the right of the dispossessed to enjoy the respect of the culture at large, not in the general abstract sense of "these sexual miscreants aren't weird at all!" but in the very specific sense of "institutionalized racism was a blight on the 1960s, and thanks be to the brave men and women of every color who brought it to an end." Okay, so it's not that much of a surprise - the first heavily ironic stress on "Negro Day" at the Corny Collins Show, a show whose music would not exist if not for impoverished black musicians in the American South, makes it clear that race relations will not be just a matter of flavoring - but I wasn't expecting it to become the main theme for such a huge chunk of the film's running time.

Now, Hairspray is no Malcolm X, but it's still kind of bracing to see so unmistakable a sensibility as John Waters's bent for the one and only time in his career to an explicit political statement, instead of the implicit politics that inform most of his other projects. I would like to quote Dr. Johnson, and suggest that like a dog walking on its hind legs, this is not done well, but you are surprised to see it done at all; except that would be a lie, because it is done sort of well. Tracy and the rest of the good white characters are all fundamentally decent, but not one of them is a pure saint; each must encounter the racism of their WASPy middle-class world for themselves, and realise - for themselves - that it is a corruption that must be fought tooth and nail. Perhaps because of its ultimate basis in an event that Waters personally witnessed in his youth; perhaps because his mode is primarily comic, and not dramatic; perhaps, or hell, probably because it's so off-kilter in the manner of its director, this film manages to capture the moral essence of so many more-lauded films on the Guess Who's Coming to Dinner model, without falling into the widespread trap of sticky center-left piety that leaves almost all of those films airless and artless and insulting.

I said there are two major deviations in Hairspray, and the politics angle was the more significant and important. But the one that honestly engaged me more was that this film, with its huge assemblage of almost-forgotten early-'60s dance songs, turns into an aural time capsule to challenge even American Graffiti. It's unsurprising in the extreme that Waters should be so fascinated by the pop culture of his youth (being himself a great wielder of the tools of pop culture), yet none of his films ends up feeling so much like a classically structured musical, although Cry-Baby comes closest. Little surprise that Hairspray was turned into a musical, for that's what it already was; except it lacked original songs, instead functioning as an anthropological study of the tastes of a forgotten time. No mere nostalgia, here; this is historical inquiry, tying the bubbly and anonymous teenybopper songs of the time just before the British Invasion to their historical roots in the blues and jazz and spirituals of the African-American culture which those teenyboppers were just beginning to recognize as equally human to their own. Not bad for a man whose most famous prior movie involved a transvestite eating dog feces.