var Site={lang:"it",repos:true,preload:new Array(),prelcnt:0,firstbg:{sala_specchi:"sala_specchi_5.jpg",sala_acqua:"sala_acqua_7.jpg",sala_terra:"sala_terra_17.jpg",labirinto:"labirinto_8.jpg",sala_metalli:"sala_metalli_3.jpg",sala_sfere:"sala_sfere_3.jpg",tempio_azzurro:"tempio_azzurro_2.jpg",storia:"storia_14.jpg",futuro:"futuro_4.jpg"},Start:function(){$("logo").setStyle("opacity",0);$("enter").setStyle("opacity",0.5);Site.InitialPosition();Site.Intro.StartIntro();Site.Preloader()},Preloader:function(){new Asset.images(Site.preload[Site.prelcnt],{onComplete:function(){Site.prelcnt+=1;(function(){Site.Preloader()}).delay(333)}})},HideAll:function(){$$("h1").each(function(a){a.setStyles({opacity:0,display:"none"})});$$("span").each(function(a){a.setStyles({opacity:0,display:"none"})})},InitialPosition:function(){if(!Site.repos){return}var f=$(document.body).getSize();var i=$("ph_1").getSize();var a=$("logo").getSize();var j=$("enter").getSize();var d=Math.round((f.x-a.x)/2);var b=Math.round((f.y-a.y)/2);var e=Math.round((f.x-i.x)/2);var c=Math.round((f.y-i.y)/2);var h=Math.round((f.x-j.x)/2);var g=Math.round(f.y-j.y-10);$("container").setStyles({width:f.x,height:f.y});$("logo").setStyles({"margin-left":d,"margin-top":b,opacity:0,display:""});$("enter").setStyles({"margin-left":h,"margin-top":g});$$(".phrase").each(function(k){k.setStyles({opacity:0,display:"","margin-left":e,"margin-top":c})})},Intro:{cnt:1,lang:"ita",secs:1,wait:1500,topmargin:0,StartIntro:function(){var b=$$(".phrase").length;var c=$("logo");var a=Site.Intro.secs*1000;var f=Site.Intro.lang;if(Site.Intro.cnt<=b){var e=$("ph_"+Site.Intro.cnt);var d=new Fx.Tween(e,{duration:a,link:"chain"});e.setStyle("background","transparent url(assets/"+Site.lang+"/images/ph_"+Site.Intro.cnt+".png) center center no-repeat");d.start("opacity",0,1).wait(Site.Intro.wait);d.start("opacity",1,0);Site.Intro.cnt+=1;Site.Intro.StartIntro.delay(a*2+Site.Intro.wait);return}var a=1500;var d=new Fx.Tween($("logo"),{duration:a,link:"chain"});d.start("opacity",0,1);d.start("opacity",1,0.1);Site.Intro.EndIntro.delay(a*2)},EndIntro:function(){Site.repos=false;var b=$$(".phrase").length;var d=$(document.body).getSize();var c=$("ph_1").getSize();var e=Math.round((d.y-(c.y*(b)))/2);var a=200;Site.Intro.topmargin=e;Site.Intro.cnt=0;$$(".phrase").each(function(f){f.setStyle("margin-top",Site.Intro.topmargin);Site.Intro.topmargin+=c.y;var g=new Fx.Tween(f,{duration:300});g.start("opacity",0,1);Site.Intro.cnt+=1});Site.Intro.ShowEnter()},ShowEnter:function(){var b=$("enter");var a=$("ph_5").getStyle("margin-top").toInt()+$("ph_5").getSize().y;new Fx.Tween(b,{duration:200,property:"margin-top"}).start(a+100);new Fx.Tween(b,{duration:200,property:"opacity"}).start(0,1);Site.Intro.FlashEnter()},FlashEnter:function(){var a=1500;var d=$("enter");var b=d.getStyle("opacity");var c=new Fx.Tween(d,{duration:1000,link:"chain"});c.start("opacity",b,1);c.start("opacity",1,b);Site.Intro.FlashEnter.delay(a*2)}}};