It's a very common expression, and we used it all the time at the last place I worked. We made software products, and whenever we had to rush an extra-crappy piece of kluged software into a release, we'd try to "spin" the defects as "features." We called that "putting lipstick on a pig."

The funny thing is that I watched Palin's speech, and when she made the lipstick comment, the first thing that flashed into my mind was "lipstick on a pig!" No, not lipstick on a dog, Sarah! Lipstick on a PIG! I was amazed she even used that comment, because it immediatly brought up the lipstick-on-a-pig image for me.

I have no idea if Obama was making fun of Palin's comment of not, but it definitely is a very well-known saying for dressing up something ugly as something nice. And that is exactly what he was saying the McCain campaign was doing. So I think he had a valid reason for using the saying. (But if he WAS capping on her lipstick comment, then I think that is HILLARIOUS too! Ha ha ha ha!)