document.write('<style type="text/css" media="screen">.dhonishow {display: none;}</style>');var Dhonishow=Class.create();Dhonishow.prototype={initialize:function(){this.parentDiv=arguments[0];this.options={effect:"appear",parallel:true,duration:0.6,navigationTop:false,hide:{paging:false,alt:false,navigation:false},target:"self",pagingTemplate:new Template("#{current} of #{allpages}")};this.setOptions();this.setDependences();return this},setOptions:function(){var a=this.parentDiv.className.match(/(\w+)_(\w+)/g)||[];a.each(function(b){var b=/(\w+)_(\w+)/.exec(b);var c=b[2];(/dot/).test(c)?c=new Number(c.replace(/dot/,".")):c;b[1]=="hide"?this.options.hide[c]=true:this.options[b[1]]=c}.bind(this));this.options.queue={position:"end",scope:this.parentDiv.id};this.elements={}},setDependences:function(){this.dhonishowCurrentElement=0;this.buildDom();this.updateNavigation();this.parentDiv.style.display="block";this.giveParent(this.dhonishowElements[0]).show();this.addObservers();this.updateNavigation();if(this.options.autoplay){this.handleAutoplay()}},buildDom:function(){this.buildUl=function(){var a=document.createElement("ul");new Element.addClassName(a,"dhonishow-image");this.dhonishowElements=[];$A(this.parentDiv.childNodes).each(function(d){if(d.nodeType!=3){var b=document.createElement("li");b.style.display="none";if(d.getAttribute("rel")){var c=document.createElement("a");c.href=d.getAttribute("rel");d.removeAttribute("rel");c.target="_"+this.options.target;c.appendChild(d)}else{var c=d}b.appendChild(c);a.appendChild(b);this.dhonishowElements.push(d)}}.bind(this));return a};this.buildNavigation=function(){var d=document.createElement("div");new Element.addClassName(d,"dhonishow-navi");var e=document.createElement("p");new Element.addClassName(e,"dhonishow-picture-alt");this.elements.alt=e;d.appendChild(e);var b=document.createElement("a");new Element.addClassName(b,"dhonishow-next-picture");b.setAttribute("title","Next");d.appendChild(b);b.update("Next");this.elements.next_button=b;var c=document.createElement("p");new Element.addClassName(c,"paging");d.appendChild(c);this.elements.paging=c;var a=document.createElement("a");new Element.addClassName(a,"dhonishow-previous-picture");a.setAttribute("title","Previous");d.appendChild(a);a.update("Back");this.elements.previous_button=a;return d}.bind(this);this.parentDiv.appendChild(this.buildUl());if(!this.options.hide.navigation){if(this.navigationTop){this.parentDiv.insertBefore(this.parentDiv.firstChild,this.buildNavigation())}else{this.parentDiv.appendChild(this.buildNavigation())}}},addObservers:function(){if(!this.options.hide.navigation){this.elements.next_button.onclick=function(a){this.handleChangeImage(this.dhonishowCurrentElement++)}.bindAsEventListener(this);this.elements.previous_button.onclick=function(a){this.handleChangeImage(this.dhonishowCurrentElement--)}.bindAsEventListener(this)}},removeObservers:function(){if(!this.options.hide.navigation){this.elements.next_button.onclick=function(){};this.elements.previous_button.onclick=function(){}}},handleChangeImage:function(a){this.changeImage(a,this.dhonishowCurrentElement);this.updateNavigation()},handleAutoplay:function(){new PeriodicalExecuter(function(a){if(this.effectStarted==false||typeof(this.effectStarted)=="undefined"){this.periodicalExecuterWay=this.periodicalExecuterWay||"right";if(this.dhonishowCurrentElement<=this.dhonishowElements.length&&this.periodicalExecuterWay=="right"){this.dhonishowCurrentElement++;if(this.dhonishowCurrentElement==this.dhonishowElements.length){this.periodicalExecuterWay="left"}}else{if(this.periodicalExecuterWay=="left"){this.dhonishowCurrentElement--;if(this.dhonishowCurrentElement=1){this.periodicalExecuterWay="right"}}}if(this.dhonishowCurrentElement==this.dhonishowElements.length){this.dhonishowCurrentElement=0;this.changeImage(0,this.dhonishowElements.length-1)}else{this.changeImage(this.dhonishowCurrentElement,this.dhonishowCurrentElement-1)}if(!this.options.hide.navigation){this.updateNavigation()}}}.bind(this),this.options.autoplay)},giveParent:function(a){return $(a).up("li")},giveEffect:function(){if(typeof(Effect)!="undefined"){return Effect.toggle}else{return Element.toggle}},changeImage:function(b,c){var a=this.giveEffect();Object.extend(this.options,{beforeStart:function(d){this.effectStarted=true;this.removeObservers()}.bind(this),afterFinish:function(d){this.effectStarted=false;if(d.options.to!=0){this.addObservers()}}.bind(this)});if(this.options.parallel==true&&typeof(Effect)!="undefined"){new Effect.Parallel([new a(this.giveParent(this.dhonishowElements[b]),this.options.effect,{sync:true}),new a(this.giveParent(this.dhonishowElements[c]),this.options.effect,{sync:true})],this.options)}else{if(typeof(Effect)!="undefined"){this.giveParent(this.dhonishowElements[b]).setStyle({zIndex:this.dhonishowElements.length});this.giveParent(this.dhonishowElements[c]).setStyle({zIndex:1});new a(this.giveParent(this.dhonishowElements[b]),this.options.effect,this.options);new a(this.giveParent(this.dhonishowElements[c]),this.options.effect,this.options)}else{new a(this.giveParent(this.dhonishowElements[b]),this.options.effect,this.options);new a(this.giveParent(this.dhonishowElements[c]),this.options.effect,this.options)}}},updateNavigation:function(){if(!this.options.hide.navigation){this.elements.previous_button.hide();this.elements.next_button.hide();var c=function(){if(this.dhonishowCurrentElement!=0){this.elements.previous_button.show()}if(this.dhonishowCurrentElement!=(this.dhonishowElements.length-1)){this.elements.next_button.show()}}.bind(this);var b=function(){this.elements.paging.update(this.options.pagingTemplate.evaluate({current:this.dhonishowCurrentElement+1,allpages:this.dhonishowElements.length}))}.bind(this);var a=function(d){if(d.getAttribute("alt")){var e=d.getAttribute("alt")}else{if(d.getAttribute("src")){var e=d.getAttribute("src").split("/").last()}else{var e=""}}this.elements.alt.update(e)}.bind(this);if(this.options.hide.paging==false){b()}if(this.options.hide.alt==false){a(this.dhonishowElements[this.dhonishowCurrentElement])}c()}}};var SearchDhonishow=Class.create();SearchDhonishow.prototype={shows:[],initialize:function(){$$(".dhonishow").each(function(a,b){if(a.id==""){a.id="dhonishow_"+b}this.shows.push(new Dhonishow(a))}.bind(this))}};if(typeof(Effect)!="undefined"){Effect.SlideRight=function(b){b=$(b).cleanWhitespace();var a=b.getDimensions();return new Effect.Scale(b,100,Object.extend({scaleContent:true,scaleX:true,scaleY:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:a.height,originalWidth:a.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makePositioned();c.element.down().makePositioned();c.element.makeClipping().show()},afterFinishInternal:function(c){c.element.undoClipping().undoPositioned();c.element.down().undoPositioned()}},arguments[1]||{}))};Effect.Slideleft=function(a){a=$(a).cleanWhitespace();return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:false,scaleX:true,scaleY:false,scaleMode:"box",scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(b){b.element.makePositioned();b.element.down().makePositioned();b.element.makeClipping().show()},afterFinishInternal:function(b){b.element.hide().undoClipping().undoPositioned();b.element.down().undoPositioned()}},arguments[1]||{}))};Effect.toggle=function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});return new Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,a)};Object.extend(Effect.PAIRS,{horizontal:["SlideRight","Slideleft"]})}new Event.observe(window,"load",function(){new SearchDhonishow()});
