$(document).ready(function(){$("#menu a").click(function(){$(this).blur()});$("#menu li").mouseover(function(){$(this).stop().animate({height:"150px"},{queue:false,duration:600,easing:"easeOutBounce"})});$("#menu li").mouseout(function(){$(this).stop().animate({height:"50px"},{queue:false,duration:600,easing:"easeOutBounce"})})});jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(j,i,b,c,d){return jQuery.easing[jQuery.easing.def](j,i,b,c,d)},easeInQuad:function(j,i,b,c,d){return c*(i/=d)*i+b},easeOutQuad:function(j,i,b,c,d){return -c*(i/=d)*(i-2)+b},easeInOutQuad:function(j,i,b,c,d){if((i/=d/2)<1){return c/2*i*i+b}return -c/2*((--i)*(i-2)-1)+b},easeInCubic:function(j,i,b,c,d){return c*(i/=d)*i*i+b},easeOutCubic:function(j,i,b,c,d){return c*((i=i/d-1)*i*i+1)+b},easeInOutCubic:function(j,i,b,c,d){if((i/=d/2)<1){return c/2*i*i*i+b}return c/2*((i-=2)*i*i+2)+b},easeInQuart:function(j,i,b,c,d){return c*(i/=d)*i*i*i+b},easeOutQuart:function(j,i,b,c,d){return -c*((i=i/d-1)*i*i*i-1)+b},easeInOutQuart:function(j,i,b,c,d){if((i/=d/2)<1){return c/2*i*i*i*i+b}return -c/2*((i-=2)*i*i*i-2)+b},easeInQuint:function(j,i,b,c,d){return c*(i/=d)*i*i*i*i+b},easeOutQuint:function(j,i,b,c,d){return c*((i=i/d-1)*i*i*i*i+1)+b},easeInOutQuint:function(j,i,b,c,d){if((i/=d/2)<1){return c/2*i*i*i*i*i+b}return c/2*((i-=2)*i*i*i*i+2)+b},easeInSine:function(j,i,b,c,d){return -c*Math.cos(i/d*(Math.PI/2))+c+b},easeOutSine:function(j,i,b,c,d){return c*Math.sin(i/d*(Math.PI/2))+b},easeInOutSine:function(j,i,b,c,d){return -c/2*(Math.cos(Math.PI*i/d)-1)+b},easeInExpo:function(j,i,b,c,d){return(i==0)?b:c*Math.pow(2,10*(i/d-1))+b},easeOutExpo:function(j,i,b,c,d){return(i==d)?b+c:c*(-Math.pow(2,-10*i/d)+1)+b},easeInOutExpo:function(j,i,b,c,d){if(i==0){return b}if(i==d){return b+c}if((i/=d/2)<1){return c/2*Math.pow(2,10*(i-1))+b}return c/2*(-Math.pow(2,-10*--i)+2)+b},easeInCirc:function(j,i,b,c,d){return -c*(Math.sqrt(1-(i/=d)*i)-1)+b},easeOutCirc:function(j,i,b,c,d){return c*Math.sqrt(1-(i=i/d-1)*i)+b},easeInOutCirc:function(j,i,b,c,d){if((i/=d/2)<1){return -c/2*(Math.sqrt(1-i*i)-1)+b}return c/2*(Math.sqrt(1-(i-=2)*i)+1)+b},easeInElastic:function(c,o,m,n,p){var d=1.70158;var a=0;var b=n;if(o==0){return m}if((o/=p)==1){return m+n}if(!a){a=p*0.3}if(b<Math.abs(n)){b=n;var d=a/4}else{var d=a/(2*Math.PI)*Math.asin(n/b)}return -(b*Math.pow(2,10*(o-=1))*Math.sin((o*p-d)*(2*Math.PI)/a))+m},easeOutElastic:function(c,o,m,n,p){var d=1.70158;var a=0;var b=n;if(o==0){return m}if((o/=p)==1){return m+n}if(!a){a=p*0.3}if(b<Math.abs(n)){b=n;var d=a/4}else{var d=a/(2*Math.PI)*Math.asin(n/b)}return b*Math.pow(2,-10*o)*Math.sin((o*p-d)*(2*Math.PI)/a)+n+m},easeInOutElastic:function(c,o,m,n,p){var d=1.70158;var a=0;var b=n;if(o==0){return m}if((o/=p/2)==2){return m+n}if(!a){a=p*(0.3*1.5)}if(b<Math.abs(n)){b=n;var d=a/4}else{var d=a/(2*Math.PI)*Math.asin(n/b)}if(o<1){return -0.5*(b*Math.pow(2,10*(o-=1))*Math.sin((o*p-d)*(2*Math.PI)/a))+m}return b*Math.pow(2,-10*(o-=1))*Math.sin((o*p-d)*(2*Math.PI)/a)*0.5+n+m},easeInBack:function(l,k,b,c,d,j){if(j==undefined){j=1.70158}return c*(k/=d)*k*((j+1)*k-j)+b},easeOutBack:function(l,k,b,c,d,j){if(j==undefined){j=1.70158}return c*((k=k/d-1)*k*((j+1)*k+j)+1)+b},easeInOutBack:function(l,k,b,c,d,j){if(j==undefined){j=1.70158}if((k/=d/2)<1){return c/2*(k*k*(((j*=(1.525))+1)*k-j))+b}return c/2*((k-=2)*k*(((j*=(1.525))+1)*k+j)+2)+b},easeInBounce:function(j,i,b,c,d){return c-jQuery.easing.easeOutBounce(j,d-i,0,c,d)+b},easeOutBounce:function(j,i,b,c,d){if((i/=d)<(1/2.75)){return c*(7.5625*i*i)+b}else{if(i<(2/2.75)){return c*(7.5625*(i-=(1.5/2.75))*i+0.75)+b}else{if(i<(2.5/2.75)){return c*(7.5625*(i-=(2.25/2.75))*i+0.9375)+b}else{return c*(7.5625*(i-=(2.625/2.75))*i+0.984375)+b}}}},easeInOutBounce:function(j,i,b,c,d){if(i<d/2){return jQuery.easing.easeInBounce(j,i*2,0,c,d)*0.5+b}return jQuery.easing.easeOutBounce(j,i*2-d,0,c,d)*0.5+c*0.5+b}});(function(d){d.prettyPhoto={version:"2.5.6"};d.fn.prettyPhoto=function(D){D=jQuery.extend({animationSpeed:"normal",opacity:0.8,showTitle:true,allowresize:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"light_rounded",hideflash:false,wmode:"opaque",autoplay:true,modal:false,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder">       <div class="pp_top">        <div class="pp_left"></div>        <div class="pp_middle"></div>        <div class="pp_right"></div>       </div>       <div class="pp_content_container">        <div class="pp_left">        <div class="pp_right">         <div class="pp_content">          <div class="pp_loaderIcon"></div>          <div class="pp_fade">           <a href="#" class="pp_expand" title="Expand the image">Expand</a>           <div class="pp_hoverContainer">            <a class="pp_next" href="#">next</a>            <a class="pp_previous" href="#">previous</a>           </div>           <div id="pp_full_res"></div>           <div class="pp_details clearfix">            <a class="pp_close" href="#">Close</a>            <p class="pp_description"></p>            <div class="pp_nav">             <a href="#" class="pp_arrow_previous">Previous</a>             <p class="currentTextHolder">0/0</p>             <a href="#" class="pp_arrow_next">Next</a>            </div>           </div>          </div>         </div>        </div>        </div>       </div>       <div class="pp_bottom">        <div class="pp_left"></div>        <div class="pp_middle"></div>        <div class="pp_right"></div>       </div>      </div>      <div class="pp_overlay"></div>      <div class="ppt"></div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>'},D);if(d.browser.msie&&parseInt(d.browser.version)==6){D.theme="light_square"}if(d(".pp_overlay").size()==0){C()}var T=true,P=false,E,J,a,V,L,K,F,B,R=d(window).height(),b=d(window).width(),U=0,G=S();d(window).scroll(function(){G=S();O();H()});d(window).resize(function(){O();H()});d(document).keydown(function(e){if(J.is(":visible")){switch(e.keyCode){case 37:d.prettyPhoto.changePage("previous");break;case 39:d.prettyPhoto.changePage("next");break;case 27:if(!D.modal){d.prettyPhoto.close()}break}}});d(this).each(function(){d(this).bind("click",function(){_self=this;theRel=d(this).attr("rel");galleryRegExp=/\[(?:.*)\]/;theGallery=galleryRegExp.exec(theRel);var f=new Array(),g=new Array(),e=new Array();if(theGallery){d("a[rel*="+theGallery+"]").each(function(h){if(d(this)[0]===d(_self)[0]){U=h}f.push(d(this).attr("href"));g.push(d(this).find("img").attr("alt"));e.push(d(this).attr("title"))})}else{f=d(this).attr("href");g=(d(this).find("img").attr("alt"))?d(this).find("img").attr("alt"):"";e=(d(this).attr("title"))?d(this).attr("title"):""}d.prettyPhoto.open(f,g,e);return false})});d.prettyPhoto.open=function(g,e,f){if(d.browser.msie&&d.browser.version==6){d("select").css("visibility","hidden")}if(D.hideflash){d("object,embed").css("visibility","hidden")}images=d.makeArray(g);titles=d.makeArray(e);descriptions=d.makeArray(f);image_set=(d(images).size()>0)?true:false;Q(d(images).size());d(".pp_loaderIcon").show();V.show().fadeTo(D.animationSpeed,D.opacity);J.find(".currentTextHolder").text((U+1)+D.counter_separator_label+d(images).size());if(descriptions[U]){J.find(".pp_description").show().html(unescape(descriptions[U]))}else{J.find(".pp_description").hide().text("")}if(titles[U]&&D.showTitle){hasTitle=true;a.html(unescape(titles[U]))}else{hasTitle=false}movie_width=(parseFloat(c("width",images[U])))?c("width",images[U]):D.default_width.toString();movie_height=(parseFloat(c("height",images[U])))?c("height",images[U]):D.default_height.toString();if(movie_width.indexOf("%")!=-1||movie_height.indexOf("%")!=-1){movie_height=parseFloat((d(window).height()*parseFloat(movie_height)/100)-100);movie_width=parseFloat((d(window).width()*parseFloat(movie_width)/100)-100);P=true}J.fadeIn(function(){imgPreloader="";switch(A(images[U])){case"image":imgPreloader=new Image();nextImage=new Image();if(image_set&&U>d(images).size()){nextImage.src=images[U+1]}prevImage=new Image();if(image_set&&images[U-1]){prevImage.src=images[U-1]}J.find("#pp_full_res")[0].innerHTML=D.image_markup;J.find("#fullResImage").attr("src",images[U]);imgPreloader.onload=function(){E=N(imgPreloader.width,imgPreloader.height);_showContent()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");d.prettyPhoto.close()};imgPreloader.src=images[U];break;case"youtube":E=N(movie_width,movie_height);movie="http://www.youtube.com/v/"+c("v",images[U]);if(D.autoplay){movie+="&autoplay=1"}toInject=D.flash_markup.replace(/{width}/g,E.width).replace(/{height}/g,E.height).replace(/{wmode}/g,D.wmode).replace(/{path}/g,movie);break;case"vimeo":E=N(movie_width,movie_height);movie_id=images[U];movie="http://vimeo.com/moogaloop.swf?clip_id="+movie_id.replace("http://vimeo.com/","");if(D.autoplay){movie+="&autoplay=1"}toInject=D.flash_markup.replace(/{width}/g,E.width).replace(/{height}/g,E.height).replace(/{wmode}/g,D.wmode).replace(/{path}/g,movie);break;case"quicktime":E=N(movie_width,movie_height);E.height+=15;E.contentHeight+=15;E.containerHeight+=15;toInject=D.quicktime_markup.replace(/{width}/g,E.width).replace(/{height}/g,E.height).replace(/{wmode}/g,D.wmode).replace(/{path}/g,images[U]).replace(/{autoplay}/g,D.autoplay);break;case"flash":E=N(movie_width,movie_height);flash_vars=images[U];flash_vars=flash_vars.substring(images[U].indexOf("flashvars")+10,images[U].length);filename=images[U];filename=filename.substring(0,filename.indexOf("?"));toInject=D.flash_markup.replace(/{width}/g,E.width).replace(/{height}/g,E.height).replace(/{wmode}/g,D.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":E=N(movie_width,movie_height);frame_url=images[U];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=D.iframe_markup.replace(/{width}/g,E.width).replace(/{height}/g,E.height).replace(/{path}/g,frame_url);break;case"inline":myClone=d(images[U]).clone().css({width:D.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(d("body"));E=N(d(myClone).width(),d(myClone).height());d(myClone).remove();toInject=D.inline_markup.replace(/{content}/g,d(images[U]).html());break}if(!imgPreloader){J.find("#pp_full_res")[0].innerHTML=toInject;_showContent()}})};d.prettyPhoto.changePage=function(e){if(e=="previous"){U--;if(U<0){U=0;return}}else{if(d(".pp_arrow_next").is(".disabled")){return}U++}if(!T){T=true}M(function(){d.prettyPhoto.open(images,titles,descriptions)});d("a.pp_expand,a.pp_contract").fadeOut(D.animationSpeed)};d.prettyPhoto.close=function(){J.find("object,embed").css("visibility","hidden");d("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(D.animationSpeed);V.fadeOut(D.animationSpeed,function(){d("#pp_full_res").html("");J.attr("style","").find("div:not(.pp_hoverContainer)").attr("style","");O();if(d.browser.msie&&d.browser.version==6){d("select").css("visibility","visible")}if(D.hideflash){d("object,embed").css("visibility","visible")}U=0;D.callback()});T=true};_showContent=function(){d(".pp_loaderIcon").hide();projectedTop=G.scrollTop+((R/2)-(E.containerHeight/2));if(projectedTop<0){projectedTop=0+a.height()}J.find(".pp_content").animate({height:E.contentHeight},D.animationSpeed);J.animate({top:projectedTop,left:(b/2)-(E.containerWidth/2),width:E.containerWidth},D.animationSpeed,function(){J.find(".pp_hoverContainer,#fullResImage").height(E.height).width(E.width);J.find(".pp_fade").fadeIn(D.animationSpeed);if(image_set&&A(images[U])=="image"){J.find(".pp_hoverContainer").show()}else{J.find(".pp_hoverContainer").hide()}if(D.showTitle&&hasTitle){a.css({top:J.offset().top-25,left:J.offset().left+20,display:"none"});a.fadeIn(D.animationSpeed)}if(E.resized){d("a.pp_expand,a.pp_contract").fadeIn(D.animationSpeed)}D.changepicturecallback()})};function M(e){J.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");J.find(".pp_fade").fadeOut(D.animationSpeed,function(){d(".pp_loaderIcon").show();if(e){e()}});a.fadeOut(D.animationSpeed)}function Q(e){if(U==e-1){J.find("a.pp_next").css("visibility","hidden");J.find("a.pp_arrow_next").addClass("disabled").unbind("click")}else{J.find("a.pp_next").css("visibility","visible");J.find("a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){d.prettyPhoto.changePage("next");return false})}if(U==0){J.find("a.pp_previous").css("visibility","hidden");J.find("a.pp_arrow_previous").addClass("disabled").unbind("click")}else{J.find("a.pp_previous").css("visibility","visible");J.find("a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){d.prettyPhoto.changePage("previous");return false})}if(e>1){d(".pp_nav").show()}else{d(".pp_nav").hide()}}function N(e,f){hasBeenResized=false;I(e,f);imageWidth=e;imageHeight=f;if(((B>b)||(F>R))&&T&&D.allowresize&&!P){hasBeenResized=true;notFitting=true;while(notFitting){if((B>b)){imageWidth=(b-200);imageHeight=(f/e)*imageWidth}else{if((F>R)){imageHeight=(R-200);imageWidth=(e/f)*imageHeight}else{notFitting=false}}F=imageHeight;B=imageWidth}I(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(F),containerWidth:Math.floor(B)+40,contentHeight:Math.floor(L),contentWidth:Math.floor(K),resized:hasBeenResized}}function I(e,f){e=parseFloat(e);f=parseFloat(f);$pp_details=J.find(".pp_details");$pp_details.width(e);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().appendTo(d("body")).css({position:"absolute",top:-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if(d.browser.msie&&d.browser.version==7){detailsHeight+=8}$pp_details.remove();L=f+detailsHeight;K=e;F=L+a.height()+J.find(".pp_top").height()+J.find(".pp_bottom").height();B=e}function A(e){if(e.match(/youtube\.com\/watch/i)){return"youtube"}else{if(e.match(/vimeo\.com/i)){return"vimeo"}else{if(e.indexOf(".mov")!=-1){return"quicktime"}else{if(e.indexOf(".swf")!=-1){return"flash"}else{if(e.indexOf("iframe")!=-1){return"iframe"}else{if(e.substr(0,1)=="#"){return"inline"}else{return"image"}}}}}}}function O(){if(T){titleHeight=a.height();contentHeight=J.height();contentwidth=J.width();projectedTop=(R/2)+G.scrollTop-((contentHeight+titleHeight)/2);J.css({top:projectedTop,left:(b/2)+G.scrollLeft-(contentwidth/2)});a.css({top:projectedTop-titleHeight,left:(b/2)+G.scrollLeft-(contentwidth/2)+20})}}function S(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else{if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else{if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}}}function H(){R=d(window).height();b=d(window).width();V.css({height:d(document).height()})}function C(){d("body").append(D.markup);J=d(".pp_pic_holder");a=d(".ppt");V=d("div.pp_overlay");J.attr("class","pp_pic_holder "+D.theme);V.css({opacity:0,height:d(document).height()}).bind("click",function(){if(!D.modal){d.prettyPhoto.close()}});d("a.pp_close").bind("click",function(){d.prettyPhoto.close();return false});d("a.pp_expand").bind("click",function(){$this=d(this);if($this.hasClass("pp_expand")){$this.removeClass("pp_expand").addClass("pp_contract");T=false}else{$this.removeClass("pp_contract").addClass("pp_expand");T=true}M(function(){d.prettyPhoto.open(images,titles,descriptions)});J.find(".pp_fade").fadeOut(D.animationSpeed);return false});J.find(".pp_previous, .pp_arrow_previous").bind("click",function(){d.prettyPhoto.changePage("previous");return false});J.find(".pp_next, .pp_arrow_next").bind("click",function(){d.prettyPhoto.changePage("next");return false})}O()};function c(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var h="[\\?&]"+a+"=([^&#]*)";var i=new RegExp(h);var j=i.exec(b);if(j==null){return""}else{return j[1]}}})(jQuery);$(document).ready(function(){$(".gallery a[rel^='prettyPhoto']").prettyPhoto({theme:"facebook"})});$(document).ready(function(){$("#extrasectionbutton").click(function(){$("#extrasection").slideDown(2000,function(){})})});$(document).ready(function(){$(".rightpanelheading").hover(function(){$(this).css({"z-index":"10"});$(this).find("img").addClass("hover").stop().animate({marginLeft:"15px",top:"50%",left:"50%",width:"128px",height:"128px"},200)},function(){$(this).css({"z-index":"0"});$(this).find("img").removeClass("hover").stop().animate({marginTop:"0",marginLeft:"0",top:"0",left:"0",width:"128px",height:"128px"},400)})});$(document).ready(function(){$(".imagestext").hover(function(){$(this).css({"z-index":"10"});$(this).addClass("hover").stop().animate({top:"50%",left:"50%",color:"#ff9900"},500)},function(){$(this).css({"z-index":"0"});$(this).removeClass("hover").stop().animate({color:"#fff"},900)})});$(document).ready(function(){setTimeout(function(){$(".headertagtext").animate({color:"#fff"},1700,function(){$(".headertagtexttwo").animate({color:"#ffd440"},2500,function(){$(".telephone p").animate({color:"#ff9900"},2500)})})},1500)});$(document).ready(function(){var c=location.pathname.substring(1);var d=location.pathname;$("#menu a").css("color","#191919");if(c){$('#menu a[href$="'+c+'"]').css("color","#f5620a")}if(d=="/"){$('#menu a[href$="default.aspx"]').css("color","#f5620a")}});