var myShow=null;var data=null;function jsformat(str){var data={};var count=0;var str=str.split("::");for(i=0;i<str.length;i++){var img=str[i].split(".:.");data[img[0]]={caption:img[1]}}return data}window.addEvent('domready',function(){$$('.section-button','.section-button-active').each(function(e){var sectionFx=new Fx.Morph(e,{duration:120,fps:50,wait:false,transition:Fx.Transitions.Bounce.easeOut});e.setStyle('left','0px');e.addEvents({'mouseenter':function(){sectionFx.start({'left':'3px'})},'mouseleave':function(){sectionFx.start({'left':'0px'})},'click':function(ev){if(e.id=="promotion"||e.id=="contact"||e.id=="reservation")return;ev.stop();var bu=e;$$('.section-button-active').each(function(elem){elem.className="section-button"});bu.className="section-button-active";if(e.rel=="iframe"){$('mainIframe').src=e.href;$('mainIframe').style.display="inline-block";$('mainContent').style.display="none";return}$('mainIframe').style.display="none";$('mainContent').style.display="inline";$('hotel-right').className="content-loading";$('mainGallery').fade(0);$('mainContent').setStyle('opacity',0);$('mainContent').innerHTML="";var jsonRequest=new Request.JSON({evalScripts:true,url:this.href,onComplete:function(section){$('hotel-right').className="hotel-right";$('mainGallery').className="hotel-gallery";$('mainContent').innerHTML=section.desc;if(section.gallery=="main"){myShow.load(data)}else{if(section.gallery!=""){myShow.load(jsformat(section.gallery))}else{myShow.load(data)}}$('mainContent').fade(1);$('mainGallery').fade(1)}}).get()}})})});