jQuery render race condition question

jQuery render race condition question

Hello,

I'm struggling with a race condition and hope someone can help.

I have a lightbox (jquery tools overlay).  Inside the lightbox I have an iframe containing a page running some jquery code.  Upon page render this code does some calculations based on the dimensions of certain elements on the page.

My problem is this:  the lightbox takes a second or so to come up (effects, etc.).  The iframe load is independent from the hosting page.  The page in the iframe (the one I'm most interested in) sometimes isn't fully rendered when the $(function(){}) is called (the iframe page's dom is loaded but the hosting page's lightbox effect isn't finished yet).  This means that some or all of the elements I need to calculate have no dimensions yet.

Is there anything in jQuery I can use that will ensure that the page in the iframe is fully rendered prior to calling $(function(){}) where my calculations live?

Thanks,
Greg