Ok, I ran into a weird problem and know there is a simple solution, but my brain is having trouble. I have tested this both in Safari and Firefox. The problem is not happening in Safari, but only in Firefox. This leads me to believe it may just be a syntax problem or just something I am missing.
The script functions, even when the iframe first loads, but the problem is that the layout is broken as if the .js file didn’t effect the CSS properly when the iFrame loaded, however if I reload the contents of the iframe in Firefox then the layout is fixed.
Here is a picture to show what I mean… Note, these are from within the iFrame, notice the corner with the FancyBox close graphic. Also you can scroll down in the iFrame and see that the scripts are working but the CSS from the plugin is not working.
As you can see I am using the bone stock index.html page for testing when I noticed the problem. I did make some basic changes to accommodate the iFrame like updating the script locations prepending with "../" and changing the page name to media.php etc etc.
If I am forgetting something let me know. Happy to help clarify anything also.
No sorry, I just created one graphic of the two different screen shots in Firefox. The first part shows what it looks like upon the initial loading of the iFrame with FancyBox, and the bottom half is the same iFrame after simply re-loading the contents of the iFrame.