window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){arguments.callee=arguments.callee.caller;var a=[].slice.call(arguments);(typeof console.log==="object"?log.apply.call(console.log,console,a):console.log.apply(console,a))}};(function(e){function h(){}for(var g="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),f;f=g.pop();){e[f]=e[f]||h}})((function(){try{console.log();return window.console}catch(a){return window.console={}}})());(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var t=r=="x"?"Left":"Top",s=t.toLowerCase(),v="scroll"+t,p=n[v],g=a.max(n,r);if(j){k[v]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[v]-=parseInt(m.css("margin"+t))||0;k[v]-=parseInt(m.css("border"+t+"Width"))||0}k[v]+=d.offset[s]||0;if(d.over[s]){k[v]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var u=m[s];k[v]=u.slice&&u.slice(-1)=="%"?parseFloat(u)/100*g:u}if(/^\d+$/.test(k[v])){k[v]=k[v]<=0?0:Math.min(k[v],g)}if(!q&&d.queue){if(p!=k[v]){i(d.onAfterFirst)}delete k[v]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(d){var a=location.href.replace(/#.*/,"");var c=d.localScroll=function(e){d("body").localScroll(e)};c.defaults={duration:1000,axis:"y",event:"click",stop:true,target:window,reset:true};c.hash=function(f){if(location.hash){f=d.extend({},c.defaults,f);f.hash=false;if(f.reset){var g=f.duration;delete f.duration;d(f.target).scrollTo(0,f);f.duration=g}b(0,location,f)}};d.fn.localScroll=function(e){e=d.extend({},c.defaults,e);return e.lazy?this.bind(e.event,function(g){var h=d([g.target,g.target.parentNode]).filter(f)[0];if(h){b(g,h,e)}}):this.find("a,area").filter(f).bind(e.event,function(g){b(g,this,e)}).end().end();function f(){return !!this.href&&!!this.hash&&this.href.replace(this.hash,"")==a&&(!e.filter||d(this).is(e.filter))}};function b(i,p,g){var q=p.hash.slice(1),o=document.getElementById(q)||document.getElementsByName(q)[0];if(!o){return}if(i){i.preventDefault()}var n=d(g.target);if(g.lock&&n.is(":animated")||g.onBefore&&g.onBefore.call(g,i,o,n)===false){return}if(g.stop){n.stop(true)}if(g.hash){var m=o.id==q?"id":"name",l=d("<a> </a>").attr(m,q).css({position:"absolute",top:d(window).scrollTop(),left:d(window).scrollLeft()});o[m]="";d("body").prepend(l);location=p.hash;l.remove();o[m]=q}n.scrollTo(o,g).trigger("notify.serialScroll",[o])}})(jQuery);(function(aG){var ay,aq,ap,aD,aj,aA,ai,ax,am,al,au=0,aE={},aw=[],av=0,aF={},az=[],ag=null,ao=new Image,ae=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,k=/[^\.]\.(swf)\s*$/i,ad,ac=1,an=0,ar="",at,aB,aC=false,ak=aG.extend(aG("<div/>")[0],{prop:0}),ab=aG.browser.msie&&aG.browser.version<7&&!window.XMLHttpRequest,aa=function(){aq.hide();ao.onerror=ao.onload=null;ag&&ag.abort();ay.empty()},R=function(){if(false===aE.onError(aw,au,aE)){aq.hide();aC=false}else{aE.titleShow=false;aE.width="auto";aE.height="auto";ay.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');ah()}},af=function(){var d=aw[au],j,f,e,i,h,b;aa();aE=aG.extend({},aG.fn.fancybox.defaults,typeof aG(d).data("fancybox")=="undefined"?aE:aG(d).data("fancybox"));b=aE.onStart(aw,au,aE);if(b===false){aC=false}else{if(typeof b=="object"){aE=aG.extend(aE,b)}e=aE.title||(d.nodeName?aG(d).attr("title"):d.title)||"";if(d.nodeName&&!aE.orig){aE.orig=aG(d).children("img:first").length?aG(d).children("img:first"):aG(d)}if(e===""&&aE.orig&&aE.titleFromAlt){e=aE.orig.attr("alt")}j=aE.href||(d.nodeName?aG(d).attr("href"):d.href)||null;if(/^(?:javascript)/i.test(j)||j=="#"){j=null}if(aE.type){f=aE.type;if(!j){j=aE.content}}else{if(aE.content){f="html"}else{if(j){f=j.match(ae)?"image":j.match(k)?"swf":aG(d).hasClass("iframe")?"iframe":j.indexOf("#")===0?"inline":"ajax"}}}if(f){if(f=="inline"){d=j.substr(j.indexOf("#"));f=aG(d).length>0?"inline":"ajax"}aE.type=f;aE.href=j;aE.title=e;if(aE.autoDimensions){if(aE.type=="html"||aE.type=="inline"||aE.type=="ajax"){aE.width="auto";aE.height="auto"}else{aE.autoDimensions=false}}if(aE.modal){aE.overlayShow=true;aE.hideOnOverlayClick=false;aE.hideOnContentClick=false;aE.enableEscapeButton=false;aE.showCloseButton=false}aE.padding=parseInt(aE.padding,10);aE.margin=parseInt(aE.margin,10);ay.css("padding",aE.padding+aE.margin);aG(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){aG(this).replaceWith(aA.children())});switch(f){case"html":ay.html(aE.content);ah();break;case"inline":if(aG(d).parent().is("#fancybox-content")===true){aC=false;break}aG('<div class="fancybox-inline-tmp" />').hide().insertBefore(aG(d)).bind("fancybox-cleanup",function(){aG(this).replaceWith(aA.children())}).bind("fancybox-cancel",function(){aG(this).replaceWith(ay.children())});aG(d).appendTo(ay);ah();break;case"image":aC=false;aG.fancybox.showActivity();ao=new Image;ao.onerror=function(){R()};ao.onload=function(){aC=true;ao.onerror=ao.onload=null;aE.width=ao.width;aE.height=ao.height;aG("<img />").attr({id:"fancybox-img",src:ao.src,alt:aE.title}).appendTo(ay);P()};ao.src=j;break;case"swf":aE.scrolling="no";i='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+aE.width+'" height="'+aE.height+'"><param name="movie" value="'+j+'"></param>';h="";aG.each(aE.swf,function(l,m){i+='<param name="'+l+'" value="'+m+'"></param>';h+=" "+l+'="'+m+'"'});i+='<embed src="'+j+'" type="application/x-shockwave-flash" width="'+aE.width+'" height="'+aE.height+'"'+h+"></embed></object>";ay.html(i);ah();break;case"ajax":aC=false;aG.fancybox.showActivity();aE.ajax.win=aE.ajax.success;ag=aG.ajax(aG.extend({},aE.ajax,{url:j,data:aE.ajax.data||{},error:function(l){l.status>0&&R()},success:function(l,m,n){if((typeof n=="object"?n:ag).status==200){if(typeof aE.ajax.win=="function"){b=aE.ajax.win(j,l,m,n);if(b===false){aq.hide();return}else{if(typeof b=="string"||typeof b=="object"){l=b}}}ay.html(l);ah()}}}));break;case"iframe":P()}}else{R()}}},ah=function(){var b=aE.width,d=aE.height;b=b.toString().indexOf("%")>-1?parseInt((aG(window).width()-aE.margin*2)*parseFloat(b)/100,10)+"px":b=="auto"?"auto":b+"px";d=d.toString().indexOf("%")>-1?parseInt((aG(window).height()-aE.margin*2)*parseFloat(d)/100,10)+"px":d=="auto"?"auto":d+"px";ay.wrapInner('<div style="width:'+b+";height:"+d+";overflow: "+(aE.scrolling=="auto"?"auto":aE.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');aE.width=ay.width();aE.height=ay.height();P()},P=function(){var b,d;aq.hide();if(aD.is(":visible")&&false===aF.onCleanup(az,av,aF)){aG.event.trigger("fancybox-cancel");aC=false}else{aC=true;aG(aA.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aD.is(":visible")&&aF.titlePosition!=="outside"&&aD.css("height",aD.height());az=aw;av=au;aF=aE;if(aF.overlayShow){ap.css({"background-color":aF.overlayColor,opacity:aF.overlayOpacity,cursor:aF.hideOnOverlayClick?"pointer":"auto",height:aG(document).height()});if(!ap.is(":visible")){ab&&aG("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});ap.show()}}else{ap.hide()}aB=g();ar=aF.title||"";an=0;ax.empty().removeAttr("style").removeClass();if(aF.titleShow!==false){if(aG.isFunction(aF.titleFormat)){b=aF.titleFormat(ar,az,av,aF)}else{b=ar&&ar.length?aF.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+ar+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+aF.titlePosition+'">'+ar+"</div>":false}ar=b;if(!(!ar||ar==="")){ax.addClass("fancybox-title-"+aF.titlePosition).html(ar).appendTo("body").show();switch(aF.titlePosition){case"inside":ax.css({width:aB.width-aF.padding*2,marginLeft:aF.padding,marginRight:aF.padding});an=ax.outerHeight(true);ax.appendTo(aj);aB.height+=an;break;case"over":ax.css({marginLeft:aF.padding,width:aB.width-aF.padding*2,bottom:aF.padding}).appendTo(aj);break;case"float":ax.css("left",parseInt((ax.width()-aB.width-40)/2,10)*-1).appendTo(aD);break;default:ax.css({width:aB.width-aF.padding*2,paddingLeft:aF.padding,paddingRight:aF.padding}).appendTo(aD)}}}ax.hide();if(aD.is(":visible")){aG(ai.add(am).add(al)).hide();b=aD.position();at={top:b.top,left:b.left,width:aD.width(),height:aD.height()};d=at.width==aB.width&&at.height==aB.height;aA.fadeTo(aF.changeFade,0.3,function(){var e=function(){aA.html(ay.contents()).fadeTo(aF.changeFade,1,H)};aG.event.trigger("fancybox-change");aA.empty().removeAttr("filter").css({"border-width":aF.padding,width:aB.width-aF.padding*2,height:aE.autoDimensions?"auto":aB.height-an-aF.padding*2});if(d){e()}else{ak.prop=0;aG(ak).animate({prop:1},{duration:aF.changeSpeed,easing:aF.easingChange,step:C,complete:e})}})}else{aD.removeAttr("style");aA.css("border-width",aF.padding);if(aF.transitionIn=="elastic"){at=w();aA.html(ay.contents());aD.show();if(aF.opacity){aB.opacity=0}ak.prop=0;aG(ak).animate({prop:1},{duration:aF.speedIn,easing:aF.easingIn,step:C,complete:H})}else{aF.titlePosition=="inside"&&an>0&&ax.show();aA.css({width:aB.width-aF.padding*2,height:aE.autoDimensions?"auto":aB.height-an-aF.padding*2}).html(ay.contents());aD.css(aB).fadeIn(aF.transitionIn=="none"?0:aF.speedIn,H)}}}},c=function(){if(aF.enableEscapeButton||aF.enableKeyboardNav){aG(document).bind("keydown.fb",function(b){if(b.keyCode==27&&aF.enableEscapeButton){b.preventDefault();aG.fancybox.close()}else{if((b.keyCode==37||b.keyCode==39)&&aF.enableKeyboardNav&&b.target.tagName!=="INPUT"&&b.target.tagName!=="TEXTAREA"&&b.target.tagName!=="SELECT"){b.preventDefault();aG.fancybox[b.keyCode==37?"prev":"next"]()}}})}if(aF.showNavArrows){if(aF.cyclic&&az.length>1||av!==0){am.show()}if(aF.cyclic&&az.length>1||av!=az.length-1){al.show()}}else{am.hide();al.hide()}},H=function(){if(!aG.support.opacity){aA.get(0).style.removeAttribute("filter");aD.get(0).style.removeAttribute("filter")}aE.autoDimensions&&aA.css("height","auto");aD.css("height","auto");ar&&ar.length&&ax.show();aF.showCloseButton&&ai.show();c();aF.hideOnContentClick&&aA.bind("click",aG.fancybox.close);aF.hideOnOverlayClick&&ap.bind("click",aG.fancybox.close);aG(window).bind("resize.fb",aG.fancybox.resize);aF.centerOnScroll&&aG(window).bind("scroll.fb",aG.fancybox.center);if(aF.type=="iframe"){aG('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(aG.browser.msie?'allowtransparency="true""':"")+' scrolling="'+aE.scrolling+'" src="'+aF.href+'"></iframe>').appendTo(aA)}aD.show();aC=false;aG.fancybox.center();aF.onComplete(az,av,aF);var b,d;if(az.length-1>av){b=az[av+1].href;if(typeof b!=="undefined"&&b.match(ae)){d=new Image;d.src=b}}if(av>0){b=az[av-1].href;if(typeof b!=="undefined"&&b.match(ae)){d=new Image;d.src=b}}},C=function(b){var d={width:parseInt(at.width+(aB.width-at.width)*b,10),height:parseInt(at.height+(aB.height-at.height)*b,10),top:parseInt(at.top+(aB.top-at.top)*b,10),left:parseInt(at.left+(aB.left-at.left)*b,10)};if(typeof aB.opacity!=="undefined"){d.opacity=b<0.5?0.5:b}aD.css(d);aA.css({width:d.width-aF.padding*2,height:d.height-an*b-aF.padding*2})},x=function(){return[aG(window).width()-aF.margin*2,aG(window).height()-aF.margin*2,aG(document).scrollLeft()+aF.margin,aG(document).scrollTop()+aF.margin]},g=function(){var b=x(),f={},e=aF.autoScale,d=aF.padding*2;f.width=aF.width.toString().indexOf("%")>-1?parseInt(b[0]*parseFloat(aF.width)/100,10):aF.width+d;f.height=aF.height.toString().indexOf("%")>-1?parseInt(b[1]*parseFloat(aF.height)/100,10):aF.height+d;if(e&&(f.width>b[0]||f.height>b[1])){if(aE.type=="image"||aE.type=="swf"){e=aF.width/aF.height;if(f.width>b[0]){f.width=b[0];f.height=parseInt((f.width-d)/e+d,10)}if(f.height>b[1]){f.height=b[1];f.width=parseInt((f.height-d)*e+d,10)}}else{f.width=Math.min(f.width,b[0]);f.height=Math.min(f.height,b[1])}}f.top=parseInt(Math.max(b[3]-20,b[3]+(b[1]-f.height-40)*0.5),10);f.left=parseInt(Math.max(b[2]-20,b[2]+(b[0]-f.width-40)*0.5),10);return f},w=function(){var b=aE.orig?aG(aE.orig):false,d={};if(b&&b.length){d=b.offset();d.top+=parseInt(b.css("paddingTop"),10)||0;d.left+=parseInt(b.css("paddingLeft"),10)||0;d.top+=parseInt(b.css("border-top-width"),10)||0;d.left+=parseInt(b.css("border-left-width"),10)||0;d.width=b.width();d.height=b.height();d={width:d.width+aF.padding*2,height:d.height+aF.padding*2,top:d.top-aF.padding-20,left:d.left-aF.padding-20}}else{b=x();d={width:aF.padding*2,height:aF.padding*2,top:parseInt(b[3]+b[1]*0.5,10),left:parseInt(b[2]+b[0]*0.5,10)}}return d},a=function(){if(aq.is(":visible")){aG("div",aq).css("top",ac*-40+"px");ac=(ac+1)%12}else{clearInterval(ad)}};aG.fn.fancybox=function(b){if(!aG(this).length){return this}aG(this).data("fancybox",aG.extend({},b,aG.metadata?aG(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!aC){aC=true;aG(this).blur();aw=[];au=0;d=aG(this).attr("rel")||"";if(!d||d==""||d==="nofollow"){aw.push(this)}else{aw=aG("a[rel="+d+"], area[rel="+d+"]");au=aw.index(this)}af()}});return this};aG.fancybox=function(b,h){var e;if(!aC){aC=true;e=typeof h!=="undefined"?h:{};aw=[];au=parseInt(e.index,10)||0;if(aG.isArray(b)){for(var d=0,f=b.length;d<f;d++){if(typeof b[d]=="object"){aG(b[d]).data("fancybox",aG.extend({},e,b[d]))}else{b[d]=aG({}).data("fancybox",aG.extend({content:b[d]},e))}}aw=jQuery.merge(aw,b)}else{if(typeof b=="object"){aG(b).data("fancybox",aG.extend({},e,b))}else{b=aG({}).data("fancybox",aG.extend({content:b},e))}aw.push(b)}if(au>aw.length||au<0){au=0}af()}};aG.fancybox.showActivity=function(){clearInterval(ad);aq.show();ad=setInterval(a,66)};aG.fancybox.hideActivity=function(){aq.hide()};aG.fancybox.next=function(){return aG.fancybox.pos(av+1)};aG.fancybox.prev=function(){return aG.fancybox.pos(av-1)};aG.fancybox.pos=function(b){if(!aC){b=parseInt(b);aw=az;if(b>-1&&b<az.length){au=b;af()}else{if(aF.cyclic&&az.length>1){au=b>=az.length?0:az.length-1;af()}}}};aG.fancybox.cancel=function(){if(!aC){aC=true;aG.event.trigger("fancybox-cancel");aa();aE.onCancel(aw,au,aE);aC=false}};aG.fancybox.close=function(){function b(){ap.fadeOut("fast");ax.empty().hide();aD.hide();aG.event.trigger("fancybox-cleanup");aA.empty();aF.onClosed(az,av,aF);az=aE=[];av=au=0;aF=aE={};aC=false}if(!(aC||aD.is(":hidden"))){aC=true;if(aF&&false===aF.onCleanup(az,av,aF)){aC=false}else{aa();aG(ai.add(am).add(al)).hide();aG(aA.add(ap)).unbind();aG(window).unbind("resize.fb scroll.fb");aG(document).unbind("keydown.fb");aA.find("iframe").attr("src",ab&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");aF.titlePosition!=="inside"&&ax.empty();aD.stop();if(aF.transitionOut=="elastic"){at=w();var d=aD.position();aB={top:d.top,left:d.left,width:aD.width(),height:aD.height()};if(aF.opacity){aB.opacity=1}ax.empty().hide();ak.prop=1;aG(ak).animate({prop:0},{duration:aF.speedOut,easing:aF.easingOut,step:C,complete:b})}else{aD.fadeOut(aF.transitionOut=="none"?0:aF.speedOut,b)}}}};aG.fancybox.resize=function(){ap.is(":visible")&&ap.css("height",aG(document).height());aG.fancybox.center(true)};aG.fancybox.center=function(b){var e,d;if(!aC){d=b===true?1:0;e=x();!d&&(aD.width()>e[0]||aD.height()>e[1])||aD.stop().animate({top:parseInt(Math.max(e[3]-20,e[3]+(e[1]-aA.height()-40)*0.5-aF.padding)),left:parseInt(Math.max(e[2]-20,e[2]+(e[0]-aA.width()-40)*0.5-aF.padding))},typeof b=="number"?b:200)}};aG.fancybox.init=function(){if(!aG("#fancybox-wrap").length){aG("body").append(ay=aG('<div id="fancybox-tmp"></div>'),aq=aG('<div id="fancybox-loading"><div></div></div>'),ap=aG('<div id="fancybox-overlay"></div>'),aD=aG('<div id="fancybox-wrap"></div>'));aj=aG('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(aD);aj.append(aA=aG('<div id="fancybox-content"></div>'),ai=aG('<a id="fancybox-close"></a>'),ax=aG('<div id="fancybox-title"></div>'),am=aG('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),al=aG('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));ai.click(aG.fancybox.close);aq.click(aG.fancybox.cancel);am.click(function(b){b.preventDefault();aG.fancybox.prev()});al.click(function(b){b.preventDefault();aG.fancybox.next()});aG.fn.mousewheel&&aD.bind("mousewheel.fb",function(b,d){if(aC){b.preventDefault()}else{if(aG(b.target).get(0).clientHeight==0||aG(b.target).get(0).scrollHeight===aG(b.target).get(0).clientHeight){b.preventDefault();aG.fancybox[d>0?"prev":"next"]()}}});aG.support.opacity||aD.addClass("fancybox-ie");if(ab){aq.addClass("fancybox-ie6");aD.addClass("fancybox-ie6");aG('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(aj)}}};aG.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};aG(document).ready(function(){aG.fancybox.init()})})(jQuery);
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function(c){function a(f){var d=f||window.event,g=[].slice.call(arguments,1),l=0,j=0,k=0;f=c.event.fix(d);f.type="mousewheel";if(f.wheelDelta){l=f.wheelDelta/120}if(f.detail){l=-f.detail/3}k=l;if(d.axis!==undefined&&d.axis===d.HORIZONTAL_AXIS){k=0;j=-1*l}if(d.wheelDeltaY!==undefined){k=d.wheelDeltaY/120}if(d.wheelDeltaX!==undefined){j=-1*d.wheelDeltaX/120}g.unshift(f,l,j,k);return c.event.handle.apply(this,g)}var b=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=b.length;d;){this.addEventListener(b[--d],a,false)}}else{this.onmousewheel=a}},teardown:function(){if(this.removeEventListener){for(var d=b.length;d;){this.removeEventListener(b[--d],a,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}})})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});$(window).load(function(){$("#contactForm").live("submit",function(g){g.preventDefault();var f=true;if(b("#email")){f=false}if(e("#name")){f=false}if(a("#contactAntispam","nospam")){f=false}if(e("#text")){f=false}if(f){$("#ajax-validation-error, #ajax-submit-error").hide();$("#submit").css("visibility","hidden");$("#ajax-loading-expose").show();$("#ajax-loading").fadeIn("slow");$.post("/contact/",$(this).serialize()+"&ajax=1",function(h){if(parseInt(h)==-1){$("#ajax-validation-error").show()}else{if(parseInt(h)==1){$(window).unbind("scroll");$("#contactForm").fadeOut("slow",function(){$("#contact-form-submitted").fadeIn("slow",function(){$.scrollTo($("#contact-us"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})})})}else{$("#ajax-submit-error").show()}}$("#submit").css("visibility","visible");$("#ajax-loading-expose").hide();$("#ajax-loading").fadeOut("slow")}).error(function(){$("#submit").css("visibility","visible");$("#ajax-loading").fadeOut("slow");$("#ajax-loading-expose").hide();$("#ajax-submit-error").show()})}else{$("#ajax-loading").fadeOut("slow");$("#ajax-loading-expose").hide();$("#submit").css("visibility","visible");$("#ajax-validation-error").fadeIn("slow")}});function d(f){$(f).addClass("validation-error");$(f).prev().addClass("validation-error-label")}function c(f){$(f).removeClass("validation-error");$(f).prev().removeClass("validation-error-label")}function e(f){if($(f).val()==""){d(f);return true}else{c(f);return false}}function a(f,g){if($(f).val()!=g){d(f);return true}else{c(f);return false}}function b(f){var g=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;if(g.test($(f).val())){c(f);return false}else{d(f);return true}}$("#text").bind("mouseover focusin",function(){$(".form-text-bg").clearQueue().stop();$(".form-text-bg").animate({opacity:"0.3"},400)});$("#text").bind("mouseleave focusout",function(){if($(this).val().length==0){$(".form-text-bg").clearQueue().stop();$(".form-text-bg").animate({opacity:"1"},400)}});if(jQuery.support.opacity){$("#lights").animate({opacity:"1"},1600,function(){$(".first_nav").animate({top:"0"},600)})}else{$(".first_nav").animate({top:"0"},600)}last_pos=getPageScroll();$(window).scroll(function(){autoScrolling()});$(".main_nav").localScroll({onBefore:function(){last_pos=getPageScroll();$(window).unbind("scroll")},onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}});if($("#welcome").length>0){welcome_height=$("#welcome").height();welcome_position=$("#welcome").offset();welcome_bottom=welcome_position.top+welcome_height;about_height=$("#about-us").height();about_position=$("#about-us").offset();about_bottom=about_position.top+about_height;work_height=$("#our-work").height();work_position=$("#our-work").offset();work_bottom=work_position.top+work_height;contact_height=$("#contact-us").height();contact_position=$("#contact-us").offset();contact_bottom=contact_position.top+contact_height}$(".reference").hover(function(){$(this).css("z-index","10");$(this).siblings(".reference").clearQueue().stop().css("z-index","1");if(jQuery.support.opacity){$(this).siblings(".reference").clearQueue().stop().fadeTo("normal",0.2)}var f=$(this).children("a").width();if($(this).hasClass("last-one")){$(this).children(".reference-details").clearQueue().stop().removeClass("visuallyhidden").animate({left:-f},{duration:300,specialEasing:{left:"easeOutExpo"}})}else{$(this).children(".reference-details").clearQueue().stop().removeClass("visuallyhidden").animate({left:f},{duration:300,specialEasing:{left:"easeOutExpo"}})}},function(){$(this).siblings(".reference").clearQueue().stop().css("z-index","3");if(jQuery.support.opacity){$(this).siblings(".reference").clearQueue().stop().fadeTo("slow",1)}if($(this).hasClass("last-one")){$(this).children(".reference-details").clearQueue().stop().animate({left:0},{duration:300,specialEasing:{left:"easeInExpo"}})}else{$(this).children(".reference-details").clearQueue().stop().animate({left:0},{duration:300,specialEasing:{left:"easeInExpo"}})}});$(".big-reference").fancybox({transitionIn:"elastic",transitionOut:"elastic",easingIn:"easeOutElastic",easingOut:"easeInExpo",speedIn:1000,speedOut:200,overlayShow:true,overlayColor:"#000"})});function autoScrolling(){if($("#welcome").length>0){pos=getPageScroll();if(pos[1]>welcome_bottom&&pos[1]<about_position.top-100){if(last_pos[1]<pos[1]){$(window).unbind("scroll");$.scrollTo($("#about-us"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}else{if(last_pos[1]>pos[1]){$(window).unbind("scroll");$.scrollTo($("#welcome"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}}}else{if(pos[1]>about_bottom&&pos[1]<work_position.top-100){if(last_pos[1]<pos[1]){$(window).unbind("scroll");$.scrollTo($("#our-work"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}else{if(last_pos[1]>pos[1]){$(window).unbind("scroll");$.scrollTo($("#about-us"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}}}else{if(pos[1]>work_bottom&&pos[1]<contact_position.top-50){if(last_pos[1]<pos[1]){$(window).unbind("scroll");$.scrollTo($("#contact-us"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}else{if(last_pos[1]>pos[1]){$(window).unbind("scroll");$.scrollTo($("#our-work"),800,{axis:"y",onAfter:function(){last_pos=getPageScroll();$(window).bind("scroll",function(){autoScrolling()})}})}}}}}}}function getPageScroll(){var b,a;if(self.pageYOffset){a=self.pageYOffset;b=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}else{if(document.body){a=document.body.scrollTop;b=document.body.scrollLeft}}}return new Array(b,a)};
