If you watch the animated hijinks on TV’s Family Guy, The Cleveland Show and American Dad, you know that Seth MacFarlane, the brainy, bawdy creator of those kickass shows, does not cater to audiences who call him juvenile, stupid, vulgar and foul-mouthed. So stop reading, MacFarlane haters. Ted is not for you. MacFarlane’s debut as a feature director hits all the sweet spots that irritate prudes. Is it dirty? Yes. Does it take full advantage of the R rating? Oh my yes. Is it funny? It’s hysterically, gut-bustingly funny. Mark Wahlberg is just terrific as John Bennett, a good-natured Boston dude who wonders if he’ll ever be responsible enough to marry his girlfriend Lori (a gorgeously feisty Mila Kunis). Finding the right job isn’t the problem. The problem is Ted, a toy bear John has been living with since childhood. Back then, he wished for a walking, talking bear who’d love him as a friend and comfort him when thunder comes. Wham! John’s wish comes true. Ted pops into life, scaring John’s parents and becoming a media celebrity. Ted goes on The Tonight Show with Johnny Carson. He smokes pot. He picks up hookers. The fickle public grows tired of him. But not John. John stays Ted’s friend. They’re “thunder buddies,” crawling into bed at the mere sound of a rumble from the sky. What worked for John as a kid doesn’t cut it with Lori. She wants John to herself. That’s the plot MacFarlane cooked up with Family Guy collaborators Alec Sulkin and Wellesley Wild. Best of all, MacFarlane does Ted’s voice in a way that sounds even more Boston than Wahlberg’s. Using the latest in motion-capture techniques, MacFarlane even does Ted’s moves. And boy can Ted move. Wahlberg played their scenes together basically staring at a stick, with the computer adding Ted later. But it works. The scene in which John tries to guess the name of the white-trash girl Ted wants to marry is time-capsule worthy. As is the “Thunder Buddies” song (“Fuck you thunder/you can suck my dick”). You get the point. I won’t spoil another joke. See Ted. MacFarlane is a fresh new voice in movies. I want to hear more.