Is it possible to "Wait" for an element to appear?

Is it possible to "Wait" for an element to appear?

I'm trying to style a fugly advertisement that pops in on my page.  Right now I have a standard setTimeout going, but it could take 2 seconds, or 5 seconds after document.ready triggers :/

Is there a way to somehow put an event on a div to watch for an ID to appear perhaps?

Thanks,
Steve