window.addEvent("domready",function(){$("gallery").set("html",$("gallerycontent").get("html"));tween=new Fx.Tween("gallery","opacity",{link:"chain",duration:"short"});alltween=new Fx.Tween("page","opacity",{link:"chain",duration:"short"});var e=new Array(0,125,250,375,125,250,375,500);for(i=1;i<9;i++){$("p"+i).set("opacity",0)}function a(f){setTimeout("$('p"+f+"').tween('opacity', 1)",500+e[f-1])}function c(f){$("p"+f).addEvent("click",function(g){g.stop();tween.start(0).chain(function(){$("gallery").set("html",$("project"+f).get("html"));b(f);tween.start(1)})})}function d(){for(i=1;i<9;i++){c(i)}}function b(f){$("ps"+f).addEvent("click",function(g){g.stop();tween.start(0).chain(function(){$("gallery").set("html",$("gallerycontent").get("html"));d();tween.start(1)})});$("back"+f).addEvent("click",function(g){g.stop();tween.start(0).chain(function(){$("gallery").set("html",$("gallerycontent").get("html"));d();tween.start(1)})});$("forward"+f).addEvent("click",function(g){g.stop();alltween.start(0).chain(function(){window.location.href="main.htm"})})}d();for(i=1;i<9;i++){a(i)}$("head").set("opacity",0.01);setTimeout("$('head').tween('opacity', 1)",250)});
