Curiouser & Curiouser - S2-E22
Trivia: All the sets in the dream sequence, particularly Nick's loft, are filled with props referencing Lewis Carroll's Alice in Wonderland books. They include white rabbits, flamingos, walruses, a squeaky-toy caterpillar - even a half-eaten piece of cake in Nick's fridge. The episode also has several background extras in Wonderland-style costumes, and numerous other references to the books, such as Nick literally falling through the looking glass at the end.
Trivia: R.D. Wingfield, author of the book "Frost" on which the series is based, hated the show.