For the right javascript this is a expert, this can be done in minutes.
The javascript that needs to be built is an if-statement, that will test if an image at a given location has a width of 1px.
IF the picture has a width of 1px, the javascript will open the a styled CSS popup, like shadowbox or fancybox (only requirement is the CSS popup can play flash from an iframe).
ELSE a standard HTML code should be written to the html document.
The standard code and picture locations etc will be provided.
It is NOT possible to modify the header of the document.
Do NOT bid on this project, if you are not a javascript expert, and if you can NOT start today. Copy-paste bids will be ignored.
This project has to finish today - so escrow will not be an option, as we don't want money getting stuck, in case chosen programmer does not have the skill to finish.
Communication via e-mail.