  FlashBox={_xml:"",_gallery:"",_xmlString:"",_selected:0,_actual_selected:0,_path:"/scripts/FlashBox/",xml:function(a){if(typeof(a)!="undefined"){this._xml=a}else{return this._xml}},gallery:function(a){if(typeof(a)!="undefined"){this._gallery="_"+a}else{return this._gallery}},selected:function(a){if(typeof(a)!="undefined"){this._selected=a}else{return this._selected}},actualSelected:function(a){if(typeof(a)!="undefined"){this._actual_selected=a}else{return this._actual_selected}},path:function(a){if(typeof(a)!="undefined"){this._path=a;this.importCSS()}else{return this._path}},constructor:function(){var a=["Nie zaimportowano SWFObject!","Nie zaimportowano JQuerry!"];if(typeof(swfobject)=="undefined"){throw a[0]}if(typeof(jQuery)=="undefined"){throw a[1]}var b=this;$(document).ready(function(){b.build();b.importCSS();b.resizing()})},importCSS:function(){var a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",this.path()+"FlashBox.css");document.getElementsByTagName("head")[0].appendChild(a)},build:function(){var e='<div id="contener">';var d='   <div id="fb"></div>';var c="</div>";var b='<div id="shadow"></div>';var a='<div class="clear"></div>';$("body").prepend(e+d+c+b+a)},resizing:function(){$(window).resize(this.resize)},resize:function(){var a=this.getPageSize();$("#fb").attr("width",a[2]);$("#fb").attr("height",a[3])},focus:function(){$("#fb").focus()},collectLinks:function(){if(this._xmlString!=""){this._xmlString=""}this._xmlString+="<images>";var a=this;$("img.FlashBox"+this.gallery()).each(function(){var b=$(this).attr("fbs").split("|");a._xmlString+="<image>";a._xmlString+="<source>";a._xmlString+=b[0];a._xmlString+="</source>";a._xmlString+="<title>";a._xmlString+=(typeof(b[1])=="undefined")?"":b[1];a._xmlString+="</title>";a._xmlString+="<description>";a._xmlString+=(typeof(b[2])=="undefined")?"":b[2];a._xmlString+="</description>";a._xmlString+="</image>"});this._xmlString+="</images>"},processElements:function(){var a=this;$("img[class^='FlashBox']").each(function(){$(this).css({cursor:"pointer"});$(this).click(function(){if(a.xml()==""){var b=$(this).attr("class").split("_")[1];a.gallery(b);a.collectLinks();b=(typeof(b)!="undefined")?"_"+b:"";a.selected($("img.FlashBox"+b).index(this))}a.show()})})},getPageSize:function(){var c,a;if(window.innerHeight&&window.scrollMaxY){c=window.innerWidth+window.scrollMaxX;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}var b,d;if(self.innerHeight){if(document.documentElement.clientWidth){b=document.documentElement.clientWidth}else{b=self.innerWidth}d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;d=document.body.clientHeight}}}if(a<d){pageHeight=d}else{pageHeight=a}if(c<b){pageWidth=c}else{pageWidth=b}arrayPageSize=new Array(pageWidth,pageHeight,b,d);return arrayPageSize},shadow:function(a){if(a){var b=this.getPageSize();$("#shadow").css({height:b[1]+"px"});$("#shadow").css({display:"block"})}else{$("#shadow").css({display:"none"})}},contener:function(a){if(a){$("#contener").css({display:"block"})}else{$("#contener").css({display:"none"})}},reveal:function(a){if(a){this.contener(true);this.shadow(true)}else{$("#fb").replaceWith('<div id="fb"></div>');this.contener(false);this.shadow(false)}},embedFlash:function(){var d=this.getPageSize();var c={wmode:"transparent",menu:"false",allowscriptaccess:"always",quality:"high",salign:"tl"};var a={selected:this.selected(),stageWidth:d[2],stageHeight:d[3]};if(this.xml()!=""){a.xml_url=this.xml()}else{a.xml_src=this._xmlString}var b="";swfobject.embedSWF(this.path()+"FlashBox.swf","fb",d[2],d[3],"9.0.0",this.path()+"expressinstall.swf",a,c,b)},init:function(){if(typeof(arguments[0])!="undefined"){this.xml(arguments[0])}this.processElements()},show:function(){if(typeof(arguments[0])!="undefined"){this.xml(arguments[0])}if(typeof(arguments[1])!="undefined"){this.selected(arguments[1])}this.reveal(true);this.embedFlash()}};FlashBox.constructor();