Tim Dingman (Ben Stiller) and Nick Vanderpark (Jack Black) are best friends, neighbors and co-workers at 3M. Nick is constantly coming up with crazy ideas to get rich quick, and when he invents Vapoorize, a spray that instantly removes dog faeces, he actually succeeds. As Nick’s wealth continues to grow, so does Tim’s envy, as he had initially scoffed at the idea and squandered an opportunity to invest and become mega-rich himself. Nick is blissfully unaware of Tim’s jealousy, and his generosity only serves to make Tim more envious of him. Meanwhile, Nick’s wife Natalie (Amy Poehler) decides to run for state senate but is continually plagued by questions about her husband’s product.
After Tim’s wife Debbie (Rachel Weisz) and children temporarily leave and he is fired from 3M, Tim’s jealousy reaches new levels. In a bar he meets J-Man (Christopher Walken), a bizarre drifter, who lends a sympathetic ear and offers advice. After a drunken night out, Tim accidentally kills Nick’s beloved horse, Corkey, and buries the horse in his abandoned swimming pool.