Jim, Darryl and Kevin sit in the break room, debating the 76ers' chances this season. Jim talks up his favorite team as a top tier club but Kevin's got doubts. Jim accidentally bites his lip multiple times during the discussion; in an interview with him we learn it's an ongoing and painful problem.
Pam arrives in the office looking exceptionally harried. Jim's been spending a few days a week in Philadelphia with his new company, leaving Pam to fend with the two kids. Making matters worse, Pam's discovered that Cece has a lice infestation. She's exhausted after disinfecting the entire house.
In Philadelphia, Jim's excited about his upcoming business meeting. It's with Julius "Dr. J" Erving, retired 76er superstar and a personal hero of Jim's. Back at the office, Darryl's excited too: he's convinced Val to break up with him. Darryl wants to be free and clear to lead the life he wants now that he's going to be working with Jim in Philly, too.
Erin, drawing on her years in orphanages and foster homes, confirms Pam's fear: the office is filled with lice. Erin examines everyone's hair; Dwight's the only one who's not affected. He goes into rapid response mode, spraying his co-workers and announcing a full quarantine.
Dwight returns wearing a bright green hazmat suit. He announces that everyone is to leave the office for the warehouse to be deloused. The team is convinced that Meredith brought the lice into the office. Pam feels guilty knowing that she was almost surely the one who caused the problem, but she can't quite get herself to admit it to the others.
Jim takes a limo to his meeting. The driver tells him that Mr. Erving has changed the meeting location to his private basketball court. Jim is psyched beyond belief. They hang out on the court, shooting hoop and talking.
Pam can't live with her secret any more. She seeks out Meredith and finds her in the break room shaving her head with clippers. Meredith wonders if the lice migrated "from south of the border." A shocked Pam flips out, unable to tell Meredith the truth.
In the warehouse, Darryl is acting heartbroken to preserve his cover that it was Val who broke up with him. Kevin, Nellie and Phyllis notice and approach Val to tell her to take Darryl back. Val politely dismisses them.
Noticing Meredith's shaved head, Erin announces a less radical cure for the lice: coating the head with mayonnaise, suffocating the creatures in a few hours. Dwight's dubious, but Erin dispenses large tubs of mayo and everyone dutifully pairs up and begins coating each other's heads.
Pam, her hands coated in mayonnaise, answers a call from her mother on speaker phone. Pam's mom announces that Cece's school is still filled with lice. The rest of the office overhears and immediately turns furious. Meredith demands that Pam shave her head.
Pam's mortified and tries to apologize and explain. But the crowd is unsympathetic. In an interview, Meredith is secretly proud that she didn't bring lice to the office.
From inside the boss's office, Dwight announces that the team needs to leave the bullpen immediately - he's going to bomb the office with an insecticide. But Dwight drops the bomb prematurely. The ensuing gasses quickly overwhelm him and he drops to the floor.
The treatment over, the workers start to wash the mayonnaise out of their hair. Angela makes a point of splattering Oscar, while Erin and Pete seem to be enjoying their cleansing process immensely. It seems the lice incident may have stoked a romantic infatuation.
In the warehouse, Val seeks out Darryl and says she wants to give it another try; Darryl feigns excitement. In the distance Nellie, Kevin and Phyllis are celebrating their matchmaking success.
The co-workers shuffle out for the day. Pam tries to reach Jim on the phone but he's too busy playing basketball with his hero. Meredith, ready to forgive, asks Pam out for a beer. We see them next on the karaoke stage, belting out "Girls Just Want to Have Fun."