/* This file may be copyrighted. It has been obfuscated for brevity, not for secrecy. Check http://www.jungepartner.de/vertical.js?clear */var as;function next(){var c=as.pop();var d=c.down(".tmp");var e=c.down(".imageurl").innerHTML;var b=new Image();b.src=e;b.className="actual";b.style.display="none";c.insert(b);Event.observe(b,"load",function(k){var i=k.target;var g=i.parentNode;var f=g.getWidth();var j=g.getHeight();i.style.marginLeft=((f-i.width)/2)+"px";i.style.marginTop=((j-i.height)/2)+"px";Effect.Appear(i,{duration:0.5});if(as.length!=0){next()}})}document.observe("dom:loaded",function(){new top_slideshow($("top-slideshow"),"a.slide");as=$$("#bottom-gallery div.image > a");as.reverse();next()});var top_slideshow=Class.create({initialize:function(a,c){var d=$(a);if(d){if(!c){c="img"}this._timeout=30;this._steps=40;this._show_steps=80;this._images=d.select(c);this._current=0;this._previous=null;var b=this;setTimeout(function(){b.next()},this._timeout*this._show_steps)}},next:function(){this._previous=this._current;this._current+=1;if(this._current>this._images.length-1){this._current=0}this._step=0;var d=this._images[this._current];var c=d.down("img");if(c){this.step()}else{var a=new Image();var b=this;Event.observe(a,"load",function(e){b.onload(e)});a.src=d.down(".src").innerHTML;d.insert(a)}},onload:function(b){var e=b.target;var a=e.parentNode;var g=$("top-slideshow").getWidth();var f=$("top-slideshow").getHeight();var c=e.width;var i=e.height;var d=(g-c)/2;var j=(f-i)/2;e.style.marginLeft=d+"px";e.style.marginTop=j+"px";this.step()},onclick:function(c){var b=c.target;while(!b.hasClassName("slide")){b=b.parentNode}var a=b.down(".href").innerHTML;window.location=a},step:function(){var a=this;this._step+=1;if(this._step<=this._steps){this.set_opacity(this._current,this._step/this._steps);this.set_opacity(this._previous,1-(this._step/this._steps));setTimeout(function(){a.step()},this._timeout)}else{var a=this;setTimeout(function(){a.next()},this._timeout*this._show_steps)}},set_opacity:function(a,c){var b=this._images[a];b.style.opacity=c;b.style.filter="alpha(opacity="+c*100+")";if(c>0){b.show()}else{b.hide()}}});
