You can clearly see that Cobie Smulders is pregnant. In November 2008 Smulders and her boyfriend Taran Killam announced that they are expecting their first child.
Alyson Hannigan makes a short appearance in the cold opening and is not seen again as it was filmed during her last weeks of pregnancy.
The punch line to the "What's the difference between peanut butter and jam" joke is in fact a very crude one. However there is a more child friendly version which is, "You can't peanut butter your finger in a car door!"
After Barney tells Lily the dirty joke Ted says,"And we didn't see Lily again for 4 weeks." In real life Alyson Hannigan wasn't on set for 4 weeks after that due to giving birth to her first child.
Ted tells Robin the story of the architect who designs a sinking library. Ted explains that the architect was either too proud or arrogant and makes the mistake of not taking the weight of the books into account, which causes the library to slowly sink into the ground year after year. This story is a common urban legend, and there has never been a library sinking due to the weight of the books in it (although there have been libraries that have sunk due to other reasons).