[jQuery] finding the parent style

[jQuery] finding the parent style


I have a master-detail display with an iframe to display the detail.
The iframe URL is autonomous in that it was originally designed to be
displayed in its own page and hence it has its own style sheet.
What I would to do is automatically change the style sheet (colors
mostly) of the iframe content based on the parent.
Essentially, when the URL is requested, I want it to:
1) If its called directly (no parent), then leave the style sheet
alone.
2) If its called via an iframe (by a parent document), then change the
body background color of the iframe content to that of the parent
color.
Basically the original URL has a white background. And this other
page has a different more "Web 2.0" fancier background darker (black),
etc, and it has the option to display the URL in an iframe. So I have
this mostly black page with non-appealing non-matching white iframe
content.
Since it has to remain compatible, I only want to changes it
background when its used as "widget" in a iframe.
Anyway, I am not sure which way is better, the parent change the
iframe or the iframe changes based on its parent, if any.
Any tips?
--
HLS