function hidePreloader(){$("preloader").fade("out")}window.addEvent("domready",function(){new SmoothScroll({duration:700},window);$$(".nav a").addEvent("click",function(){var a=new Fx.Scroll(window,{wait:false,duration:2500,transition:Fx.Transitions.Quad.easeInOut});a.toElement(this.href)});var a=new dwProgressBar({container:$("progress-bar"),startPercentage:0,speed:1e3,boxID:"box",percentageID:"perc",displayID:"text",displayText:false});var b=["images/overlay.png","images/loading.png","images/milkbox/loading.gif","images/milkbox/close.gif","images/milkbox/next.gif","images/milkbox/play-pause.gif","images/milkbox/prev.gif","images/img-map.jpg","images/logo.png","images/box.png","images/pattern.png","images/shots/aerial.jpg","images/shots/blue.png","images/shots/luxique.png","images/shots/nature.png","images/shots/red-cloud.png","images/shots/remco-boas.jpg","images/shots/salsa.jpg","images/shots/zshare.png","images/shots/csskitchen.png","images/shots/diocese.png","images/shots/bcpo.png","images/shots/cheffy.png","images/shots/nepro.png","images/shots/exin.png","images/shots/nkiap.png"];var c=new Asset.images(b,{onProgress:function(c,d){a.set(c*(100/b.length));if(c==b.length){(function(){hidePreloader()}).delay(2e3)}},onComplete:function(){b.each(function(a){(new Element("img",{src:a})).inject($("images-holder"))})}});milkbox.refreshDisplay({resizeTransition:"bounce:out",resizeDuration:1,initialWidth:200,initialHeight:200});milkbox.display.overlay.setStyle("backgroundColor","#312b25")});var dwProgressBar=new Class({Implements:[Options],options:{container:$$("body")[0],boxID:"",percentageID:"",displayID:"",startPercentage:20,displayText:false,speed:10},initialize:function(a){this.setOptions(a);this.createElements()},createElements:function(){var a=new Element("div",{id:this.options.boxID});var b=new Element("div",{id:this.options.percentageID,style:"width:0px;"});b.inject(a);a.inject(this.options.container);if(this.options.displayText){var c=new Element("div",{id:this.options.displayID});c.inject(this.options.container)}this.set(this.options.startPercentage)},calculate:function(a){return($(this.options.boxID).getStyle("width").replace("px","")*(a/100)).toInt()},animate:function(a){$(this.options.percentageID).set("morph",{duration:this.options.speed,link:"cancel"}).morph({width:this.calculate(a.toInt())});if(this.options.displayText){$(this.options.displayID).set("text",a.toInt()+"%")}},set:function(a){this.animate(a)}})
