jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(b,a,d,c,f){return jQuery.easing[jQuery.easing.def](b,a,d,c,f)},easeInQuad:function(b,a,d,c,f){return c*(a/=f)*a+d},easeOutQuad:function(b,a,d,c,f){return-c*(a/=f)*(a-2)+d},easeInOutQuad:function(b,a,d,c,f){if((a/=f/2)<1)return c/2*a*a+d;return-c/2*(--a*(a-2)-1)+d},easeInCubic:function(b,a,d,c,f){return c*(a/=f)*a*a+d},easeOutCubic:function(b,a,d,c,f){return c*((a=a/f-1)*a*a+1)+d},easeInOutCubic:function(b,a,d,c,f){if((a/=f/2)<1)return c/
2*a*a*a+d;return c/2*((a-=2)*a*a+2)+d},easeInQuart:function(b,a,d,c,f){return c*(a/=f)*a*a*a+d},easeOutQuart:function(b,a,d,c,f){return-c*((a=a/f-1)*a*a*a-1)+d},easeInOutQuart:function(b,a,d,c,f){if((a/=f/2)<1)return c/2*a*a*a*a+d;return-c/2*((a-=2)*a*a*a-2)+d},easeInQuint:function(b,a,d,c,f){return c*(a/=f)*a*a*a*a+d},easeOutQuint:function(b,a,d,c,f){return c*((a=a/f-1)*a*a*a*a+1)+d},easeInOutQuint:function(b,a,d,c,f){if((a/=f/2)<1)return c/2*a*a*a*a*a+d;return c/2*((a-=2)*a*a*a*a+2)+d},easeInSine:function(b,
a,d,c,f){return-c*Math.cos(a/f*(Math.PI/2))+c+d},easeOutSine:function(b,a,d,c,f){return c*Math.sin(a/f*(Math.PI/2))+d},easeInOutSine:function(b,a,d,c,f){return-c/2*(Math.cos(Math.PI*a/f)-1)+d},easeInExpo:function(b,a,d,c,f){return a==0?d:c*Math.pow(2,10*(a/f-1))+d},easeOutExpo:function(b,a,d,c,f){return a==f?d+c:c*(-Math.pow(2,-10*a/f)+1)+d},easeInOutExpo:function(b,a,d,c,f){if(a==0)return d;if(a==f)return d+c;if((a/=f/2)<1)return c/2*Math.pow(2,10*(a-1))+d;return c/2*(-Math.pow(2,-10*--a)+2)+d},
easeInCirc:function(b,a,d,c,f){return-c*(Math.sqrt(1-(a/=f)*a)-1)+d},easeOutCirc:function(b,a,d,c,f){return c*Math.sqrt(1-(a=a/f-1)*a)+d},easeInOutCirc:function(b,a,d,c,f){if((a/=f/2)<1)return-c/2*(Math.sqrt(1-a*a)-1)+d;return c/2*(Math.sqrt(1-(a-=2)*a)+1)+d},easeInElastic:function(b,a,d,c,f){var b=1.70158,g=0,h=c;if(a==0)return d;if((a/=f)==1)return d+c;g||(g=f*0.3);h<Math.abs(c)?(h=c,b=g/4):b=g/(2*Math.PI)*Math.asin(c/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*f-b)*2*Math.PI/g))+d},easeOutElastic:function(b,
a,d,c,f){var b=1.70158,g=0,h=c;if(a==0)return d;if((a/=f)==1)return d+c;g||(g=f*0.3);h<Math.abs(c)?(h=c,b=g/4):b=g/(2*Math.PI)*Math.asin(c/h);return h*Math.pow(2,-10*a)*Math.sin((a*f-b)*2*Math.PI/g)+c+d},easeInOutElastic:function(b,a,d,c,f){var b=1.70158,g=0,h=c;if(a==0)return d;if((a/=f/2)==2)return d+c;g||(g=f*0.3*1.5);h<Math.abs(c)?(h=c,b=g/4):b=g/(2*Math.PI)*Math.asin(c/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*f-b)*2*Math.PI/g)+d;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*f-b)*
2*Math.PI/g)*0.5+c+d},easeInBack:function(b,a,d,c,f,g){g==void 0&&(g=1.70158);return c*(a/=f)*a*((g+1)*a-g)+d},easeOutBack:function(b,a,d,c,f,g){g==void 0&&(g=1.70158);return c*((a=a/f-1)*a*((g+1)*a+g)+1)+d},easeInOutBack:function(b,a,d,c,f,g){g==void 0&&(g=1.70158);if((a/=f/2)<1)return c/2*a*a*(((g*=1.525)+1)*a-g)+d;return c/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+d},easeInBounce:function(b,a,d,c,f){return c-jQuery.easing.easeOutBounce(b,f-a,0,c,f)+d},easeOutBounce:function(b,a,d,c,f){return(a/=f)<1/
2.75?c*7.5625*a*a+d:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+0.75)+d:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+0.9375)+d:c*(7.5625*(a-=2.625/2.75)*a+0.984375)+d},easeInOutBounce:function(b,a,d,c,f){if(a<f/2)return jQuery.easing.easeInBounce(b,a*2,0,c,f)*0.5+d;return jQuery.easing.easeOutBounce(b,a*2-f,0,c,f)*0.5+c*0.5+d}});
(function(b){b.address=function(){var a=function(a){b(b.address).trigger(b.extend(b.Event(a),function(){for(var a={},i=b.address.parameterNames(),c=0,k=i.length;c<k;c++)a[i[c]]=b.address.parameter(i[c]);return{value:b.address.value(),path:b.address.path(),pathNames:b.address.pathNames(),parameterNames:i,parameters:a,queryString:b.address.queryString()}}.call(b.address)))},d=function(a,i,c){b(b.address).bind(a,i,c);return b.address},c=function(){var b=n.href.indexOf("#");return b!=-1?Y(Q(h(n.href.substr(b+
1),q))):""},f=function(b,a){s.strict&&(b=a?b.substr(0,1)!="/"?"/"+b:b:b==""?"/":b);return b},g=function(b,a){return G&&n.protocol=="file:"?a?t.replace(/\?/,"%3F"):t.replace(/%253F/,"?"):b},h=function(b,a){if(s.crawlable&&a)return(b!=""?"!":"")+b;return b.replace(/^\!/,"")},u=function(b,a){return parseInt(b.css(a),10)},v=function(b){for(var a,i,c=0,k=b.childNodes.length;c<k;c++)if(b.childNodes[c].src&&(a=String(b.childNodes[c].src)),i=v(b.childNodes[c]))a=i;return a},l=function(){if(!R){var b=c(),
a=t!=b;if(H&&x<523){if(L!=O.length)L=O.length,typeof J[L-1]!=z&&(t=J[L-1]),D(q)}else G&&x<7&&a?n.reload():a&&(t=b,D(q))}},D=function(b){a(A);a(b?m:I);M(o,10)},o=function(){var a=(n.pathname+(/\/$/.test(n.pathname)?"":"/")+(b.address?b.address.value():"")).replace(/\/\//,"/").replace(/^\/$/,""),i=E[s.tracker];typeof i==y?i(a):typeof urchinTracker==y?urchinTracker(a):typeof pageTracker!=z&&typeof pageTracker._trackPageview==y?pageTracker._trackPageview(a):typeof _gaq!=z&&typeof _gaq.push==y&&_gaq.push(["_trackPageview",
a])},N=function(){var b=B.contentWindow.document;b.open();b.write("<html><head><title>"+w.title+"</title><script>var "+j+' = "'+c()+'";<\/script></head></html>');b.close()},P=function(){if(!Z){Z=r;var i=b("body").ajaxComplete(function(){k.call(this)}).trigger("ajaxComplete");s.wrap&&(b("body > *").wrapAll('<div style="padding:'+(u(i,"marginTop")+u(i,"paddingTop"))+"px "+(u(i,"marginRight")+u(i,"paddingRight"))+"px "+(u(i,"marginBottom")+u(i,"paddingBottom"))+"px "+(u(i,"marginLeft")+u(i,"paddingLeft"))+
'px;" />').parent().wrap('<div id="'+j+'" style="height:100%; overflow:auto;'+(H?window.statusbar.visible&&!/chrome/i.test(T)?"":" resize:both;":"")+'" />'),b("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"}),H&&b('<style type="text/css" />').appendTo("head").text("#"+j+"::-webkit-resizer { background-color: #fff; }"));G&&x<8?(i=w.getElementsByTagName("frameset")[0],B=w.createElement((i?"":"i")+"frame"),i?(i.insertAdjacentElement("beforeEnd",B),i[i.cols?"cols":"rows"]+=",0",
B.src="javascript:"+q,B.noResize=r,B.frameBorder=B.frameSpacing=0):(B.src="javascript:"+q,B.style.display="none",w.body.insertAdjacentElement("afterBegin",B)),M(function(){b(B).bind("load",function(){var b=B.contentWindow;t=typeof b[j]!=z?b[j]:"";if(t!=c())D(q),n.hash=g(h(t,r),r)});typeof B.contentWindow[j]==z&&N()},50)):H&&(x<418&&(b(w.body).append('<form id="'+j+'" style="position:absolute;top:-9999px;" method="get"></form>'),U=w.getElementById(j)),typeof n[j]==z&&(n[j]={}),typeof n[j][n.pathname]!=
z&&(J=n[j][n.pathname].split(",")));M(function(){a("init");D(q)},1);G&&x>7||!G&&"on"+e in E?E.addEventListener?E.addEventListener(e,l,!1):E.attachEvent&&E.attachEvent("on"+e,l):da(l,50);b("a").filter("[rel*=address:]").address()}},i=function(){E.removeEventListener?E.removeEventListener(e,l,!1):E.detachEvent&&E.detachEvent("on"+e,l)},k=function(){var a=n.pathname.replace(/\/$/,"");b("a:not([href^=http])",this).each(function(){var i=b(this).attr("href").replace(RegExp(a+"/?$"),"");(i==""||i.indexOf("_escaped_fragment_")!=
-1)&&b(this).attr("href","#"+decodeURIComponent(i.replace(/\/(.*)\?_escaped_fragment_=(.*)$/,"!$2")))})},j="jQueryAddress",y="function",z="undefined",e="hashchange",A="change",m="internalChange",I="externalChange",r=!0,q=!1,s={autoUpdate:r,crawlable:q,history:r,strict:r,wrap:q},C=b.browser,x=parseFloat(b.browser.version),aa=C.mozilla,G=C.msie,F=C.opera,H=C.safari,V=q,E;try{E=top.document!==void 0?top:window}catch(ea){E=window}var w=E.document,O=E.history,n=E.location,da=setInterval,M=setTimeout,Q=
decodeURI,Y=encodeURI,T=navigator.userAgent,B,U,K=v(document),ba=K?K.indexOf("?"):-1,W=w.title,L=O.length,R=q,Z=q,X=r,ca=r,S=q,J=[],t=c();G&&(x=parseFloat(T.substr(T.indexOf("MSIE")+4)),w.documentMode&&w.documentMode!=x&&(x=w.documentMode!=8?7:8),b(document).bind("propertychange",function(){if(w.title!=W&&w.title.indexOf("#"+c())!=-1)w.title=W}));if(V=aa&&x>=1||G&&x>=6||F&&x>=9.5||H&&x>=312){for(C=1;C<L;C++)J.push("");J.push(t);if(G&&n.hash!=t)n.hash="#"+g(h(t,r),r);if(F)history.navigationMode="compatible";
if(K&&ba!=-1){K=K.substr(ba+1).split("&");for(C=0;C<K.length;C++)F=K[C].split("="),/^(autoUpdate|crawlable|history|strict|wrap)$/.test(F[0])&&(s[F[0]]=isNaN(F[1])?/^(true|yes)$/i.test(F[1]):parseInt(F[1],10)!==0),/^tracker$/.test(F[0])&&(s[F[0]]=F[1])}document.readyState=="complete"&&P();b(P);b(window).bind("unload",i)}else!V&&c()!=""||H&&x<418&&c()!=""&&n.search!=""?(w.open(),w.write('<html><head><meta http-equiv="refresh" content="0;url='+encodeURI(n.href.substr(0,n.href.indexOf("#")))+'" /></head></html>'),
w.close()):o();return{bind:function(b,a,i){return d(b,a,i)},init:function(b){return d("init",b)},change:function(b){return d(A,b)},internalChange:function(b){return d(m,b)},externalChange:function(b){return d(I,b)},baseURL:function(){var b=n.href;b.indexOf("#")!=-1&&(b=b.substr(0,b.indexOf("#")));/\/$/.test(b)&&(b=b.substr(0,b.length-1));return b},autoUpdate:function(b){if(b!==void 0)return s.autoUpdate=b,this;return s.autoUpdate},crawlable:function(b){if(b!==void 0)return s.crawlable=b,this;return s.crawlable},
history:function(b){if(b!==void 0)return s.history=b,this;return s.history},strict:function(b){if(b!==void 0)return s.strict=b,this;return s.strict},tracker:function(b){if(b!==void 0)return s.tracker=b,this;return s.tracker},wrap:function(b){if(b!==void 0)return s.wrap=b,this;return s.wrap},update:function(){S=r;this.value(t);S=q;return this},title:function(b){if(b!==void 0)return b=Q(b),M(function(){W=w.title=b;if(ca&&B&&B.contentWindow&&B.contentWindow.document)B.contentWindow.document.title=b,
ca=q;!X&&aa&&n.replace(n.href.indexOf("#")!=-1?n.href:n.href+"#");X=q},50),this;return w.title},value:function(b){if(b!==void 0){b=Y(Q(f(b,r)));b=="/"&&(b="");if(t==b&&!S)return;X=r;t=b;if(s.autoUpdate||S){R=r;D(r);J[O.length]=t;if(H)if(s.history)if(n[j][n.pathname]=J.toString(),L=O.length+1,x<418){if(n.search=="")U.action="#"+h(t,r),U.submit()}else if(x<523||t==""){b=w.createEvent("MouseEvents");b.initEvent("click",r,r);var a=w.createElement("a");a.href="#"+h(t,r);a.dispatchEvent(b)}else n.hash=
"#"+h(t,r);else n.replace("#"+h(t,r));else if(t!=c())s.history?n.hash="#"+g(h(t,r),r):n.replace("#"+h(t,r));G&&x<8&&s.history&&M(N,50);H?M(function(){R=q},1):R=q}return this}if(!V)return null;return Q(f(g(t,q),q))},path:function(b){if(b!==void 0){var a=this.queryString(),i=this.hash();this.value(b+(a?"?"+a:"")+(i?"#"+i:""));return this}return this.value().split("#")[0].split("?")[0]},queryString:function(b){if(b!==void 0){var a=this.hash();this.value(this.path()+(b?"?"+b:"")+(a?"#"+a:""));return this}b=
this.value().split("?");return b.slice(1,b.length).join("?").split("#")[0]},parameter:function(a,i,c){var k,e;if(i!==void 0){var d=this.parameterNames();e=[];for(k=0;k<d.length;k++){var f=d[k],j=this.parameter(f);typeof j=="string"&&(j=[j]);f==a&&(j=i===null||i==""?[]:c?j.concat([i]):[i]);for(var g=0;g<j.length;g++)e.push(f+"="+j[g])}b.inArray(a,d)==-1&&i!==null&&i!=""&&e.push(a+"="+i);this.queryString(e.join("&"));return this}if(i=this.queryString()){e=i.split("&");i=[];for(k=0;k<e.length;k++)c=
e[k].split("="),c[0]==a&&i.push(c[1]);if(i.length!==0)return i.length!=1?i:i[0]}},pathNames:function(){var b=this.path(),a=b.replace(/\/{2,9}/g,"/").split("/");(b.substr(0,1)=="/"||b.length===0)&&a.splice(0,1);b.substr(b.length-1,1)=="/"&&a.splice(a.length-1,1);return a},parameterNames:function(){var a=this.queryString(),i=[];if(a&&a.indexOf("=")!=-1)for(var a=a.split("&"),c=0;c<a.length;c++){var k=a[c].split("=")[0];b.inArray(k,i)==-1&&i.push(k)}return i},hash:function(b){if(b!==void 0)return this.value(this.value().split("#")[0]+
(b?"#"+b:"")),this;b=this.value().split("#");return b.slice(1,b.length).join("#")}}}();b.fn.address=function(a){var d=function(){if(b(this).is("a")){var c=a?a.call(this):/address:/.test(b(this).attr("rel"))?b(this).attr("rel").split("address:")[1].split(" ")[0]:b(this).attr("href").replace(/^#\!?/,"");b.address.value(c);return!1}};b(this).click(d).live("click",d);b(this).live("submit",function(){if(b(this).is("form")){var c=a?a.call(this):b(this).attr("action")+"?"+b(this).serialize();b.address.value(c);
return!1}});return this}})(jQuery);
(function(b){function a(a){var f;if(a&&a.constructor==Array&&a.length==3)return a;if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))return[parseInt(f[1]),parseInt(f[2]),parseInt(f[3])];if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a))return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55];if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))return[parseInt(f[1],16),parseInt(f[2],
16),parseInt(f[3],16)];if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a))return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)];return d[b.trim(a).toLowerCase()]}b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,d){b.fx.step[d]=function(c){if(c.state==0){var h;h=c.elem;var u=d,v;do{v=b.curCSS(h,u);if(v!=""&&v!="transparent"||b.nodeName(h,"body"))break;u="backgroundColor"}while(h=h.parentNode);
h=a(v);c.start=h;c.end=a(c.end)}c.elem.style[d]="rgb("+[Math.max(Math.min(parseInt(c.pos*(c.end[0]-c.start[0])+c.start[0]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[1]-c.start[1])+c.start[1]),255),0),Math.max(Math.min(parseInt(c.pos*(c.end[2]-c.start[2])+c.start[2]),255),0)].join(",")+")"}});var d={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,
100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,
128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
(function(b){function a(a,c){return parseInt(b.curCSS(a.jquery?a[0]:a,c,!0))||0}b.dimensions={version:"1.2"};b.each(["Height","Width"],function(d,c){b.fn["inner"+c]=function(){if(this[0]){var b=c=="Height"?"Top":"Left",d=c=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+b)+a(this,"padding"+d)}};b.fn["outer"+c]=function(d){if(this[0]){var g=c=="Height"?"Top":"Left",h=c=="Height"?"Bottom":"Right",d=b.extend({margin:!1},d||{});return(this.is(":visible")?
this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+g+"Width")+a(this,"border"+h+"Width")+a(this,"padding"+g)+a(this,"padding"+h))+(d.margin?a(this,"margin"+g)+a(this,"margin"+h):0)}}});b.each(["Left","Top"],function(a,c){b.fn["scroll"+c]=function(a){if(this[0])return a!=void 0?this.each(function(){this==window||this==document?window.scrollTo(c=="Left"?a:b(window).scrollLeft(),c=="Top"?a:b(window).scrollTop()):this["scroll"+c]=a}):this[0]==window||this[0]==document?self[c=="Left"?"pageXOffset":
"pageYOffset"]||b.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]}});b.fn.extend({position:function(){var b=this[0],c,f,g;b&&(g=this.offsetParent(),c=this.offset(),f=g.offset(),c.top-=a(b,"marginTop"),c.left-=a(b,"marginLeft"),f.top+=a(g,"borderTopWidth"),f.left+=a(g,"borderLeftWidth"),c={top:c.top-f.top,left:c.left-f.left});return c},offsetParent:function(){for(var a=this[0].offsetParent;a&&!/^body|html$/i.test(a.tagName)&&b.css(a,"position")=="static";)a=
a.offsetParent;return b(a)}})})(jQuery);
(function(b){function a(a){b.fn.cycle.debug&&d(a)}function d(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function c(a,c,j){if(a.cycleStop==void 0)a.cycleStop=0;if(c===void 0||c===null)c={};if(c.constructor==String)switch(c){case "stop":return a.cycleStop++,a.cycleTimeout&&clearTimeout(a.cycleTimeout),a.cycleTimeout=0,b(a).removeData("cycle.opts"),!1;case "pause":return a.cyclePause=1,!1;case "resume":a.cyclePause=0;if(j===!0){c=b(a).data("cycle.opts");
if(!c)return d("options not found, can not resume"),!1;if(a.cycleTimeout)clearTimeout(a.cycleTimeout),a.cycleTimeout=0;l(c.elements,c,1,1)}return!1;case "prev":case "next":a=b(a).data("cycle.opts");if(!a)return d('options not found, "prev/next" ignored'),!1;b.fn.cycle[c](a);return!1;default:c={fx:c}}else if(c.constructor==Number){var f=c,c=b(a).data("cycle.opts");if(!c)return d("options not found, can not advance slide"),!1;if(f<0||f>=c.elements.length)return d("invalid slide index: "+f),!1;c.nextSlide=
f;if(a.cycleTimeout)clearTimeout(a.cycleTimeout),a.cycleTimeout=0;if(typeof j=="string")c.oneTimeFx=j;l(c.elements,c,1,f>=c.currSlide);return!1}return c}function f(a,c){if(!b.support.opacity&&c.cleartype&&a.style.filter)try{a.style.removeAttribute("filter")}catch(d){}}function g(a,c,j,g,z){var e=b.extend({},b.fn.cycle.defaults,g||{},b.metadata?a.metadata():b.meta?a.data():{});if(e.autostop)e.countdown=e.autostopCount||j.length;var A=a[0];a.data("cycle.opts",e);e.$cont=a;e.stopCount=A.cycleStop;e.elements=
j;e.before=e.before?[e.before]:[];e.after=e.after?[e.after]:[];e.after.unshift(function(){e.busy=0});!b.support.opacity&&e.cleartype&&e.after.push(function(){f(this,e)});e.continuous&&e.after.push(function(){l(j,e,0,!e.rev)});h(e);!b.support.opacity&&e.cleartype&&!e.cleartypeNoBg&&P(c);a.css("position")=="static"&&a.css("position","relative");e.width&&a.width(e.width);e.height&&e.height!="auto"&&a.height(e.height);if(e.startingSlide)e.startingSlide=parseInt(e.startingSlide);if(e.random){e.randomMap=
[];for(A=0;A<j.length;A++)e.randomMap.push(A);e.randomMap.sort(function(){return Math.random()-0.5});e.randomIndex=0;e.startingSlide=e.randomMap[0]}else if(e.startingSlide>=j.length)e.startingSlide=0;e.currSlide=e.startingSlide=e.startingSlide||0;var m=e.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(a){a=m?a>=m?j.length-(a-m):m-a:j.length-a;b(this).css("z-index",a)});b(j[m]).css("opacity",1).show();f(j[m],e);e.fit&&e.width&&c.width(e.width);e.fit&&e.height&&e.height!=
"auto"&&c.height(e.height);if(e.containerResize&&!a.innerHeight()){for(var I=A=0,r=0;r<j.length;r++){var q=b(j[r]),s=q[0],C=q.outerWidth(),q=q.outerHeight();if(!C)C=s.offsetWidth;if(!q)q=s.offsetHeight;A=C>A?C:A;I=q>I?q:I}A>0&&I>0&&a.css({width:A+"px",height:I+"px"})}e.pause&&a.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(u(e)===!1)return!1;var x=!1;g.requeueAttempts=g.requeueAttempts||0;c.each(function(){var a=b(this);this.cycleH=e.fit&&e.height?e.height:a.height();this.cycleW=
e.fit&&e.width?e.width:a.width();if(a.is("img")){var a=b.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,c=b.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,i=this.cycleH==0&&this.cycleW==0&&!this.complete;if(b.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||a||c||i)if(z.s&&e.requeueOnImageNotLoaded&&++g.requeueAttempts<100)return d(g.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,
this.cycleH),setTimeout(function(){b(z.s,z.c).cycle(g)},e.requeueTimeout),x=!0,!1;else d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return!0});if(x)return!1;e.cssBefore=e.cssBefore||{};e.animIn=e.animIn||{};e.animOut=e.animOut||{};c.not(":eq("+m+")").css(e.cssBefore);e.cssFirst&&b(c[m]).css(e.cssFirst);if(e.timeout){e.timeout=parseInt(e.timeout);if(e.speed.constructor==String)e.speed=b.fx.speeds[e.speed]||parseInt(e.speed);for(e.sync||(e.speed/=2);e.timeout-e.speed<250;)e.timeout+=
e.speed}if(e.easing)e.easeIn=e.easeOut=e.easing;if(!e.speedIn)e.speedIn=e.speed;if(!e.speedOut)e.speedOut=e.speed;e.slideCount=j.length;e.currSlide=e.lastSlide=m;if(e.random){e.nextSlide=e.currSlide;if(++e.randomIndex==j.length)e.randomIndex=0;e.nextSlide=e.randomMap[e.randomIndex]}else e.nextSlide=e.startingSlide>=j.length-1?0:e.startingSlide+1;if(!e.multiFx)if(A=b.fn.cycle.transitions[e.fx],b.isFunction(A))A(a,c,e);else if(e.fx!="custom"&&!e.multiFx)return d("unknown transition: "+e.fx,"; slideshow terminating"),
!1;a=c[m];e.before.length&&e.before[0].apply(a,[a,a,e,!0]);e.after.length>1&&e.after[1].apply(a,[a,a,e,!0]);e.next&&b(e.next).bind(e.prevNextEvent,function(){return o(e,e.rev?-1:1)});e.prev&&b(e.prev).bind(e.prevNextEvent,function(){return o(e,e.rev?1:-1)});e.pager&&N(j,e);v(e,j);return e}function h(a){a.original={before:[],after:[]};a.original.cssBefore=b.extend({},a.cssBefore);a.original.cssAfter=b.extend({},a.cssAfter);a.original.animIn=b.extend({},a.animIn);a.original.animOut=b.extend({},a.animOut);
b.each(a.before,function(){a.original.before.push(this)});b.each(a.after,function(){a.original.after.push(this)})}function u(c){var k,j,f=b.fn.cycle.transitions;if(c.fx.indexOf(",")>0){c.multiFx=!0;c.fxs=c.fx.replace(/\s*/g,"").split(",");for(k=0;k<c.fxs.length;k++){var g=c.fxs[k];j=f[g];if(!j||!f.hasOwnProperty(g)||!b.isFunction(j))d("discarding unknown transition: ",g),c.fxs.splice(k,1),k--}if(!c.fxs.length)return d("No valid transitions named; slideshow terminating."),!1}else if(c.fx=="all")for(p in c.multiFx=
!0,c.fxs=[],f)j=f[p],f.hasOwnProperty(p)&&b.isFunction(j)&&c.fxs.push(p);if(c.multiFx&&c.randomizeEffects){j=Math.floor(Math.random()*20)+30;for(k=0;k<j;k++)c.fxs.push(c.fxs.splice(Math.floor(Math.random()*c.fxs.length),1)[0]);a("randomized fx sequence: ",c.fxs)}return!0}function v(a,c){a.addSlide=function(d,f){var g=b(d),e=g[0];a.autostopCount||a.countdown++;c[f?"unshift":"push"](e);if(a.els)a.els[f?"unshift":"push"](e);a.slideCount=c.length;g.css("position","absolute");g[f?"prependTo":"appendTo"](a.$cont);
f&&(a.currSlide++,a.nextSlide++);!b.support.opacity&&a.cleartype&&!a.cleartypeNoBg&&P(g);a.fit&&a.width&&g.width(a.width);a.fit&&a.height&&a.height!="auto"&&$slides.height(a.height);e.cycleH=a.fit&&a.height?a.height:g.height();e.cycleW=a.fit&&a.width?a.width:g.width();g.css(a.cssBefore);a.pager&&b.fn.cycle.createPagerAnchor(c.length-1,e,b(a.pager),c,a);if(b.isFunction(a.onAddSlide))a.onAddSlide(g);else g.hide()}}function l(a,c,d,f){if(d&&c.busy&&c.manualTrump)b(a).stop(!0,!0),c.busy=!1;if(!c.busy){var g=
c.$cont[0],e=a[c.currSlide],h=a[c.nextSlide];if(!(g.cycleStop!=c.stopCount||g.cycleTimeout===0&&!d))if(!d&&!g.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide))c.end&&c.end(c);else{if(d||!g.cyclePause){var m=c.fx;e.cycleH=e.cycleH||b(e).height();e.cycleW=e.cycleW||b(e).width();h.cycleH=h.cycleH||b(h).height();h.cycleW=h.cycleW||b(h).width();if(c.multiFx){if(c.lastFx==void 0||++c.lastFx>=c.fxs.length)c.lastFx=0;m=c.fxs[c.lastFx];c.currFx=m}if(c.oneTimeFx)m=c.oneTimeFx,
c.oneTimeFx=null;b.fn.cycle.resetState(c,m);c.before.length&&b.each(c.before,function(a,b){g.cycleStop==c.stopCount&&b.apply(h,[e,h,c,f])});m=function(){b.each(c.after,function(a,b){g.cycleStop==c.stopCount&&b.apply(h,[e,h,c,f])})};if(c.nextSlide!=c.currSlide)if(c.busy=1,c.fxFn)c.fxFn(e,h,c,m,f);else if(b.isFunction(b.fn.cycle[c.fx]))b.fn.cycle[c.fx](e,h,c,m);else b.fn.cycle.custom(e,h,c,m,d&&c.fastOnEvent);c.lastSlide=c.currSlide;if(c.random){c.currSlide=c.nextSlide;if(++c.randomIndex==a.length)c.randomIndex=
0;c.nextSlide=c.randomMap[c.randomIndex]}else d=c.nextSlide+1==a.length,c.nextSlide=d?0:c.nextSlide+1,c.currSlide=d?a.length-1:c.nextSlide-1;c.pager&&b.fn.cycle.updateActivePagerLink(c.pager,c.currSlide)}d=0;c.timeout&&!c.continuous?d=D(e,h,c,f):c.continuous&&g.cyclePause&&(d=10);if(d>0)g.cycleTimeout=setTimeout(function(){l(a,c,0,!c.rev)},d)}}}function D(b,c,d,f){if(d.timeoutFn){for(b=d.timeoutFn(b,c,d,f);b-d.speed<250;)b+=d.speed;a("calculated timeout: "+b+"; speed: "+d.speed);if(b!==!1)return b}return d.timeout}
function o(a,c){var d=a.elements,f=a.$cont[0],g=f.cycleTimeout;if(g)clearTimeout(g),f.cycleTimeout=0;if(a.random&&c<0){a.randomIndex--;if(--a.randomIndex==-2)a.randomIndex=d.length-2;else if(a.randomIndex==-1)a.randomIndex=d.length-1;a.nextSlide=a.randomMap[a.randomIndex]}else if(a.random){if(++a.randomIndex==d.length)a.randomIndex=0;a.nextSlide=a.randomMap[a.randomIndex]}else if(a.nextSlide=a.currSlide+c,a.nextSlide<0){if(a.nowrap)return!1;a.nextSlide=d.length-1}else if(a.nextSlide>=d.length){if(a.nowrap)return!1;
a.nextSlide=0}b.isFunction(a.prevNextClick)&&a.prevNextClick(c>0,a.nextSlide,d[a.nextSlide]);l(d,a,1,c>=0);return!1}function N(a,c){var d=b(c.pager);b.each(a,function(f,g){b.fn.cycle.createPagerAnchor(f,g,d,a,c)});b.fn.cycle.updateActivePagerLink(c.pager,c.startingSlide)}function P(a){function c(a){a=parseInt(a).toString(16);return a.length<2?"0"+a:a}function d(a){for(;a&&a.nodeName.toLowerCase()!="html";a=a.parentNode){var f=b.css(a,"background-color");if(f.indexOf("rgb")>=0)return a=f.match(/\d+/g),
"#"+c(a[0])+c(a[1])+c(a[2]);if(f&&f!="transparent")return f}return"#ffffff"}a.each(function(){b(this).css("background-color",d(this))})}if(b.support==void 0)b.support={opacity:!b.browser.msie};b.fn.cycle=function(f,k){var j={s:this.selector,c:this.context};if(this.length===0&&f!="stop"){if(!b.isReady&&j.s)return d("DOM not ready, queuing slideshow"),b(function(){b(j.s,j.c).cycle(f,k)}),this;d("terminating; zero elements found by selector"+(b.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var h=
c(this,f,k);if(h!==!1){this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var z=b(this),e=h.slideExpr?b(h.slideExpr,this):z.children(),o=e.get();if(o.length<2)d("terminating; too few slides: "+o.length);else{var m=g(z,e,o,h,j);if(m!==!1&&(h=m.continuous?10:D(m.currSlide,m.nextSlide,m,!m.rev)))h+=m.delay||0,h<10&&(h=10),a("first timeout: "+h),this.cycleTimeout=setTimeout(function(){l(o,m,0,!m.rev)},h)}}})};b.fn.cycle.resetState=function(a,c){c=c||a.fx;a.before=[];
a.after=[];a.cssBefore=b.extend({},a.original.cssBefore);a.cssAfter=b.extend({},a.original.cssAfter);a.animIn=b.extend({},a.original.animIn);a.animOut=b.extend({},a.original.animOut);a.fxFn=null;b.each(a.original.before,function(){a.before.push(this)});b.each(a.original.after,function(){a.after.push(this)});var d=b.fn.cycle.transitions[c];b.isFunction(d)&&d(a.$cont,b(a.elements),a)};b.fn.cycle.updateActivePagerLink=function(a,c){b(a).each(function(){b(this).find("a").removeClass("activeSlide").filter("a:eq("+
c+")").addClass("activeSlide")})};b.fn.cycle.next=function(a){o(a,a.rev?-1:1)};b.fn.cycle.prev=function(a){o(a,a.rev?1:-1)};b.fn.cycle.createPagerAnchor=function(a,c,d,f,g){if(c=b.isFunction(g.pagerAnchorBuilder)?g.pagerAnchorBuilder(a,c):'<a href="#">'+(a+1)+"</a>"){var e=b(c);if(e.parents("body").length===0){var h=[];d.length>1?(d.each(function(){var a=e.clone(!0);b(this).append(a);h.push(a[0])}),e=b(h)):e.appendTo(d)}e.bind(g.pagerEvent,function(c){c.preventDefault();g.nextSlide=a;var c=g.$cont[0],
d=c.cycleTimeout;if(d)clearTimeout(d),c.cycleTimeout=0;b.isFunction(g.pagerClick)&&g.pagerClick(g.nextSlide,f[g.nextSlide]);l(f,g,1,g.currSlide<a);return!1});g.pagerEvent!="click"&&e.click(function(){return!1});g.pauseOnPagerHover&&e.hover(function(){g.$cont[0].cyclePause++},function(){g.$cont[0].cyclePause--})}};b.fn.cycle.hopsFromLast=function(a,b){var c=a.lastSlide,d=a.currSlide;return b?d>c?d-c:a.slideCount-c:d<c?c-d:c+a.slideCount-d};b.fn.cycle.commonReset=function(a,c,d,f,g,e){b(d.elements).not(a).hide();
d.cssBefore.opacity=1;d.cssBefore.display="block";if(f!==!1&&c.cycleW>0)d.cssBefore.width=c.cycleW;if(g!==!1&&c.cycleH>0)d.cssBefore.height=c.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";b(a).css("zIndex",d.slideCount+(e===!0?1:0));b(c).css("zIndex",d.slideCount+(e===!0?0:1))};b.fn.cycle.custom=function(a,c,d,f,g){var e=b(a),h=b(c),o=d.speedIn,a=d.speedOut,l=d.easeIn,c=d.easeOut;h.css(d.cssBefore);g&&(o=typeof g=="number"?a=g:a=1,l=c=null);e.animate(d.animOut,a,c,function(){d.cssAfter&&
e.css(d.cssAfter);d.sync||h.animate(d.animIn,o,l,f)});d.sync&&h.animate(d.animIn,o,l,f)};b.fn.cycle.transitions={fade:function(a,c,d){c.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(a,c,d){b.fn.cycle.commonReset(a,c,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};b.fn.cycle.ver=function(){return"2.73"};b.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,speedIn:null,speedOut:null,next:null,prev:null,
prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!b.support.opacity,cleartypeNoBg:!1,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:!0,
requeueOnImageNotLoaded:!0,requeueTimeout:250}})(jQuery);
(function(b){b.fn.hoverIntent=function(a,d){var c={sensitivity:7,interval:100,timeout:0},c=b.extend(c,d?{over:a,out:d}:a),f,g,h,u,v=function(a){f=a.pageX;g=a.pageY},l=function(a,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(Math.abs(h-f)+Math.abs(u-g)<c.sensitivity)return b(d).unbind("mousemove",v),d.hoverIntent_s=1,c.over.apply(d,[a]);else h=f,u=g,d.hoverIntent_t=setTimeout(function(){l(a,d)},c.interval)},D=function(a){for(var d=(a.type=="mouseover"?a.fromElement:a.toElement)||a.relatedTarget;d&&
d!=this;)try{d=d.parentNode}catch(f){d=this}if(d==this)return!1;var g=jQuery.extend({},a),k=this;if(k.hoverIntent_t)k.hoverIntent_t=clearTimeout(k.hoverIntent_t);if(a.type=="mouseover"){if(h=g.pageX,u=g.pageY,b(k).bind("mousemove",v),k.hoverIntent_s!=1)k.hoverIntent_t=setTimeout(function(){l(g,k)},c.interval)}else if(b(k).unbind("mousemove",v),k.hoverIntent_s==1)k.hoverIntent_t=setTimeout(function(){k.hoverIntent_t=clearTimeout(k.hoverIntent_t);k.hoverIntent_s=0;c.out.apply(k,[g])},c.timeout)};return this.mouseover(D).mouseout(D)}})(jQuery);
(function(b){function a(a){return typeof a=="object"?a:{top:a,left:a}}var d=b.scrollTo=function(a,d,g){b(window).scrollTo(a,d,g)};d.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};d.window=function(){return b(window)._scrollable()};b.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&b.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])==-1)return this;var a=(this.contentWindow||this).document||this.ownerDocument||this;return b.browser.safari||
a.compatMode=="BackCompat"?a.body:a.documentElement})};b.fn.scrollTo=function(c,f,g){typeof f=="object"&&(g=f,f=0);typeof g=="function"&&(g={onAfter:g});c=="max"&&(c=9E9);g=b.extend({},d.defaults,g);f=f||g.speed||g.duration;g.queue=g.queue&&g.axis.length>1;g.queue&&(f/=2);g.offset=a(g.offset);g.over=a(g.over);return this._scrollable().each(function(){function h(a){v.animate(o,f,g.easing,a&&function(){a.call(this,c,g)})}var u=this,v=b(u),l=c,D,o={},N=v.is("html,body");switch(typeof l){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(l)){l=
a(l);break}l=b(l,this);case "object":if(l.is||l.style)D=(l=b(l)).offset()}b.each(g.axis.split(""),function(a,b){var c=b=="x"?"Left":"Top",f=c.toLowerCase(),y="scroll"+c,z=u[y],e=d.max(u,b);D?(o[y]=D[f]+(N?0:z-v.offset()[f]),g.margin&&(o[y]-=parseInt(l.css("margin"+c))||0,o[y]-=parseInt(l.css("border"+c+"Width"))||0),o[y]+=g.offset[f]||0,g.over[f]&&(o[y]+=l[b=="x"?"width":"height"]()*g.over[f])):(c=l[f],o[y]=c.slice&&c.slice(-1)=="%"?parseFloat(c)/100*e:c);/^\d+$/.test(o[y])&&(o[y]=o[y]<=0?0:Math.min(o[y],
e));!a&&g.queue&&(z!=o[y]&&h(g.onAfterFirst),delete o[y])});h(g.onAfter)}).end()};d.max=function(a,d){var g=d=="x"?"Width":"Height",h="scroll"+g;if(!b(a).is("html,body"))return a[h]-b(a)[g.toLowerCase()]();var g="client"+g,u=a.ownerDocument.documentElement,v=a.ownerDocument.body;return Math.max(u[h],v[h])-Math.min(u[g],v[g])}})(jQuery);function oc(b){for(var a={},d=0;d<b.length;d++)a[b[d]]="";return a}
function ae(b,a){var d=[];if(!b[0]||!a[0])return!1;if(b.length!=a.length)return!1;for(var c=0;c<b.length;c++)key=typeof b[c]+"~"+b[c],d[key]?d[key]++:d[key]=1;for(c=0;c<a.length;c++)if(key=typeof a[c]+"~"+a[c],d[key])if(d[key]==0)return!1;else d[key]--;else return!1;return!0}var load_url=$.address.baseURL(),internal_bool=null,event_val=null,event_params=null,event_1=null,event_2=null,curr_menu=null;$(document).ready(function(){base_url=load_url==base_url?base_url:rebuild_url(load_url)});
function rebuild_url(b){b=b.replace(base_url,"").split("/");rewritten=b[0]==0?b.splice(0,1):!1;redir_url=b[0]=="project"?base_url+"/#/portfolio/works/"+b[0]+"/"+b[1]:typeof b[1]=="undefined"?base_url+"/#/"+b[0]+"/":base_url+"/#/"+b[0]+"/"+b[1];document.location.href=redir_url}var project_taxonomies=["portfolio","media","location","type","collaborator"],single_pages=["about-me","resume","my-journal"],post_taxonomies=["my","topics"];
$(document).ready(function(){$.address.init(function(){}).internalChange(function(){internal_bool=!0}).externalChange(function(){internal_bool=!1}).change(function(b){event_val=b.value;event_params=b.pathNames;event_1=event_params.slice(0,2).join("/");event_2=event_params.slice(2,4).join("/");curr_menu=$("ul#secondary-nav li.project");rewrite_doc_title(event_params);curr_id=event_params[3];if(event_val.length>1)"project"in oc(event_params)&&curr_menu.size()>0?(populate_project(base_url+"/"+event_2),
orig_params[1]!=event_params[1]&&populate_project_menu(base_url+"/"+event_1)):"project"in oc(event_params)?(populate_project_menu(base_url+"/"+event_1),populate_project(base_url+"/"+event_2)):event_params[0]in oc(project_taxonomies)?populate_project_menu(base_url+"/"+event_1):event_params[0]in oc(single_pages)&&populate_page(base_url+"/"+event_1),"portfolio"in oc(event_params)&&!internal_bool&&(portfolio_tab=$("li.nav-menu-works > a"),portfolio_tab.menu_move());else return!1})});
function rewrite_doc_title(b){b=typeof b[1]=="undefined"?b[0]:typeof b[2]=="undefined"?b[1]:b[3];if(typeof b!="undefined")document.title=b.replace(/-/g," ")+" :: "+title_base}var back_loaded=!1;
function populate_project_menu(b){$.ajax({url:b,beforeSend:function(){activateLoader(!0);content_loaded=!1;sec_nav.find("li").fadeOut("fast");nav_cont.fadeTo(300,1);counter_label.fadeTo(200,0);back_over.fadeTo(300,0.6);sec_nav_hidden==!0&&(sec_nav.show(),sec_nav_hidden=!1)},type:"POST",dataType:"html",data:{post_loader:1},success:function(a){activateLoader(!1);sec_nav.html(a);curr_li=$("ul#secondary-nav li:first");curr_menu=$("ul#secondary-nav li.project");$("ul#secondary-nav > li").hide();open_secondary(curr_li);
counter_hidden&&(menu_counter.fadeIn(200),counter_hidden=!1);$("ul#secondary-nav > li a").hoverIntent(projectPreview);counter_label.text(event_params[0].replace("-"," ")+" / "+event_params[1].replace("-"," ")).fadeTo(400,1);count_numbs("#menu-counter > span.num",curr_menu.size())}});$.ajax({url:b,beforeSend:function(){back_loaded=!1;main_cont.fadeOut(400);$("#back-focus img").fadeOut(300)},type:"POST",dataType:"html",data:{post_loader:3},success:function(a){back_focus.html(a);$("#back-focus img").hide()}})}
var curr_id=null,curr_li=null;
function populate_project(b){$.ajax({url:b,beforeSend:function(){activateLoader(!0);content_loaded=!1;main_cont.fadeTo(800,0,function(){back_cont_abs&&(back_cont.removeClass("back-abs"),back_cont_abs=!1)});back_focus.fadeTo(300,0)},type:"POST",dataType:"html",data:{post_loader:2},success:function(a){activateLoader(!1);content_loaded=!0;main_cont.html(a);aux_gallery=$("#aux-gallery");aux_gallery_cont=$("#aux-gallery-container");gallery_pager=$("#gallery-pager");orig_text=$("#gallery-toggle").text();
curr_li=$("a[href="+base_url+"/"+event_2+"]").parents("li");check_back_progress()}})}var check_i=0;function check_back_progress(){back_loaded?curr_li.loadContent():setTimeout(check_back_progress,150)}
function populate_page(b){$.ajax({url:b,beforeSend:function(){activateLoader(!0);content_loaded=!1;sec_nav_hidden!=!0&&(sec_nav.fadeOut(400,function(){sec_nav.empty()}),sec_nav_hidden=!0);counter_hidden!=!0&&(menu_counter.fadeOut(400),counter_hidden=!0);back_cont_abs!=!0&&(back_cont.addClass("back-abs"),back_cont_abs=!0);back_focus.empty();main_cont.hide()},type:"POST",dataType:"html",data:{page_loader:1},success:function(a){activateLoader(!1);content_loaded=!0;main_cont.html(a);main_cont.fadeTo(800,
1);back_over.fadeTo(300,0)}})}var heightG=null;function initiateCycle(b){b.cycle({fx:"fade",speed:500,timeout:0,next:"#aux-gallery img",pager:"#gallery-pager",containerResize:0,before:onBefore,after:onAfter})}
function onBefore(){heightG=$(this).height();widthG=$(this).width();$(this).find(".gal-caption").css("opacity",0);$(this).fadeTo(200,0,function(){aux_gallery.animate({height:heightG+"px",width:widthG+"px"},400,function(){$.scrollTo(aux_gallery_cont,200)})});$(this).parent().find("img.current-slide").removeClass("current-slide")}function onAfter(){$(this).addClass("current-slide");$(this).find(".gal-caption").fadeTo(150,1);$(this).fadeTo(200,1)}
$("#gallery-toggle").live("click",function(){gal_toggler=$(this);descript=$(".description");scroll_back_o=descript.offset().top-(winH-descript.height())-aux_gallery_cont.height()+40;gal_toggler.hasClass("shown")?(aux_gallery_cont.css({height:heightG+"px",width:widthG+"px"}),$.scrollTo(scroll_back_o,300,{onAfter:function(){aux_gallery.fadeOut(300,function(){aux_gallery_cont.animate({paddingTop:0,paddingBottom:0,height:"hide"},600,function(){gal_toggler.text(orig_text)})})}}),gal_toggler.removeClass("shown"),
gallery_pager.fadeOut(300)):(aux_gallery_cont.css({height:0,width:widthG+"px"}),aux_gallery_cont.animate({paddingTop:35,paddingBottom:30,height:heightG+"px",display:"inline-block"},600,function(){$.scrollTo(aux_gallery_cont,300,{onAfter:function(){aux_gallery.fadeTo(400,1);aux_gallery_cont.css({height:"auto",width:"auto"})}})}),gallery_pager.fadeIn(300),gal_toggler.addClass("shown"),gal_toggler.text("hide gallery"))});
$.fn.loadContent=function(){$("#back-focus img.current-back").css("display","none").removeClass("current-back");$("#back-focus img#"+curr_id+"-bg").css("display","block").addClass("current-back").resizeForBack();nav_inactive?(back_focus.fadeTo(1200,1),back_over.fadeOut(300),nav_cont.fadeTo("fast",0.3)):(back_focus.fadeTo(800,0.1),back_over.fadeIn(400));main_cont.fadeTo(800,1);initiateCycle(aux_gallery);aux_gallery_cont.hide(function(){aux_gallery.css("opacity",0);gallery_pager.hide()});var b=curr_li.attr("data-back-color");
b!=null&&$("body").animate({"background-color":"#"+b},900)};$.fn.parse_cust_url=function(b,a){orig_val=$.address.value().substring(1);new_val=$(this).attr("href").replace(base_url,"");orig_params=$.address.pathNames();new_params=new_val.substring(1).split("/");ae(orig_params,new_params)||(new_params[0]==a?$.address.value(orig_params[0]+"/"+orig_params[1]+new_val):new_params[0]in oc(b)&&$.address.value(new_val));return!1};
$(".internal a, a.internal").live("click",function(){if(!$(this).parent().hasClass("external"))return $(this).parse_cust_url(project_taxonomies,"project"),$(this).parse_cust_url(post_taxonomies),$(this).parse_cust_url(single_pages),!1});$(".meta a").live("click",function(){link_elem=$(this);$.scrollTo(0,400,{onAfter:function(){link_elem.parse_cust_url(project_taxonomies,"project");return!1}});return!1});
var body=null,win=$(window),winW=win.width(),winH=win.height(),sec_nav=null,nav_cont=null,menu_counter=null,back_cont=null,main_cont=null,back_over=null,back_focus=null,content_loaded=!1,nav_inactive=!0,counter_label=null,aux_gallery_cont=null,aux_gallery=null,gallery_pager=null,orig_text=null,counter_hidden=!0,sec_nav_hidden=!1,back_cont_abs=!1;
$(document).ready(function(){main_cont=$("#main-content-container");back_cont=$("#back-cont");back_over=$("#back-over");back_focus=$("#back-focus");sec_nav=$("#secondary-nav");nav_cont=$("#nav-container");menu_counter=$("#menu-counter");counter_label=$("#menu-counter > span.label");menu_counter.hide()});win.resize(function(){winW=win.width();winH=win.height();rightOff=win.width()/2;$("#back-focus img.current-back").resizeForBack()});$(document).ready(function(){nav_cont.hoverIntent(navShow)});
navShow={sensitivity:3,interval:200,timeout:200,over:function(){nav_inactive=!1;content_loaded&&(back_over.fadeTo(300,0.6),back_focus.fadeTo("fast",0.1),nav_cont.fadeTo("slow",1))},out:function(){nav_inactive=!0;content_loaded&&(back_focus.fadeTo("slow",1),nav_cont.fadeTo("fast",0.3),back_over.fadeOut(300))}};var loader=null;
$(document).ready(function(){body=$("body");body.append('<div id="load-indicator">loading...</div>');loader=$("#load-indicator");loader.hide();body.mousemove(function(b){loader.css({left:b.pageX+15,top:b.pageY+15})})});function activateLoader(b){b?loader.fadeIn(200):loader.fadeOut(400)}var curr_prev=null;projectPreview={sensitivity:3,interval:200,timeout:200,over:function(){curr_prev=$(this).parents("li").find(".post-preview-cont");curr_prev.stop().fadeIn(300)},out:function(){curr_prev.stop().fadeOut(300)}};
function open_sub(b){b.animate({opacity:"toggle"},300,function(){open_sub(b.next())})}function open_secondary(b){b.fadeIn(1200);var a=b.next();a.size()!="0"?setTimeout(function(){open_secondary(a)},60):back_loaded=!0}var wait=0;
$.fn.mainMenu=function(b){var a=$(this).parent(),d=a.find("ul.sub-menu > li").size(),c=!1,c=a.hasClass("open-menu")?!0:!1;d>0&&(c?(a.find("ul.sub-menu > li").animate({opacity:"toggle",width:"toggle"},250),setTimeout(function(){a.animate({height:46},200,"easeInQuad")},200)):(a.animate({height:d+1+0.2+"em"},200,"easeInQuad"),open_sub(a.find("ul.sub-menu > li:first"))));if(b||c)d>0&&(wait+=200*(d+1));a.toggleClass("open-menu")};
$.fn.menu_move=function(){wait=0;$(this).parent().hasClass("open-menu")||($("ul#menu-main-nav > li.open-menu > a").mainMenu(!1),$(this).mainMenu(!0),$("ul#menu-main-nav > li").each(function(){var b=$(this);b.hasClass("open-menu")?setTimeout(function(){b.animate({"margin-left":-20},200,"easeInQuad")},wait):setTimeout(function(){b.animate({"margin-left":0},200,"easeInQuad")},wait)}))};$(document).ready(function(){$("ul.sub-menu > li").hide();$("ul#menu-main-nav > li > a").click(function(){$(this).menu_move()})});
function count_numbs(b,a){var d=parseInt($(b).html());if(d-a==0)return!1;var c=1;d-a>0&&(c*=-1);getThere(b,d,a,c)}function getThere(b,a,d,c){a+=c;$(b).text(a);a!=d&&setTimeout("getThere('"+b+"',"+a+","+d+","+c+")",80)}
$.fn.resizeForBack=function(){imgWidth=$(this).width();imgHeight=$(this).height();winWidth=$(window).width();winHeight=$(window).height();imgRatio=imgWidth/imgHeight;winRatio=winWidth/winHeight;imgRatio>winRatio?($(this).css({height:"100%",width:"auto","margin-top":0}),wDiff=(winWidth-$(this).width())/2,wDiff<0&&$(this).css({"margin-left":wDiff+"px"})):winRatio>imgRatio&&($(this).css({width:"100%",height:"auto","margin-left":0}),hDiff=(winHeight-$(this).height())/2,hDiff<0&&$(this).css({"margin-top":hDiff+
"px"}))};
