(function(){var milkbox_singleton=null;this.Milkbox=new Class({Implements:[Options,Events],options:{overlayOpacity:0.7,marginTop:50,initialWidth:250,initialHeight:250,fileboxBorderWidth:'0px',fileboxBorderColor:'#000000',fileboxPadding:'0px',resizeDuration:.5,resizeTransition:'sine:in:out',autoPlay:!1,autoPlayDelay:7,removeTitle:!0,autoSize:!0,autoSizeMaxHeight:0,centered:!1,imageOfText:'de',onXmlGalleries:function(){},onClosed:function(){},onFileReady:function(){}},initialize:function(options){if(milkbox_singleton)return milkbox_singleton;milkbox_singleton=this;this.setOptions(options);this.autoPlayBkup={autoPlayDelay:this.options.autoPlayDelay,autoPlay:this.options.autoPlay};this.fullOptionsBkup={};this.galleries=[];this.formElements=[];this.activated;this.busy=!1;this.paused=!1;this.closed=!0;this.intId;this.loadCheckerId;this.externalGalleries=[];this.singlePageLinkId=0;this.currentIndex;this.currentGallery;this.fileReady;this.loadedImages=[];this.currentFile;this.options_bkup;this.display;this.getPageGalleries();if(this.galleries.length!=0){this.prepare(!0)}},prepare:function(checkForm){if(checkForm){this.checkFormElements()} this.prepareHTML();this.prepareEventListeners();this.activated=!0},open:function(gallery,index){var i;if(!this.activated){this.prepare(!0)} var g=(instanceOf(gallery,MilkboxGallery))?gallery:this.getGallery(gallery);if(!g)return!1;if(typeOf(index)!=='number'){i=g.get_index_of(index);if(i!==-1){index=i}} i=parseInt(index,10);if(isNaN(i)){i=0} this.closed=!1;var item=g.get_item(i);if(!item)return!1;this.currentGallery=g;this.currentIndex=i;this.hideFormElements();this.display.set_mode(this.currentGallery.type);this.display.appear();if(this.options.autoPlay||g.options.autoplay){this.startAutoPlay(!0)} this.loadFile(item,this.getPreloads());return!0},close:function(hideDisplay){if(hideDisplay){this.display.disappear()} this.showFormElements();this.pauseAutoPlay();this.stopLoadingCheck();this.currentGallery=null;this.currentIndex=null;this.currentFile=null;this.busy=!1;this.paused=!1;this.fileReady=!1;this.closed=!0;this.fireEvent('close')},startAutoPlay:function(opening){var d=this.currentGallery.options.autoplay_delay||this.options.autoPlayDelay;if(d5){if(this.loadCheckerId){this.display.show_loader()} this.stopLoadingCheck()}}).periodical(100,this)}},stopLoadingCheck:function(){clearInterval(this.loadCheckerId)},preloadFiles:function(preloads){preloads.each(function(fileObj,index){if(!this.checkFileType(fileObj,"swf")&&!this.checkFileType(fileObj,"html")&&!this.checkFileType(fileObj,"php")){this.preloadImage(fileObj.href)}},this)},preloadImage:function(file){if(!this.loadedImages.contains(file)){var imageAsset=new Asset.image(file,{onLoad:function(){this.loadedImages.push(file)}.bind(this)})}},loadImage:function(fileObj){var file=fileObj.href;var imageAsset=new Asset.image(file,{onLoad:function(img){if(!this.loadedImages.contains(file)){this.loadedImages.push(file)};this.loadComplete(img,fileObj.caption)}.bind(this)})},loadSwf:function(fileObj){var swfObj=new Swiff(fileObj.href,{width:fileObj.size.width,height:fileObj.size.height,vars:fileObj.vars,params:{wMode:'opaque',swLiveConnect:'false'}});this.loadComplete($(swfObj),fileObj.caption)},loadHtml:function(fileObj){var query=(fileObj.vars?'?'+Object.toQueryString(fileObj.vars):'');ie7=new RegExp(/MSIE 7/);ie8=new RegExp(/MSIE 8/);if(ie7.test(navigator.userAgent)||ie8.test(navigator.userAgent)){var ifr=document.createElement("