/* Criado por iD Studio - www.idstudio.art.br - 2009-2010 */
var Images=[],Content=[],onLoad=[],onUnload=[],IE=window.navigator.appName.indexOf("Explorer")!=-1?true:false,Webkit=(/Webkit/i).test(window.navigator.userAgent)?true:false,NavDefault="blank.gif",Sheet=Lorry=Ambiance=Bird=null,Part=PartTotal=1,LoaderBusy=SwitcherBusy=AmbianceState=AmbianceResume=false;function preload(D,A,C){var B;if(!document.images){return false}B=new Image(A,C);B.src=D;Images.push(B);return Images.length-1}preload("loading.png",100,75);preload("novo_hover1.jpg",170,145);preload("novo_hover2.jpg",170,145);preload("novo_hover3.jpg",170,145);preload("morretes_new_on.png",128,79);preload("hea_on.png",105,110);preload("bird_off2.png",56,31);function es3(J,B,C,A,H){var G="&#64;",F="&#46;",D="<",E=">",I="/";I=D+'a href="#" onClick="location'+F+"href = '&#109;&#97;&#105;&#108;&#116;&#111;&#58;"+C+G+B+F+A+"'; return false;\""+(H?' class="'+H+'"':"")+E+(J?J:C+G+B+F+A)+D+I+"a"+E;document.write(I)}onLoad["sobre_nos.php"]=function(){var A=2;Part=1;PartTotal=4;SwitcherBusy=false;if(!IE){$("Part1").fade("show");for(;A<=PartTotal;A++){$("Part"+A).fade("hide")}}};onLoad["contato.php"]=function(){var A=2;Part=1;PartTotal=3;SwitcherBusy=false;if(!IE){$("Part1").fade("show");for(;A<=PartTotal;A++){$("Part"+A).fade("hide")}}};function MorretesOnClick(){return hs.expand(this,{slideshowGroup:"morretes"})}function MorretesOnKeyPress(A){if(!A){A=window.event}if(!hs.active&&A.keyCode<=40&&A.keyCode>=37){$("Thumb1").onclick()}}onLoad["morretes.php"]=function(){var A=Sheet.wrapper.getElementsByTagName("a"),B=0;for(;B<A.length;B++){A.item(B).onclick=MorretesOnClick}hs.addEventListener(document,window.opera?"keypress":"keydown",MorretesOnKeyPress)};onUnload["morretes.php"]=function(){hs.removeEventListener(document,window.opera?"keypress":"keydown",MorretesOnKeyPress)};function Nav(A,B){document.getElementById("NavImg").src=B?Images[A].src:NavDefault}function Load(C,A,B){switch(A){case 1:if(!IE){Sheet.wrapper.set("tween",{onComplete:null})}if(Content[C]){Sheet.wrapper.innerHTML=Content[C];if(onLoad[C]){onLoad[C]()}hs.updateAnchors();if(!IE){Sheet.wrapper.fade()}LoaderBusy=false}else{Sheet.wrapper.innerHTML="";Sheet.wrapper.style.backgroundImage="url('"+Images[0].src+"')";if(!IE){Sheet.wrapper.fade("show")}Lorry.send({url:C})}break;case 2:case 3:if(!IE){Sheet.wrapper.fade("hide")}Sheet.wrapper.style.backgroundImage="";if(A==2){Sheet.wrapper.innerHTML=B[2]}else{Sheet.wrapper.innerHTML="<p>Conexão perdida com o servidor.<br /><a href='#' onClick='return Load(\""+Lorry.src+"\");'>Tentar de novo</a>."}if(onLoad[C]){onLoad[C]()}hs.updateAnchors();Content[C]=B[2];if(!IE){Sheet.wrapper.fade()}LoaderBusy=false;break;default:if(LoaderBusy){return false}LoaderBusy=true;if(onUnload[Content.src]){onUnload[Content.src]()}Content.src=C;if(!IE){Sheet.wrapper.set("tween",{onComplete:function(){Load(Content.src,1)}});Sheet.wrapper.fade()}else{setTimeout("Load(Content.src, 1)",1)}}return false}function SwitchParts(C){var D=(Part==PartTotal?1:Part+1),B=$("Part"+Part),A=$("Part"+D);if(!C){C=1}switch(C){case 1:if(SwitcherBusy){return false}SwitcherBusy=true;$("PartAnchor").blur();$("PartAnchor").innerHTML="Página "+D+" / "+PartTotal;if(!IE){B.set("tween",{onComplete:function(){SwitchParts(2)}});B.fade()}else{setTimeout("SwitchParts(2)",1)}break;case 2:B.style.display="none";A.style.display="";if(!IE){A.set("tween",{onComplete:function(){SwitchParts(3)}});A.fade()}else{setTimeout("SwitchParts(3)",1)}break;case 3:Part=D;SwitcherBusy=false}return false}function SwitchAmbiance(A){if(A){AmbianceState=!A}Bird.src=AmbianceState?Images[6].src:"bird_on.png";Ambiance.TCallLabel("/",AmbianceState?"stop":"play");AmbianceState=!AmbianceState;return false}function SetupAmbiance(A){if(A.success){Ambiance=A.ref;setTimeout("Ambiance.SetVariable(\"onSongOver\", \"Ambiance.TCallLabel('/', 'play')\")",20000);AmbianceState=true}}function Setup(){var A;Sheet=$("Sheet");Sheet.wrapper=$(Sheet.childNodes.item(0));Content.src=linkPage;if(!IE){Sheet.wrapper.fade("hide");Sheet.wrapper.set("tween",{link:"ignore"})}if(linkPage!="index.php"){Content[linkPage]=Sheet.wrapper.innerHTML}if(onLoad[linkPage]){onLoad[linkPage]()}hs.active=false;hs.activation=null;hs.Expander.prototype.onAfterExpand=function(){clearTimeout(hs.activation);hs.active=true;hs.container.childNodes.item(4).childNodes.item(0).style.backgroundImage="url('"+Images[0].src+"')";if(Content.src=="portfolio.php"&&AmbianceState){SwitchAmbiance();AmbianceResume=true}};hs.Expander.prototype.onAfterClose=function(){hs.activation=setTimeout("hs.active = false",500);if(Content.src=="portfolio.php"&&AmbianceResume){SwitchAmbiance();AmbianceResume=false}};Lorry=new Request.HTML({evalScripts:true,link:"cancel",data:"raw=1",onSuccess:function(B,D,C,E){Load(Content.src,2,[B,D,C,E])},onFailure:function(B,D,C,E){Load(Content.src,3,[B,D,C,E])}});A=new Fx.Morph(Sheet,{duration:"long",transition:Fx.Transitions.Quad.easeOut,onComplete:function(){if(!IE){Sheet.wrapper.fade()}else{Sheet.wrapper.style.visibility="visible"}}});A.start({width:[0,420],height:[0,380],top:[290,100]});swfobject.embedSWF("niftyplayer.swf?file=birds_bg.mp3&as=1","Ambiance","0","0","6",false,false,{swliveconnect:"true"},false,SetupAmbiance);Bird=$("Bird").childNodes.item(0)};