/*******************************************************************************
 * Class for embedding flash into the Lightbox 29.01.2009
 * *****************************************************************************
 *
 * @author Stanislav Zorjan - Stasha - [zstasa][@][yahoo].[com]
 * 
 *
 * Licensed under the Creative Commons Attribution 3.0 License
 * http://creativecommons.org/licenses/by/3.0/
 *
 * - Free for use in both personal and commercial projects
 * - Attribution requires leaving author name, author link, and the license info intact.
 */

function FlashInLightBox(){var a=this;this.url="";this.timeout=1500;this.interval=0;this.embed=function(f){if(f!=""){this.url=f;var d=document.getElementById("imageContainer");var c=document.getElementById("overlay");var h=document.getElementById("lightbox");var i=document.getElementById("bottomNavClose");c.onclick=h.onclick=i.onclick=this.close;$("hoverNav").observe("click",(function(e){e.stop()}));$("imageDataContainer").observe("click",(function(e){e.stop()}));$("imageDetails").observe("click",(function(e){e.stop()}));try{d.removeChild(document.getElementById("_$flash$_"))}catch(g){}var j=document.createElement("div");var b=document.createElement("div");j.setAttribute("id","_$flash$_");b.setAttribute("id","_$flash$__holder");b.setAttribute("style","position:absolute");j.appendChild(b);d.appendChild(j);this.a=setInterval(function(){a.embed2()},this.timeout)}};this.embed2=function(){clearInterval(this.a);var b=document.getElementById("imageContainer");var c=document.getElementById("_$flash$_");c.style.position="absolute";c.style.clear="both";c.style.top=b.offsetTop+b.offsetTop+b.firstChild.offsetTop+"px";c.style.left=b.offsetLeft+b.firstChild.offsetLeft+"px";swfobject.embedSWF(this.url,"_$flash$__holder",parseInt(b.firstChild.offsetWidth),parseInt(b.firstChild.offsetHeight),"9.0.0")};this.close=function(){document.getElementById("_$flash$_").innerHTML=""}}var flash_in_lightbox=new FlashInLightBox();

