(function(f){var i=document.defaultView&&document.defaultView.getComputedStyle,o=/([A-Z])/g,l=/-([a-z])/ig,m=function(a,g){return g.toUpperCase()},p=function(a){if(i)return i(a,null);else if(a.currentStyle)return a.currentStyle},q=/float/i,r=/^-?\d+(?:px)?$/i,s=/^-?\d/;f.curStyles=function(a,g){if(!a)return null;for(var j=p(a),c,d,h=a.style,e={},k=0,b,n;k<g.length;k++){b=g[k];c=b.replace(l,m);if(q.test(b)){b=jQuery.support.cssFloat?"float":"styleFloat";c="cssFloat"}if(i){b=b.replace(o,"-$1").toLowerCase();d=j.getPropertyValue(b);if(b==="opacity"&&d==="")d="1";e[c]=d}else{d=b.replace(l,m);e[c]=j[b]||j[d];if(!r.test(e[c])&&s.test(e[c])){b=h.left;n=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=d==="fontSize"?"1em":e[c]||0;e[c]=h.pixelLeft+"px";h.left=b;a.runtimeStyle.left=n}}}return e};f.fn.curStyles=function(){return f.curStyles(this[0],f.makeArray(arguments))}})(jQuery);jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});(function(d){function i(){var b=d("script:first"),a=b.css("color"),c=false;if(/^rgba/.test(a))c=true;else try{c=a!=b.css("color","rgba(0, 0, 0, 0.5)").css("color");b.css("color",a)}catch(e){}return c}function g(b,a,c){var e="rgb"+(d.support.rgba?"a":"")+"("+parseInt(b[0]+c*(a[0]-b[0]),10)+","+parseInt(b[1]+c*(a[1]-b[1]),10)+","+parseInt(b[2]+c*(a[2]-b[2]),10);if(d.support.rgba)e+=","+(b&&a?parseFloat(b[3]+c*(a[3]-b[3])):1);e+=")";return e}function f(b){var a,c;if(a=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(b))c=[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1];else if(a=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(b))c=[parseInt(a[1],16)*17,parseInt(a[2],16)*17,parseInt(a[3],16)*17,1];else if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))c=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),1];else if(a=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(b))c=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];return c}
d.extend(true,d,{support:{rgba:i()}});var h=["color","backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","outlineColor"];d.each(h,function(b,a){d.fx.step[a]=function(c){if(!c.init){c.a=f(d(c.elem).css(a));c.end=f(c.end);c.init=true}c.elem.style[a]=g(c.a,c.end,c.pos)}});d.fx.step.borderColor=function(b){if(!b.init)b.end=f(b.end);var a=h.slice(2,6);d.each(a,function(c,e){b.init||(b[e]={a:f(d(b.elem).css(e))});b.elem.style[e]=g(b[e].a,b.end,b.pos)});b.init=true}})(jQuery);(function($){if(!document.defaultView||!document.defaultView.getComputedStyle){var oldCurCSS=$.curCSS;$.curCSS=function(elem,name,force){if(name==='background-position'){name='backgroundPosition';}
if(name!=='backgroundPosition'||!elem.currentStyle||elem.currentStyle[name]){return oldCurCSS.apply(this,arguments);}
var style=elem.style;if(!force&&style&&style[name]){return style[name];}
return oldCurCSS(elem,'backgroundPositionX',force)+' '+oldCurCSS(elem,'backgroundPositionY',force);};}
var oldAnim=$.fn.animate;$.fn.animate=function(prop){if('background-position'in prop){prop.backgroundPosition=prop['background-position'];delete prop['background-position'];}
if('backgroundPosition'in prop){prop.backgroundPosition='('+prop.backgroundPosition;}
return oldAnim.apply(this,arguments);};function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}
$.fx.step.backgroundPosition=function(fx){if(!fx.bgPosReady){var start=$.curCSS(fx.elem,'backgroundPosition');if(!start){start='0px 0px';}
start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];fx.bgPosReady=true;}
var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];};})(jQuery);(function(a,b,c){function u(a,b,c,d){var e=h.exec(b),f=a.css(c)==="auto"?0:a.css(c),g=typeof f=="string"?A(f):f,i=typeof b=="string"?A(b):b,j=d===!0?0:g,k=a.is(":hidden"),l=a.translation();c=="left"&&(j=parseInt(g,10)+l.x),c=="right"&&(j=parseInt(g,10)+l.x),c=="top"&&(j=parseInt(g,10)+l.y),c=="bottom"&&(j=parseInt(g,10)+l.y),!e&&b=="show"?(j=1,k&&a.css({display:"block",opacity:0})):!e&&b=="hide"&&(j=0);if(e){var m=parseFloat(e[2]);return e[1]&&(m=(e[1]==="-="?-1:1)*m+parseInt(j,10)),m}return j}function v(a,b,c){return(c===!0||n==!0&&c!=!1)&&t?"translate3d("+a+"px,"+b+"px,0)":"translate("+a+"px,"+b+"px)"}function w(b,c,d,f,g,h,i,l){var m=b.data(k)?z(b.data(k))?a.extend(!0,{},j):b.data(k):a.extend(!0,{},j),n=g,o=a.inArray(c,e)>-1;if(o){var p=m.meta,q=A(b.css(c))||0,r=c+"_o";n=g-q,p[c]=n,p[r]=b.css(c)=="auto"?0+n:q+n||0,m.meta=p,i&&n===0&&(n=0-p[r],p[c]=n,p[r]=0)}return b.data(k,x(m,c,d,f,n,h,i,l))}function x(a,b,c,d,e,g,h,i){a=typeof a=="undefined"?{}:a,a.secondary=typeof a.secondary=="undefined"?{}:a.secondary;for(var j=f.length-1;j>=0;j--)typeof a[f[j]+"transition-property"]=="undefined"&&(a[f[j]+"transition-property"]=""),a[f[j]+"transition-property"]+=", "+(g===!0&&h===!0?f[j]+"transform":b),a[f[j]+"transition-duration"]=c+"ms",a[f[j]+"transition-timing-function"]=d,a.secondary[g===!0&&h===!0?f[j]+"transform":b]=g===!0&&h===!0?v(a.meta.left,a.meta.top,i):e;return a}function y(a){for(var b in a)if((b=="width"||b=="height")&&(a[b]=="show"||a[b]=="hide"||a[b]=="toggle"))return!0;return!1}function z(a){for(var b in a)return!1;return!0}function A(a){return parseFloat(a.replace(/px/i,""))}function B(b,c,e){var f=a.inArray(b,d)>-1;return(b=="width"||b=="height")&&c===parseFloat(e.css(b))&&(f=!1),f}var d=["top","right","bottom","left","opacity","height","width"],e=["top","right","bottom","left"],f=["","-webkit-","-moz-","-o-"],g=["avoidTransforms","useTranslate3d","leaveTransforms"],h=/^([+-]=)?([\d+-.]+)(.*)$/,i=/([A-Z])/g,j={secondary:{},meta:{top:0,right:0,bottom:0,left:0}},k="jQe",l="cubic-bezier(",m=")",n=!1,o=null,p=document.body||document.documentElement,q=p.style,r=q.WebkitTransition!==undefined?"webkitTransitionEnd":q.OTransition!==undefined?"oTransitionEnd":"transitionend",s=q.WebkitTransition!==undefined||q.MozTransition!==undefined||q.OTransition!==undefined||q.transition!==undefined,t=n="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix;a.expr&&a.expr.filters&&(o=a.expr.filters.animated,a.expr.filters.animated=function(b){return a(b).data("events")&&a(b).data("events")[r]?!0:o.call(this,b)}),a.extend({toggle3DByDefault:function(){n=!n}}),a.fn.translation=function(){if(!this[0])return null;var a=this[0],b=window.getComputedStyle(a,null),c={x:0,y:0};for(var d=f.length-1;d>=0;d--){var e=b.getPropertyValue(f[d]+"transform");if(e&&/matrix/i.test(e)){var g=e.replace(/^matrix\(/i,"").split(/, |\)$/g);c={x:parseInt(g[4],10),y:parseInt(g[5],10)};break}}return c},a.fn.animate=function(c,d,h,i){c=c||{};var j=typeof c.bottom=="undefined"&&typeof c.right=="undefined",n=a.speed(d,h,i),o=this,p=0,q=function(){p--,p===0&&typeof n.complete=="function"&&n.complete.apply(o[0],arguments)};return!s||z(c)||y(c)||n.duration<=0||a.fn.animate.defaults.avoidTransforms===!0&&c.avoidTransforms!==!1?b.apply(this,arguments):this[n.queue===!0?"queue":"each"](function(){var d=a(this),h=a.extend({},n),i=function(){var a={};for(var b=f.length-1;b>=0;b--)a[f[b]+"transition-property"]="none",a[f[b]+"transition-duration"]="",a[f[b]+"transition-timing-function"]="";d.unbind(r);if(!c.leaveTransforms==!0){var g=d.data(k)||{},h={};for(b=f.length-1;b>=0;b--)h[f[b]+"transform"]="";if(j&&typeof g.meta!="undefined")for(var i=0,l;l=e[i];++i)h[l]=g.meta[l+"_o"]+"px";d.css(a).css(h)}c.opacity==="hide"&&d.css("display","none"),d.data(k,null),q.call(d)},o={bounce:l+"0.0, 0.35, .5, 1.3"+m,linear:"linear",swing:"ease-in-out",easeInQuad:l+"0.550, 0.085, 0.680, 0.530"+m,easeInCubic:l+"0.550, 0.055, 0.675, 0.190"+m,easeInQuart:l+"0.895, 0.030, 0.685, 0.220"+m,easeInQuint:l+"0.755, 0.050, 0.855, 0.060"+m,easeInSine:l+"0.470, 0.000, 0.745, 0.715"+m,easeInExpo:l+"0.950, 0.050, 0.795, 0.035"+m,easeInCirc:l+"0.600, 0.040, 0.980, 0.335"+m,easeOutQuad:l+"0.250, 0.460, 0.450, 0.940"+m,easeOutCubic:l+"0.215, 0.610, 0.355, 1.000"+m,easeOutQuart:l+"0.165, 0.840, 0.440, 1.000"+m,easeOutQuint:l+"0.230, 1.000, 0.320, 1.000"+m,easeOutSine:l+"0.390, 0.575, 0.565, 1.000"+m,easeOutExpo:l+"0.190, 1.000, 0.220, 1.000"+m,easeOutCirc:l+"0.075, 0.820, 0.165, 1.000"+m,easeInOutQuad:l+"0.455, 0.030, 0.515, 0.955"+m,easeInOutCubic:l+"0.645, 0.045, 0.355, 1.000"+m,easeInOutQuart:l+"0.770, 0.000, 0.175, 1.000"+m,easeInOutQuint:l+"0.860, 0.000, 0.070, 1.000"+m,easeInOutSine:l+"0.445, 0.050, 0.550, 0.950"+m,easeInOutExpo:l+"1.000, 0.000, 0.000, 1.000"+m,easeInOutCirc:l+"0.785, 0.135, 0.150, 0.860"+m},s={},t=o[h.easing||"swing"]?o[h.easing||"swing"]:h.easing||"swing";for(var v in c)if(a.inArray(v,g)===-1){var x=a.inArray(v,e)>-1,y=u(d,c[v],v,x&&c.avoidTransforms!==!0);c.avoidTransforms!==!0&&B(v,y,d)?w(d,v,h.duration,t,x&&c.avoidTransforms===!0?y+"px":y,x&&c.avoidTransforms!==!0,j,c.useTranslate3d===!0):s[v]=c[v]}var A=d.data(k)||{};for(var C=f.length-1;C>=0;C--)typeof A[f[C]+"transition-property"]!="undefined"&&(A[f[C]+"transition-property"]=A[f[C]+"transition-property"].substr(2));d.data(k,A).unbind(r);if(!z(d.data(k))&&!z(d.data(k).secondary)){p++,d.css(d.data(k));var D=d.data(k).secondary;setTimeout(function(){d.bind(r,i).css(D)})}else h.queue=!1;return z(s)||(p++,b.apply(d,[s,{duration:h.duration,easing:a.easing[h.easing]?h.easing:a.easing.swing?"swing":"linear",complete:q,queue:h.queue}])),!0})},a.fn.animate.defaults={},a.fn.stop=function(b,d,e){if(!s)return c.apply(this,[b,d]);b&&this.queue([]);var g={};for(var h=f.length-1;h>=0;h--)g[f[h]+"transition-property"]="none",g[f[h]+"transition-duration"]="",g[f[h]+"transition-timing-function"]="";return this.each(function(){var h=a(this),j=window.getComputedStyle(this,null),l={},m;if(!z(h.data(k))&&!z(h.data(k).secondary)){var n=h.data(k);if(d){l=n.secondary;if(!e&&typeof n.meta.left_o!==undefined||typeof n.meta.top_o!==undefined){l.left=typeof n.meta.left_o!==undefined?n.meta.left_o:"auto",l.top=typeof n.meta.top_o!==undefined?n.meta.top_o:"auto";for(m=f.length-1;m>=0;m--)l[f[m]+"transform"]=""}}else for(var o in h.data(k).secondary){o=o.replace(i,"-$1").toLowerCase(),l[o]=j.getPropertyValue(o);if(!e&&/matrix/i.test(l[o])){var p=l[o].replace(/^matrix\(/i,"").split(/, |\)$/g);l.left=parseFloat(p[4])+parseFloat(h.css("left"))+"px"||"auto",l.top=parseFloat(p[5])+parseFloat(h.css("top"))+"px"||"auto";for(m=f.length-1;m>=0;m--)l[f[m]+"transform"]=""}}h.unbind(r).css(g).css(l).data(k,null)}else c.apply(h,[b,d])}),this}})(jQuery,jQuery.fn.animate,jQuery.fn.stop);(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
var method,action,url,$form=this;if(typeof options=='function'){options={success:options};}
method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];}
options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var n,v,a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(n in options.data){if($.isArray(options.data[n])){for(var k in options.data[n]){a.push({name:n,value:options.data[n][k]});}}
else{v=options.data[n];v=$.isFunction(v)?v():v;a.push({name:n,value:v});}}}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else{options.data=q;}
var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}
if(options.clearForm){callbacks.push(function(){$form.clearForm();});}
if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
else if(options.success){callbacks.push(options.success);}
options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};var fileInputs=$('input:file',this).length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);if(options.iframe!==false&&(fileInputs||options.iframe||multipart)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUpload(a);});}
else{fileUpload(a);}}
else{if($.browser.msie&&method=='get'){var ieMeth=$form[0].getAttribute('method');if(typeof ieMeth==='string')
options.type=ieMeth;}
$.ajax(options);}
this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var useProp=!!$.fn.prop;if(a){for(i=0;i<a.length;i++){el=$(form[a[i].name]);el[useProp?'prop':'attr']('disabled',false);}}
if($(':input[name=submit],:input[id=submit]',form).length){alert('Error: Form elements must not have name or id of "submit".');return;}
s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+(new Date().getTime());if(s.iframeTarget){$io=$(s.iframeTarget);n=$io.attr('name');if(n==null)
$io.attr('name',id);else
id=n;}
else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}
io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;$io.attr('src',s.iframeSrc);xhr.error=e;s.error&&s.error.call(s.context,xhr,e,status);g&&$.event.trigger("ajaxError",[xhr,s,e]);s.complete&&s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}
if(g){$.event.trigger("ajaxSend",[xhr,s]);}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;}
return;}
if(xhr.aborted){return;}
sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}
var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;}
function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');}
if(a!=s.url){form.setAttribute('action',s.url);}
if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);}
function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state.toLowerCase()=='uninitialized')
setTimeout(checkState,50);}
catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);timeoutHandle&&clearTimeout(timeoutHandle);timeoutHandle=undefined;}}
var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){extraInputs.push($('<input type="hidden" name="'+n+'" />').attr('value',s.extraData[n]).appendTo(form)[0]);}}
if(!s.iframeTarget){$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);}
setTimeout(checkState,15);form.submit();}
finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');}
$(extraInputs).remove();}}
if(s.forceSync){doSubmit();}
else{setTimeout(doSubmit,10);}
var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;}
try{doc=getDoc(io);}
catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;}
if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');return;}
else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');return;}
if(!doc||doc.location.href==s.iframeSrc){if(!timedOut)
return;}
io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';}
var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}}
var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml)
s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}
var dt=s.dataType||'';var scr=/(json|script|text)/.test(dt.toLowerCase());if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}
else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerHTML;}
else if(b){xhr.responseText=b.innerHTML;}}}
else if(s.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
try{data=httpData(xhr,s.dataType,s);}
catch(e){status='parsererror';xhr.error=errMsg=(e||status);}}
catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);}
if(xhr.aborted){log('upload aborted');status=null;}
if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';}
if(status==='success'){s.success&&s.success.call(s.context,data,'success',xhr);g&&$.event.trigger("ajaxSuccess",[xhr,s]);}
else if(status){if(errMsg==undefined)
errMsg=xhr.statusText;s.error&&s.error.call(s.context,xhr,status,errMsg);g&&$.event.trigger("ajaxError",[xhr,s,errMsg]);}
g&&$.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");}
s.complete&&s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)
clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)
$io.remove();xhr.responseXML=null;},100);}
var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else{doc=(new DOMParser()).parseFromString(s,'text/xml');}
return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){$.error&&$.error('parsererror');}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}}
return data;};}};$.fn.ajaxForm=function(options){if(this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.ajaxFormUnbind().bind('submit.form-plugin',function(e){if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0){return;}
target=t[0];}
var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic){var a=[];if(this.length===0){return a;}
var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;}
var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n){continue;}
if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:n,value:v});}}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}
var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}
else if(v!==null&&typeof v!='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length)){continue;}
v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(successful===undefined){successful=true;}
if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1)){return null;}
if(tag=='select'){var index=el.selectedIndex;if(index<0){return null;}
var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;}
if(one){return v;}
a.push(v);}}
return a;}
return $(el).val();};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag=='textarea'){this.value='';}
else if(t=='checkbox'||t=='radio'){this.checked=false;}
else if(tag=='select'){this.selectedIndex=-1;}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b===undefined){b=true;}
return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select===undefined){select=true;}
return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio'){this.checked=select;}
else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};function log(){var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}
else if(window.opera&&window.opera.postError){window.opera.postError(msg);}};})(jQuery);;(function($,document,window){var
defaults={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,returnFocus:true,reposition:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:undefined},colorbox='colorbox',prefix='cbox',boxElement=prefix+'Element',event_open=prefix+'_open',event_load=prefix+'_load',event_complete=prefix+'_complete',event_cleanup=prefix+'_cleanup',event_closed=prefix+'_closed',event_purge=prefix+'_purge',isIE=$.browser.msie&&!$.support.opacity,isIE6=isIE&&$.browser.version<7,event_ie6=prefix+'_IE6',$overlay,$box,$wrap,$content,$topBorder,$leftBorder,$rightBorder,$bottomBorder,$related,$window,$loaded,$loadingBay,$loadingOverlay,$title,$current,$slideshow,$next,$prev,$close,$groupControls,settings,interfaceHeight,interfaceWidth,loadedHeight,loadedWidth,element,index,photo,open,active,closing,loadingTimer,publicMethod,div="div";function $tag(tag,id,css){var element=document.createElement(tag);if(id){element.id=prefix+id;}
if(css){element.style.cssText=css;}
return $(element);}
function getIndex(increment){var
max=$related.length,newIndex=(index+increment)%max;return(newIndex<0)?max+newIndex:newIndex;}
function setSize(size,dimension){return Math.round((/%/.test(size)?((dimension==='x'?$window.width():$window.height())/100):1)*parseInt(size,10));}
function isImage(url){return settings.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(url);}
function makeSettings(){var i;settings=$.extend({},$.data(element,colorbox));for(i in settings){if($.isFunction(settings[i])&&i.slice(0,2)!=='on'){settings[i]=settings[i].call(element);}}
settings.rel=settings.rel||element.rel||'nofollow';settings.href=settings.href||$(element).attr('href');settings.title=settings.title||element.title;if(typeof settings.href==="string"){settings.href=$.trim(settings.href);}}
function trigger(event,callback){$.event.trigger(event);if(callback){callback.call(element);}}
function slideshow(){var
timeOut,className=prefix+"Slideshow_",click="click."+prefix,start,stop,clear;if(settings.slideshow&&$related[1]){start=function(){$slideshow.text(settings.slideshowStop).unbind(click).bind(event_complete,function(){if(settings.loop||$related[index+1]){timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed);}}).bind(event_load,function(){clearTimeout(timeOut);}).one(click+' '+event_cleanup,stop);$box.removeClass(className+"off").addClass(className+"on");timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed);};stop=function(){clearTimeout(timeOut);$slideshow.text(settings.slideshowStart).unbind([event_complete,event_load,event_cleanup,click].join(' ')).one(click,function(){publicMethod.next();start();});$box.removeClass(className+"on").addClass(className+"off");};if(settings.slideshowAuto){start();}else{stop();}}else{$box.removeClass(className+"off "+className+"on");}}
function launch(target){if(!closing){element=target;makeSettings();$related=$(element);index=0;if(settings.rel!=='nofollow'){$related=$('.'+boxElement).filter(function(){var relRelated=$.data(this,colorbox).rel||this.rel;return(relRelated===settings.rel);});index=$related.index(element);if(index===-1){$related=$related.add(element);index=$related.length-1;}}
if(!open){open=active=true;$box.show();if(settings.returnFocus){try{element.blur();$(element).one(event_closed,function(){try{this.focus();}catch(e){}});}catch(e){}}
$overlay.css({"opacity":+settings.opacity,"cursor":settings.overlayClose?"pointer":"auto"}).show();settings.w=setSize(settings.initialWidth,'x');settings.h=setSize(settings.initialHeight,'y');publicMethod.position();if(isIE6){$window.bind('resize.'+event_ie6+' scroll.'+event_ie6,function(){$overlay.css({width:$window.width(),height:$window.height(),top:$window.scrollTop(),left:$window.scrollLeft()});}).trigger('resize.'+event_ie6);}
trigger(event_open,settings.onOpen);$groupControls.add($title).hide();$close.html(settings.close).show();}
publicMethod.load(true);}}
publicMethod=$.fn[colorbox]=$[colorbox]=function(options,callback){var $this=this;options=options||{};publicMethod.init();if(!$this[0]){if($this.selector){return $this;}
$this=$('<a/>');options.open=true;}
if(callback){options.onComplete=callback;}
$this.each(function(){$.data(this,colorbox,$.extend({},$.data(this,colorbox)||defaults,options));}).addClass(boxElement);if(($.isFunction(options.open)&&options.open.call($this))||options.open){launch($this[0]);}
return $this;};publicMethod.init=function(){if(!$box){if(!$('body')[0]){$(publicMethod.init);return;}
$window=$(window);$box=$tag(div).attr({id:colorbox,'class':isIE?prefix+(isIE6?'IE6':'IE'):''});$overlay=$tag(div,"Overlay",isIE6?'position:absolute':'').hide();$wrap=$tag(div,"Wrapper");$content=$tag(div,"Content").append($loaded=$tag(div,"LoadedContent",'width:0; height:0; overflow:hidden'),$loadingOverlay=$tag(div,"LoadingOverlay").add($tag(div,"LoadingGraphic")),$title=$tag(div,"Title"),$current=$tag(div,"Current"),$next=$tag(div,"Next"),$prev=$tag(div,"Previous"),$slideshow=$tag(div,"Slideshow").bind(event_open,slideshow),$close=$tag(div,"Close"));$wrap.append($tag(div).append($tag(div,"TopLeft"),$topBorder=$tag(div,"TopCenter"),$tag(div,"TopRight")),$tag(div,false,'clear:left').append($leftBorder=$tag(div,"MiddleLeft"),$content,$rightBorder=$tag(div,"MiddleRight")),$tag(div,false,'clear:left').append($tag(div,"BottomLeft"),$bottomBorder=$tag(div,"BottomCenter"),$tag(div,"BottomRight"))).find('div div').css({'float':'left'});$loadingBay=$tag(div,false,'position:absolute; width:9999px; visibility:hidden; display:none');$('body').append($overlay,$box.append($wrap,$loadingBay));interfaceHeight=$topBorder.height()+$bottomBorder.height()+$content.outerHeight(true)-$content.height();interfaceWidth=$leftBorder.width()+$rightBorder.width()+$content.outerWidth(true)-$content.width();loadedHeight=$loaded.outerHeight(true);loadedWidth=$loaded.outerWidth(true);$box.css({"padding-bottom":interfaceHeight,"padding-right":interfaceWidth}).hide();$next.click(function(){publicMethod.next();});$prev.click(function(){publicMethod.prev();});$close.click(function(){publicMethod.close();});$groupControls=$next.add($prev).add($current).add($slideshow);$overlay.click(function(){if(settings.overlayClose){publicMethod.close();}});$(document).bind('keydown.'+prefix,function(e){var key=e.keyCode;if(open&&settings.escKey&&key===27){e.preventDefault();publicMethod.close();}
if(open&&settings.arrowKey&&$related[1]){if(key===37){e.preventDefault();$prev.click();}else if(key===39){e.preventDefault();$next.click();}}});}};publicMethod.remove=function(){$box.add($overlay).remove();$box=null;$('.'+boxElement).removeData(colorbox).removeClass(boxElement);};publicMethod.position=function(speed,loadedCallback){var top=0,left=0,offset=$box.offset();$window.unbind('resize.'+prefix);$box.css({top:-99999,left:-99999});if(settings.fixed&&!isIE6){$box.css({position:'fixed'});}else{top=$window.scrollTop();left=$window.scrollLeft();$box.css({position:'absolute'});}
if(settings.right!==false){left+=Math.max($window.width()-settings.w-loadedWidth-interfaceWidth-setSize(settings.right,'x'),0);}else if(settings.left!==false){left+=setSize(settings.left,'x');}else{left+=Math.round(Math.max($window.width()-settings.w-loadedWidth-interfaceWidth,0)/2);}
if(settings.bottom!==false){top+=Math.max($window.height()-settings.h-loadedHeight-interfaceHeight-setSize(settings.bottom,'y'),0);}else if(settings.top!==false){top+=setSize(settings.top,'y');}else{top+=Math.round(Math.max($window.height()-settings.h-loadedHeight-interfaceHeight,0)/2);}
$box.css({top:offset.top,left:offset.left});speed=($box.width()===settings.w+loadedWidth&&$box.height()===settings.h+loadedHeight)?0:speed||0;$wrap[0].style.width=$wrap[0].style.height="9999px";function modalDimensions(that){$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=that.style.width;$loadingOverlay[0].style.height=$loadingOverlay[1].style.height=$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=that.style.height;}
$box.dequeue().animate({width:settings.w+loadedWidth,height:settings.h+loadedHeight,top:top,left:left},{duration:speed,complete:function(){modalDimensions(this);active=false;$wrap[0].style.width=(settings.w+loadedWidth+interfaceWidth)+"px";$wrap[0].style.height=(settings.h+loadedHeight+interfaceHeight)+"px";if(settings.reposition){setTimeout(function(){$window.bind('resize.'+prefix,publicMethod.position);},1);}
if(loadedCallback){loadedCallback();}},step:function(){modalDimensions(this);}});};publicMethod.resize=function(options){if(open){options=options||{};if(options.width){settings.w=setSize(options.width,'x')-loadedWidth-interfaceWidth;}
if(options.innerWidth){settings.w=setSize(options.innerWidth,'x');}
$loaded.css({width:settings.w});if(options.height){settings.h=setSize(options.height,'y')-loadedHeight-interfaceHeight;}
if(options.innerHeight){settings.h=setSize(options.innerHeight,'y');}
if(!options.innerHeight&&!options.height){$loaded.css({height:"auto"});settings.h=$loaded.height();}
$loaded.css({height:settings.h});publicMethod.position(settings.transition==="none"?0:settings.speed);}};publicMethod.prep=function(object){if(!open){return;}
var callback,speed=settings.transition==="none"?0:settings.speed;$loaded.remove();$loaded=$tag(div,'LoadedContent').append(object);function getWidth(){settings.w=settings.w||$loaded.width();settings.w=settings.mw&&settings.mw<settings.w?settings.mw:settings.w;return settings.w;}
function getHeight(){settings.h=settings.h||$loaded.height();settings.h=settings.mh&&settings.mh<settings.h?settings.mh:settings.h;return settings.h;}
$loaded.hide().appendTo($loadingBay.show()).css({width:getWidth(),overflow:settings.scrolling?'auto':'hidden'}).css({height:getHeight()}).prependTo($content);$loadingBay.hide();$(photo).css({'float':'none'});if(isIE6){$('select').not($box.find('select')).filter(function(){return this.style.visibility!=='hidden';}).css({'visibility':'hidden'}).one(event_cleanup,function(){this.style.visibility='inherit';});}
callback=function(){var preload,i,total=$related.length,iframe,frameBorder='frameBorder',allowTransparency='allowTransparency',complete,src,img;if(!open){return;}
function removeFilter(){if(isIE){$box[0].style.removeAttribute('filter');}}
complete=function(){clearTimeout(loadingTimer);$loadingOverlay.hide();trigger(event_complete,settings.onComplete);};if(isIE){if(photo){$loaded.fadeIn(100);}}
$title.html(settings.title).add($loaded).show();if(total>1){if(typeof settings.current==="string"){$current.html(settings.current.replace('{current}',index+1).replace('{total}',total)).show();}
$next[(settings.loop||index<total-1)?"show":"hide"]().html(settings.next);$prev[(settings.loop||index)?"show":"hide"]().html(settings.previous);if(settings.slideshow){$slideshow.show();}
if(settings.preloading){preload=[getIndex(-1),getIndex(1)];while(i=$related[preload.pop()]){src=$.data(i,colorbox).href||i.href;if($.isFunction(src)){src=src.call(i);}
if(isImage(src)){img=new Image();img.src=src;}}}}else{$groupControls.hide();}
if(settings.iframe){iframe=$tag('iframe')[0];if(frameBorder in iframe){iframe[frameBorder]=0;}
if(allowTransparency in iframe){iframe[allowTransparency]="true";}
iframe.name=prefix+(+new Date());if(settings.fastIframe){complete();}else{$(iframe).one('load',complete);}
iframe.src=settings.href;if(!settings.scrolling){iframe.scrolling="no";}
$(iframe).addClass(prefix+'Iframe').appendTo($loaded).one(event_purge,function(){iframe.src="//about:blank";});}else{complete();}
if(settings.transition==='fade'){$box.fadeTo(speed,1,removeFilter);}else{removeFilter();}};if(settings.transition==='fade'){$box.fadeTo(speed,0,function(){publicMethod.position(0,callback);});}else{publicMethod.position(speed,callback);}};publicMethod.load=function(launched){var href,setResize,prep=publicMethod.prep;active=true;photo=false;element=$related[index];if(!launched){makeSettings();}
trigger(event_purge);trigger(event_load,settings.onLoad);settings.h=settings.height?setSize(settings.height,'y')-loadedHeight-interfaceHeight:settings.innerHeight&&setSize(settings.innerHeight,'y');settings.w=settings.width?setSize(settings.width,'x')-loadedWidth-interfaceWidth:settings.innerWidth&&setSize(settings.innerWidth,'x');settings.mw=settings.w;settings.mh=settings.h;if(settings.maxWidth){settings.mw=setSize(settings.maxWidth,'x')-loadedWidth-interfaceWidth;settings.mw=settings.w&&settings.w<settings.mw?settings.w:settings.mw;}
if(settings.maxHeight){settings.mh=setSize(settings.maxHeight,'y')-loadedHeight-interfaceHeight;settings.mh=settings.h&&settings.h<settings.mh?settings.h:settings.mh;}
href=settings.href;loadingTimer=setTimeout(function(){$loadingOverlay.show();},100);if(settings.inline){$tag(div).hide().insertBefore($(href)[0]).one(event_purge,function(){$(this).replaceWith($loaded.children());});prep($(href));}else if(settings.iframe){prep(" ");}else if(settings.html){prep(settings.html);}else if(isImage(href)){$(photo=new Image()).addClass(prefix+'Photo').error(function(){settings.title=false;prep($tag(div,'Error').text('This image could not be loaded'));}).load(function(){var percent;photo.onload=null;if(settings.scalePhotos){setResize=function(){photo.height-=photo.height*percent;photo.width-=photo.width*percent;};if(settings.mw&&photo.width>settings.mw){percent=(photo.width-settings.mw)/photo.width;setResize();}
if(settings.mh&&photo.height>settings.mh){percent=(photo.height-settings.mh)/photo.height;setResize();}}
if(settings.h){photo.style.marginTop=Math.max(settings.h-photo.height,0)/2+'px';}
if($related[1]&&(settings.loop||$related[index+1])){photo.style.cursor='pointer';photo.onclick=function(){publicMethod.next();};}
if(isIE){photo.style.msInterpolationMode='bicubic';}
setTimeout(function(){prep(photo);},1);});setTimeout(function(){photo.src=href;},1);}else if(href){$loadingBay.load(href,settings.data,function(data,status,xhr){prep(status==='error'?$tag(div,'Error').text('Request unsuccessful: '+xhr.statusText):$(this).contents());});}};publicMethod.next=function(){if(!active&&$related[1]&&(settings.loop||$related[index+1])){index=getIndex(1);publicMethod.load();}};publicMethod.prev=function(){if(!active&&$related[1]&&(settings.loop||index)){index=getIndex(-1);publicMethod.load();}};publicMethod.close=function(){if(open&&!closing){closing=true;open=false;trigger(event_cleanup,settings.onCleanup);$window.unbind('.'+prefix+' .'+event_ie6);$overlay.fadeTo(200,0);$box.stop().fadeTo(300,0,function(){$box.add($overlay).css({'opacity':1,cursor:'auto'}).hide();trigger(event_purge);$loaded.remove();setTimeout(function(){closing=false;trigger(event_closed,settings.onClosed);},1);});}};publicMethod.element=function(){return $(element);};publicMethod.settings=defaults;$('.'+boxElement,document).live('click',function(e){if(!(e.which>1||e.shiftKey||e.altKey||e.metaKey)){e.preventDefault();launch(this);}});publicMethod.init();}(jQuery,document,this));(function($){$.jGestures={};$.jGestures.defaults={};$.jGestures.defaults.thresholdPinchopen=0.05;$.jGestures.defaults.thresholdPinchmove=0.05;$.jGestures.defaults.thresholdPinch=0.05;$.jGestures.defaults.thresholdPinchclose=0.05;$.jGestures.defaults.thresholdRotatecw=5;$.jGestures.defaults.thresholdRotateccw=5;$.jGestures.defaults.thresholdMove=20;$.jGestures.defaults.thresholdSwipe=100;$.jGestures.data={};$.jGestures.data.capableDevicesInUserAgentString=['iPad','iPhone','iPod','Mobile Safari'];$.jGestures.data.hasGestures=(function(){var _i;for(_i=0;_i<$.jGestures.data.capableDevicesInUserAgentString.length;_i++){if(navigator.userAgent.indexOf($.jGestures.data.capableDevicesInUserAgentString[_i])!==-1){return true;}}return false;})();$.hasGestures=$.jGestures.data.hasGestures;$.jGestures.events={touchstart:'jGestures.touchstart',touchendStart:'jGestures.touchend;start',touchendProcessed:'jGestures.touchend;processed',gesturestart:'jGestures.gesturestart',gestureendStart:'jGestures.gestureend;start',gestureendProcessed:'jGestures.gestureend;processed'};jQuery.each({orientationchange_orientationchange01:"orientationchange",gestureend_pinchopen01:"pinchopen",gestureend_pinchclose01:"pinchclose",gestureend_rotatecw01:'rotatecw',gestureend_rotateccw01:'rotateccw',gesturechange_pinch01:'pinch',gesturechange_rotate01:'rotate',touchstart_swipe13:'swipemove',touchstart_swipe01:"swipeone",touchstart_swipe02:"swipetwo",touchstart_swipe03:"swipethree",touchstart_swipe04:"swipefour",touchstart_swipe05:'swipeup',touchstart_swipe06:'swiperightup',touchstart_swipe07:'swiperight',touchstart_swipe08:'swiperightdown',touchstart_swipe09:'swipedown',touchstart_swipe10:'swipeleftdown',touchstart_swipe11:'swipeleft',touchstart_swipe12:'swipeleftup',touchstart_tap01:'tapone',touchstart_tap02:'taptwo',touchstart_tap03:'tapthree',touchstart_tap04:'tapfour'},function(sInternal_,sPublicFN_){jQuery.event.special[sPublicFN_]={setup:function(){var _aSplit=sInternal_.split('_');var _sDOMEvent=_aSplit[0];var _sGestureEvent=_aSplit[1].slice(0,_aSplit[1].length-2);var _$element=jQuery(this);if(!_$element.data('ojQueryGestures')||!_$element.data('ojQueryGestures')[_sDOMEvent]){var _oDatajQueryGestures=_$element.data('ojQueryGestures')||{};var oObj={};oObj[_sDOMEvent]=true;$.extend(true,_oDatajQueryGestures,oObj);_$element.data('ojQueryGestures',_oDatajQueryGestures);if($.hasGestures){switch(_sGestureEvent){case'orientationchange':_$element.get(0).addEventListener('orientationchange',_onOrientationchange,false);break;case'tap':case'swipe':case'swipeup':case'swiperightup':case'swiperight':case'swiperightdown':case'swipedown':case'swipeleftdown':case'swipeleft':_$element.get(0).addEventListener('touchstart',_onTouchstart,false);break;case'pinchopen':case'pinchclose':case'rotatecw':case'rotateccw':_$element.get(0).addEventListener('gesturestart',_onGesturestart,false);_$element.get(0).addEventListener('gestureend',_onGestureend,false);break;case'pinch':case'rotate':_$element.get(0).addEventListener('gesturestart',_onGesturestart,false);_$element.get(0).addEventListener('gesturechange',_onGesturechange,false);break;}}
else{switch(_sGestureEvent){case'tap':case'swipe':_$element.bind('mousedown',_onTouchstart);break;case'orientationchange':case'pinchopen':case'pinchclose':case'rotatecw':case'rotateccw':case'pinch':case'rotate':break;}}}
return false;},add:function(event_){var _$element=jQuery(this);var _oDatajQueryGestures=_$element.data('ojQueryGestures');_oDatajQueryGestures[event_.type]={'originalType':event_.type};return false;},remove:function(event_){var _$element=jQuery(this);var _oDatajQueryGestures=_$element.data('ojQueryGestures');_oDatajQueryGestures[event_.type]=false;_$element.data('ojQueryGestures',_oDatajQueryGestures);return false;},teardown:function(){var _aSplit=sInternal_.split('_');var _sDOMEvent=_aSplit[0];var _sGestureEvent=_aSplit[1].slice(0,_aSplit[1].length-2);var _$element=jQuery(this);if(!_$element.data('ojQueryGestures')||!_$element.data('ojQueryGestures')[_sDOMEvent]){var _oDatajQueryGestures=_$element.data('ojQueryGestures')||{};var oObj={};oObj[_sDOMEvent]=false;$.extend(true,_oDatajQueryGestures,oObj);_$element.data('ojQueryGestures',_oDatajQueryGestures);if($.hasGestures){switch(_sGestureEvent){case'orientationchange':_$element.get(0).removeEventListener('orientationchange',_onOrientationchange,false);break;case'tap':case'swipe':case'swipeup':case'swiperightup':case'swiperight':case'swiperightdown':case'swipedown':case'swipeleftdown':case'swipeleft':case'swipeleftup':_$element.get(0).removeEventListener('touchstart',_onTouchstart,false);_$element.get(0).removeEventListener('touchmove',_onTouchmove,false);_$element.get(0).removeEventListener('touchend',_onTouchend,false);break;case'pinchopen':case'pinchclose':case'rotatecw':case'rotateccw':_$element.get(0).removeEventListener('gesturestart',_onGesturestart,false);_$element.get(0).removeEventListener('gestureend',_onGestureend,false);break;case'pinch':case'rotate':_$element.get(0).removeEventListener('gesturestart',_onGesturestart,false);_$element.get(0).removeEventListener('gesturechange',_onGesturechange,false);break;}}
else{switch(_sGestureEvent){case'tap':case'swipe':_$element.unbind('mousedown',_onTouchstart);_$element.unbind('mousemove',_onTouchmove);_$element.unbind('mouseup',_onTouchend);break;case'orientationchange':case'pinchopen':case'pinchclose':case'rotatecw':case'rotateccw':case'pinch':case'rotate':break;}}}
return false;}};});function _createOptions(oOptions_){oOptions_.startMove=(oOptions_.startMove)?oOptions_.startMove:{startX:null,startY:null,timestamp:null};var _iNow=new Date().getTime();if(oOptions_.touches){var _oDelta=[{lastX:oOptions_.deltaX,lastY:oOptions_.deltaY,moved:null,startX:oOptions_.screenX-oOptions_.startMove.screenX,startY:oOptions_.screenY-oOptions_.startMove.screenY}];var _oDirection={vector:oOptions_.vector,orientation:window.orientation||null,lastX:((_oDelta[0].lastX>0)?+1:((_oDelta[0].lastX<0)?-1:0)),lastY:((_oDelta[0].lastY>0)?+1:((_oDelta[0].lastY<0)?-1:0)),startX:((_oDelta[0].startX>0)?+1:((_oDelta[0].startX<0)?-1:0)),startY:((_oDelta[0].startY>0)?+1:((_oDelta[0].startY<0)?-1:0))};_oDelta[0].moved=Math.sqrt(Math.pow(Math.abs(_oDelta[0].startX),2)+Math.pow(Math.abs(_oDelta[0].startY),2));}
return{type:oOptions_.type||null,originalEvent:oOptions_.event||null,delta:_oDelta||null,direction:_oDirection||{orientation:window.orientation||null,vector:oOptions_.vector||null},duration:(oOptions_.startMove.timestamp)?_iNow-oOptions_.timestamp:null,rotation:oOptions_.rotation||null,scale:oOptions_.scale||null,description:oOptions_.description||[oOptions_.type,':',oOptions_.touches,':',((_oDelta[0].lastX!=0)?((_oDelta[0].lastX>0)?'right':'left'):'steady'),':',((_oDelta[0].lastY!=0)?((_oDelta[0].lastY>0)?'down':'up'):'steady')].join('')};}
function _onOrientationchange(event_){var _aDict=['landscape:clockwise:','portrait:default:','landscape:counterclockwise:','portrait:upsidedown:'];$(window).triggerHandler('orientationchange',{direction:{orientation:window.orientation},description:['orientationchange:',_aDict[((window.orientation/90)+1)],window.orientation].join('')});}
function _onTouchstart(event_){var _$element=jQuery(event_.currentTarget);_$element.triggerHandler($.jGestures.events.touchstart,event_);if($.hasGestures){event_.currentTarget.addEventListener('touchmove',_onTouchmove,false);event_.currentTarget.addEventListener('touchend',_onTouchend,false);}
else{_$element.bind('mousemove',_onTouchmove);_$element.bind('mouseup',_onTouchend);}
var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _eventBase=(event_.touches)?event_.touches[0]:event_;var _oObj={};_oObj.oLastSwipemove={screenX:_eventBase.screenX,screenY:_eventBase.screenY,timestamp:new Date().getTime()};_oObj.oStartTouch={screenX:_eventBase.screenX,screenY:_eventBase.screenY,timestamp:new Date().getTime()};_$element.data('ojQueryGestures',$.extend(true,_oDatajQueryGestures,_oObj));}
function _onTouchmove(event_){var _$element=jQuery(event_.currentTarget);var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _bHasTouches=!!event_.touches;var _iScreenX=(_bHasTouches)?event_.changedTouches[0].screenX:event_.screenX;var _iScreenY=(_bHasTouches)?event_.changedTouches[0].screenY:event_.screenY;var _oEventData=_oDatajQueryGestures.oLastSwipemove;var _iDeltaX=_iScreenX-_oEventData.screenX;var _iDeltaY=_iScreenY-_oEventData.screenY;if(!!_oDatajQueryGestures.oLastSwipemove){var _oDetails=_createOptions({type:'swipemove',touches:(_bHasTouches)?event_.touches.length:'1',screenY:_iScreenY,screenX:_iScreenX,deltaY:_iDeltaY,deltaX:_iDeltaX,startMove:_oEventData,event:event_,timestamp:_oEventData.timestamp});_$element.triggerHandler(_oDetails.type,_oDetails);}
var _oObj={};var _eventBase=(event_.touches)?event_.touches[0]:event_;_oObj.oLastSwipemove={screenX:_eventBase.screenX,screenY:_eventBase.screenY,timestamp:new Date().getTime()};_$element.data('ojQueryGestures',$.extend(true,_oDatajQueryGestures,_oObj));}
function _onTouchend(event_){var _$element=jQuery(event_.currentTarget);var _bHasTouches=!!event_.changedTouches;var _iTouches=(_bHasTouches)?event_.changedTouches.length:'1';var _iScreenX=(_bHasTouches)?event_.changedTouches[0].screenX:event_.screenX;var _iScreenY=(_bHasTouches)?event_.changedTouches[0].screenY:event_.screenY;_$element.triggerHandler($.jGestures.events.touchendStart,event_);if($.hasGestures){event_.currentTarget.removeEventListener('touchmove',_onTouchmove,false);event_.currentTarget.removeEventListener('touchend',_onTouchend,false);}
else{_$element.unbind('mousemove',_onTouchmove);_$element.unbind('mouseup',_onTouchend);}
var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _bHasMoved=(Math.abs(_oDatajQueryGestures.oStartTouch.screenX-_iScreenX)>$.jGestures.defaults.thresholdMove||Math.abs(_oDatajQueryGestures.oStartTouch.screenY-_iScreenY)>$.jGestures.defaults.thresholdMove)?true:false;var _bHasSwipeGesture=(Math.abs(_oDatajQueryGestures.oStartTouch.screenX-_iScreenX)>$.jGestures.defaults.thresholdSwipe||Math.abs(_oDatajQueryGestures.oStartTouch.screenY-_iScreenY)>$.jGestures.defaults.thresholdSwipe)?true:false;var _sType;for(_sType in _oDatajQueryGestures){var _oEventData=_oDatajQueryGestures.oStartTouch;var _oDelta={};var _iScreenX=(_bHasTouches)?event_.changedTouches[0].screenX:event_.screenX;var _iScreenY=(_bHasTouches)?event_.changedTouches[0].screenY:event_.screenY;var _iDeltaX=_iScreenX-_oEventData.screenX;var _iDeltaY=_iScreenY-_oEventData.screenY;var _oDetails=_createOptions({type:'swipe',touches:_iTouches,screenY:_iScreenY,screenX:_iScreenX,deltaY:_iDeltaY,deltaX:_iDeltaX,startMove:_oEventData,event:event_,timestamp:_oEventData.timestamp});var _aDict=['zero','one','two','three','four'];var _bIsSwipe=false;switch(_sType){case'swipeone':if(_bHasTouches===false&&_iTouches==1&&_bHasMoved===false){break;}
if(_bHasTouches===false||(_iTouches==1&&_bHasMoved===true&&_bHasSwipeGesture===true)){_bIsSwipe=true;_oDetails.type=['swipe',_aDict[_iTouches]].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'swipetwo':if((_bHasTouches&&_iTouches==2&&_bHasMoved===true&&_bHasSwipeGesture===true)){_bIsSwipe=true;_oDetails.type=['swipe',_aDict[_iTouches]].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'swipethree':if((_bHasTouches&&_iTouches==3&&_bHasMoved===true&&_bHasSwipeGesture===true)){_bIsSwipe=true;_oDetails.type=['swipe',_aDict[_iTouches]].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'swipefour':if((_bHasTouches&&_iTouches==4&&_bHasMoved===true&&_bHasSwipeGesture===true)){_bIsSwipe=true;_oDetails.type=['swipe',_aDict[_iTouches]].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'swipeup':case'swiperightup':case'swiperight':case'swiperightdown':case'swipedown':case'swipeleftdown':case'swipeleft':case'swipeleftup':if(_bHasTouches&&_bHasMoved===true&&_bHasSwipeGesture===true){_bIsSwipe=true;_oDetails.type=['swipe',((_oDetails.delta[0].lastX!=0)?((_oDetails.delta[0].lastX>0)?'right':'left'):''),((_oDetails.delta[0].lastY!=0)?((_oDetails.delta[0].lastY>0)?'down':'up'):'')].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'tapone':case'taptwo':case'tapthree':case'tapfour':if((_bHasMoved!==true&&_bIsSwipe!==true)&&(_aDict[_iTouches]==_sType.slice(3))){_oDetails.description=['tap',_aDict[_iTouches]].join('');_oDetails.type=['tap',_aDict[_iTouches]].join('');_$element.triggerHandler(_oDetails.type,_oDetails);}
break;}
var _oObj={};_$element.data('ojQueryGestures',$.extend(true,_oDatajQueryGestures,_oObj));_$element.data('ojQueryGestures',$.extend(true,_oDatajQueryGestures,_oObj));}
_$element.triggerHandler($.jGestures.events.touchendProcessed,event_);}
function _onGesturestart(event_){var _$element=jQuery(event_.currentTarget);_$element.triggerHandler($.jGestures.events.gesturestart,event_);var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _oObj={};_oObj.oStartTouch={timestamp:new Date().getTime()};_$element.data('ojQueryGestures',$.extend(true,_oDatajQueryGestures,_oObj));}
function _onGesturechange(event_){var _$element=jQuery(event_.currentTarget);var _iDelta,_iDirection,_sDesc,_oDetails;var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _sType;for(_sType in _oDatajQueryGestures){switch(_sType){case'pinch':_iDelta=event_.scale;if(((_iDelta<1)&&(_iDelta%1)<(1-$.jGestures.defaults.thresholdPinchclose))||((_iDelta>1)&&(_iDelta%1)>($.jGestures.defaults.thresholdPinchopen))){_iDirection=(_iDelta<1)?-1:+1;_oDetails=_createOptions({type:'pinch',scale:_iDelta,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,vector:_iDirection,description:['pinch:',_iDirection,':',((_iDelta<1)?'close':'open')].join('')});_$element.triggerHandler(_oDetails.type,_oDetails);}
break;case'rotate':_iDelta=event_.rotation;if(((_iDelta<1)&&(-1*(_iDelta)>$.jGestures.defaults.thresholdRotateccw))||((_iDelta>1)&&(_iDelta>$.jGestures.defaults.thresholdRotatecw))){_iDirection=(_iDelta<1)?-1:+1;_oDetails=_createOptions({type:'rotate',rotation:_iDelta,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,vector:_iDirection,description:['rotate:',_iDirection,':',((_iDelta<1)?'counterclockwise':'clockwise')].join('')});_$element.triggerHandler(_oDetails.type,_oDetails);}
break;}}}
function _onGestureend(event_){var _$element=jQuery(event_.currentTarget);_$element.triggerHandler($.jGestures.events.gestureendStart,event_);var _iDelta;var _oDatajQueryGestures=_$element.data('ojQueryGestures');var _sType;for(_sType in _oDatajQueryGestures){switch(_sType){case'pinchclose':_iDelta=event_.scale;if((_iDelta<1)&&(_iDelta%1)<(1-$.jGestures.defaults.thresholdPinchclose)){_$element.triggerHandler('pinchclose',_createOptions({type:'pinchclose',scale:_iDelta,vector:-1,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,description:'pinch:-1:close'}));}
break;case'pinchopen':_iDelta=event_.scale;if((_iDelta>1)&&(_iDelta%1)>($.jGestures.defaults.thresholdPinchopen)){_$element.triggerHandler('pinchopen',_createOptions({type:'pinchopen',scale:_iDelta,vector:+1,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,description:'pinch:+1:open'}));}
break;case'rotatecw':_iDelta=event_.rotation;if((_iDelta>1)&&(_iDelta>$.jGestures.defaults.thresholdRotatecw)){_$element.triggerHandler('rotatecw',_createOptions({type:'rotatecw',rotation:_iDelta,vector:+1,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,description:'rotate:+1:clockwise'}));}
break;case'rotateccw':_iDelta=event_.rotation;if((_iDelta<1)&&(-1*(_iDelta)>$.jGestures.defaults.thresholdRotateccw)){_$element.triggerHandler('rotateccw',_createOptions({type:'rotateccw',rotation:_iDelta,vector:-1,touches:null,startMove:_oDatajQueryGestures.oStartTouch,event:event_,timestamp:_oDatajQueryGestures.oStartTouch.timestamp,description:'rotate:-1:counterclockwise'}));}
break;}}
_$element.triggerHandler($.jGestures.events.gestureendProcessed,event_);}})(jQuery);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(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
{console.log();return window.console;}catch(err){return window.console={};}})());if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement){"use strict";if(this===void 0||this===null){throw new TypeError();}
var t=Object(this);var len=t.length>>>0;if(len===0){return-1;}
var n=0;if(arguments.length>0){n=Number(arguments[1]);if(n!==n){n=0;}else if(n!==0&&n!==Infinity&&n!==-Infinity){n=(n>0||-1)*Math.floor(Math.abs(n));}}
if(n>=len){return-1;}
var k=n>=0?n:Math.max(len-Math.abs(n),0);for(;k<len;k++){if(k in t&&t[k]===searchElement){return k;}}
return-1;}}
jQuery.fx.interval=25;(function($){jQuery.fn.backgroundPosition=function(){var p=$(this).css('background-position');if(typeof(p)==='undefined')return $(this).css('background-position-x')+' '+$(this).css('background-position-y');else return p;};})(jQuery);function getLocationBase(){var i=window.location.href.indexOf('#');if(i!==-1){var base=window.location.href.substring(0,i);}else{var base=window.location.href;}
return base;}
var styleBuffer={};var contentBuffer={};var contentList=[];var lastActiveNavEl;var centeredNavEl;var allowLocationAction=false;function changeLocation(arg){var loc;if(typeof arg==='string'){loc=arg;}else{for(var k in contentBuffer){if(contentBuffer.hasOwnProperty(k)&&contentBuffer[k][0]===arg[0]){loc=k;$('.submenu a').removeClass('active').each(function(){if($(this).attr('href')===k){$(this).addClass('active');}});}}}
if(loc){if(Modernizr.history){if(loc!==location.pathname+location.search){history.pushState({location:loc},'',loc);}}else{allowLocationAction=false;window.location='#'+loc;}}}
var changeStyle=function(){var current=null;return function(href){var head=$('head');var style=head.children('.custom-colors');if(style.length>0&&href===current){return;}
style.remove();current=href;var styles=styleBuffer[href];if(styles){head.append('<style class="custom-colors">'+styles+'</style>');}};}();var changeBackground=function(){var pending=null;var pendingCallback=null;return function(url,duration,cb){cb=cb||function(){};if(url&&url.length>0){var img=$('.background img');if(img.length===1){duration=typeof duration==='number'?duration:1000;var first=img.first();if(first.attr('src')!==url){var clone=first.clone().load(function(){first.fadeOut(duration,function(){$(this).remove();if(pending&&pending!==url){changeBackground(pending,300,pendingCallback);}else{cb();}
pending=null;pendingCallback=null;});}).error(function(){if($(this).siblings().length>0){$(this).prev().fadeIn();$(this).remove();}
cb();});clone.css({zIndex:1}).attr('src',url);first.css({zIndex:2}).after(clone);}}else{pending=url;pendingCallback=cb;}}};}();function scrollTo(v,callback){var top=null;if(typeof v==='number'){top=v;}else if(v.length>0){top=v.offset().top;}
if(top!==null){var current=$(window).scrollTop();var distance=Math.abs(top-current);if(distance>50){var duration=distance>500?1000:500;$('html, body').stop(true).animate({scrollTop:top},duration,'easeOutBack',callback||function(){});}else{$('html, body').stop(true).scrollTop(top);(callback||function(){})();}}}
var mainMovedOut=false;var mainMovingOut=false;var mainMovingIn=false;var afterMainMove=[];function moveMainOut(topOut,leftOut,avoidTransforms,callback){var mainEl=$('.main');if(callback){if(mainMovedOut){callback();}else{afterMainMove.push(callback);}}
if(!mainMovingOut&&!mainMovedOut){mainMovingOut=true;scrollTo(0,function(){$('html').css('overflow-x','hidden');mainEl.find('.visual').stop(true).animate({opacity:0},600);mainEl.animate({top:topOut+'px',left:leftOut+'px',avoidTransforms:avoidTransforms},700,'easeInQuad',function(){mainEl.css({display:'none',top:topOut*-1+'px',left:leftOut*-1+'px'});mainEl.empty();contentBuffer={};mainMovedOut=true;mainMovingOut=false;for(var i=0,l=afterMainMove.length;i<l;i++){afterMainMove[i]();}
afterMainMove=[];});});}}
var pendingLocation=null;var showContentXhrs=[];function showContent(loc){var mainEl=$('.main');if(mainMovingIn){pendingLocation=loc;return;}
$.each(showContentXhrs,function(i,xhr){xhr.abort();});showContentXhrs=[];var locations=[];if('/company/'===loc.substring(0,9)){locations=[loc];}else{var i=0;while(i<100&&loc!==root){locations.push(loc);loc=loc.substring(0,loc.length-1)
loc=loc.substring(0,loc.lastIndexOf('/')+1);i++;}
locations.reverse();}
contentList=locations;if(locations.length>0){$('body').addClass('loading');}
$.each(locations,function(i,relLoc){if(typeof contentBuffer[relLoc]==='undefined'){var ajaxLoc=relLoc+(relLoc.indexOf('?')>-1?'&':'?')+'ajax=1';var xhr=$.ajax({url:ajaxLoc,dataType:'text',error:function(xhr,status,error){if(status==='error'){$('body').removeClass('loading');}},success:function(data,status,xhr){data=$(data);var el=data.find('article').first().attr('data-level',i);if(status==='error'||el.length===0){$('body').removeClass('loading');return;}
var styles=data.find('.custom-colors');styleBuffer[relLoc]=styles.html();styles.remove();var sectionName=el.attr('data-section');if(sectionName!==mainEl.attr('data-section')){var navActive=$('.events .active');var oldIndex=lastActiveNavEl?lastActiveNavEl.index():null;var newIndex=null;if('event-'===sectionName.substring(0,6)){var eventSlug=sectionName.substring(6);if(!navActive.hasClass('nav-events-'+eventSlug)){deactivate(navActive);navActive=$('.nav-events-'+eventSlug).first();activate(navActive);centerCarousel(navActive);}
newIndex=navActive.index();lastActiveNavEl=navActive;}else{deactivate(navActive);lastActiveNavEl=null;}}
if(sectionName!==mainEl.attr('data-section')){var leftOut=0;var leftIn=0;var topOut=0;var topIn=0;if(oldIndex!==null&&newIndex!==null){if(newIndex>oldIndex){leftOut=-(($(document).width()+924)/2);leftIn=-30;}else{leftOut=($(document).width()+924)/2;leftIn=30;}}else if(newIndex===null){topOut=1000;topIn=0;}else{topOut=-1000;topIn=0;}
var avoidTransforms=false;if(navigator.userAgent.toLowerCase().indexOf('webkit')>-1){avoidTransforms=true;}
var moveIn=function(){mainMovingIn=true;contentBuffer[relLoc]=el;el.attr('data-href',relLoc);changeStyle(relLoc);mainEl.children('[data-level="0"]').each(function(){var href=$(this).attr('data-href');if(contentBuffer.hasOwnProperty(href)){contentBuffer[href].remove();delete contentBuffer[href];}
$(this).remove();});mainEl.css({display:'none'}).append(el);mainEl.find('.visual').css({opacity:0}).animate({opacity:1},600);mainEl.css({display:''}).animate({top:topIn+'px',left:leftIn+'px',avoidTransforms:avoidTransforms},700,'easeOutCubic',function(){mainEl.animate({top:0,left:0,avoidTransforms:avoidTransforms},400,'easeInOutQuad',function(){mainMovedOut=false;mainMovingIn=false;mainEl.css({top:'',left:''});$('html').css('overflow-x','');changeBackground(el.attr('data-background'),null,function(){});initLightbox(mainEl);if(!Modernizr.history){window.location='#'+relLoc;}
if(pendingLocation!==null){showContent(pendingLocation);pendingLocation=null;}});});};if(mainEl.attr('data-section')){moveMainOut(topOut,leftOut,avoidTransforms,moveIn);}else{moveIn();}
$('body').removeClass('loading');}else{var paginated=false;var pageParamIndex=relLoc.indexOf('page=');if(pageParamIndex>-1){var baseLoc=relLoc.substring(0,relLoc.indexOf('?'));if(typeof contentBuffer[baseLoc]!=='undefined'){paginated=true;var moreHref=el.find('.more').attr('href');var moreEl=contentBuffer[baseLoc].find('.more');if(moreHref){moreEl.attr('href',moreHref);}else{moreEl.remove();}
var pagEl=contentBuffer[baseLoc].find('.paginated').first();var newItems=el.find('.paginated').first().children();pagEl.append(newItems.css('opacity',0));$('body').removeClass('loading');newItems.each(function(j){initLightbox($(this));var that=$(this);setTimeout(function(){that.stop(true).animate({opacity:1},Math.random()*1500+300);},Math.random()*400+300*j);});}}
if(!paginated){mainEl.css({display:'',left:''});if(el.children('.common').length>0&&$('.main > article > .common').length>0){el.children('.common').remove();}
el.attr('data-href',relLoc);if(i===locations.length-1){el.children().css('opacity',0).each(function(){$(this).stop(true).delay(Math.random()*3000).animate({opacity:1},Math.random()*900+300);});}else{el.css('opacity',0).animate({opacity:1},500);}
var lastlower;mainEl.children().each(function(){var level=parseInt($(this).attr('data-level'),10);if(i>level){lastlower=$(this);}});if(lastlower){lastlower.after(el);}else{mainEl.prepend(el);}
initLightbox(el);contentBuffer[relLoc]=el;if(i===locations.length-1){$('body').removeClass('loading');for(var k in contentBuffer){if(contentBuffer.hasOwnProperty(k)&&locations.indexOf(k)===-1){contentBuffer[k].remove();delete contentBuffer[k];}}
setTimeout(function(){changeStyle(relLoc);scrollTo(el,function(){changeBackground(el.attr('data-background'));});},500);}}}
mainEl.attr('data-section',sectionName);}});showContentXhrs.push(xhr);}else if(i===locations.length-1){$('body').removeClass('loading');changeStyle(relLoc);scrollTo(contentBuffer[relLoc],function(){changeBackground(contentBuffer[relLoc].attr('data-background'));});}});}
function goHome(){deactivate();lastActiveNavEl=null;$('.main').fadeOut(500,function(){$(this).removeAttr('data-section').empty().show().css('opacity','');contentBuffer={};contentList=[];changeLocation(root);changeStyle(root);});}
function locationEquals(path){return(!Modernizr.history&&Modernizr.hashchange&&location.hash==='#'+path||(!Modernizr.hashchange||Modernizr.history)&&location.pathname+location.search===path);}
if(Modernizr.history){var readyPopstate=false;$(window).bind('popstate',function(ev){readyPopstate=true;$.fn.colorbox.close();if(allowLocationAction){var path=location.pathname+location.search;if(path){if(path===''||path===root){goHome();}else{showContent(path);}}}});}else if(Modernizr.hashchange){$(window).bind('hashchange',function(ev){$.fn.colorbox.close();if(allowLocationAction){var hash=window.location.hash;if(hash===''||hash==='#'+root){goHome();}else if(hash.indexOf('#')+root!==-1){var loc=hash.slice(1);showContent(loc);}}else{allowLocationAction=true;}});}
function pushLocation(loc){if(Modernizr.history){history.pushState({location:loc},'',loc);$(window).trigger('popstate');}else if(Modernizr.hashchange){allowLocationAction=true;window.location='#'+loc;}else{window.location=loc;}}
if(Modernizr.hashchange){var articleHoverTimer;$(document).delegate('.main > article','mouseover',function(){clearTimeout(articleHoverTimer);var $this=$(this);articleHoverTimer=setTimeout(function(){changeStyle($this.attr('data-href'));changeBackground($this.attr('data-background'));},200);});$(document).delegate('a[href^="'+root+'"]','click',function(ev){ev.preventDefault();if($(this).closest('nav.events').length>0){return;}
var loc=$(this).attr('href');pushLocation(loc);});$(document).ready(function(){allowLocationAction=true;if(Modernizr.history){var hash=window.location.hash;if(hash.indexOf('#/')!==-1){var loc=hash.slice(1);history.pushState({location:loc},'',loc);setTimeout(function(){if(!readyPopstate){$(window).trigger('popstate');}},50);}}else{$(window).trigger('hashchange');}});}
function fillEffect(selector){$(document).delegate(selector,'mouseover',function(ev){$(this).stop(true).animate({backgroundPosition:'0 0'},800,'linear');});$(document).delegate(selector,'mouseout',function(ev){$(this).stop(true).animate({backgroundPosition:'-500px 0'},250,'linear');});}
function centerCarousel(el,callback,duration,easing){if(el.length===0){return;}
if(typeof duration==='undefined'){duration=700;}
if(typeof easing==='undefined'){easing='easeOutQuad';}
var dw=$(document).width();var list=el.parent();var items=list.children();var iw=el.outerWidth();list.stop(true,false);var curMargin=parseInt(list.curStyles('marginLeft').marginLeft,10);var delta=dw/2-el.position().left-iw/2;if(Math.abs(delta)<iw){duration*=Math.abs(delta)/iw;}
if(delta>0){var count=Math.ceil(delta/iw);var comp=Math.max(0,Math.floor((-curMargin)/iw));count=Math.max(0,count-comp);var margin=curMargin-count*iw;list.prepend(items.slice(items.length-count)).css({marginLeft:margin+'px'}).animate({marginLeft:margin+delta+'px'},duration,easing,function(){centeredNavEl=el;if(typeof callback==='function'){callback(el);}});}else{var tooManyLeft=Math.floor(-curMargin/iw);if(tooManyLeft>0){list.append(items.slice(0,tooManyLeft));items=list.children();curMargin+=tooManyLeft*iw;list.css({marginLeft:curMargin+'px'});}
var count=Math.floor(-delta/iw);list.animate({marginLeft:curMargin+delta+'px'},duration,easing,function(){$(this).append(items.slice(0,count)).css({marginLeft:curMargin+delta+count*iw+'px'});centeredNavEl=el;if(typeof callback==='function'){callback(el);}});}}
function activate(el){deactivate();el.addClass('active');}
function deactivate(el){if(!el){el=$('.events .active');}
el.removeClass('active');}
function initCarousel(){var dw=$(document).width();var list=$('.events > :first-child');var items=list.children();if(items.length===0){return;}
var iw=items.first().outerWidth();var ew=items.length*iw;for(var i=0;i<Math.floor((dw*2)/ew);i++){var clones=items.clone().removeClass('active');list.append(clones);}
items=list.children();var timer;var autorotate=true;var mouseInside=false;var pageX;var lastRelPos=null;var shiftRelPadding=.1;var minDuration=200;var maxDuration=1000;function shiftCarousel(allow){var relPos=pageX/dw;if(mouseInside&&(relPos<shiftRelPadding||relPos>1-shiftRelPadding)&&(lastRelPos===null||allow)){list.removeClass('not-shifting');lastRelPos=relPos;if(locationEquals(root)){deactivate(list.children('.active'));}
var centerEl=centeredNavEl||list.children().eq(Math.ceil(dw/2/iw));if(relPos<.5){var toItem=centerEl.prev();}else{var toItem=centerEl.next();}
var duration=minDuration+(.5-Math.abs(relPos-.5))/shiftRelPadding*(maxDuration-minDuration);centerCarousel(toItem,function(){shiftCarousel(true);},duration,'linear');}else if(allow||lastRelPos!==null&&relPos>=shiftRelPadding&&relPos<=1-shiftRelPadding){lastRelPos=null;list.addClass('not-shifting');var centerEl=centeredNavEl||list.children().eq(Math.ceil(dw/2/iw));if(relPos<.5){var toItem=centerEl.prev();}else{var toItem=centerEl.next();}
var duration=minDuration+(.5-Math.abs(relPos-.5))/shiftRelPadding*(maxDuration-minDuration);duration*=1.2;centerCarousel(toItem,null,duration);}}
function mouseInsideAction(ev){clearTimeout(timer);if(ev&&ev.pageX){pageX=ev.pageX;}
mouseInside=true;autorotate=false;shiftCarousel();}
function itemClickAction(ev){ev.preventDefault();var $this=$(this);activate($this);var oldIndex=lastActiveNavEl?lastActiveNavEl.index():null;var newIndex=$this.index();centerCarousel($this);var loc=$this.children(':first-child').attr('href');var func=function(){if(lastActiveNavEl&&loc!==lastActiveNavEl.children(':first-child').attr('href')){var leftOut;var topOut=0;if(newIndex>oldIndex){leftOut=-(($(document).width()+924)/2);}else{leftOut=($(document).width()+924)/2;}
var avoidTransforms=false;if(navigator.userAgent.toLowerCase().indexOf('webkit')>-1){avoidTransforms=true;}
moveMainOut(topOut,leftOut,avoidTransforms)}
pushLocation(loc);};func();}
function rotate(){if(autorotate&&locationEquals(root)){var active=list.children('.active');if(active.length===0){var next=lastActiveNavEl?lastActiveNavEl.next():list.children().eq(Math.ceil(dw/2/iw));}else{var next=active.next();}
deactivate(active);centerCarousel(next,function(el){activate(el);changeBackground(el.attr('data-background'))});}}
$(document).delegate('.events','mouseover',mouseInsideAction);$(document).delegate('.events','mousemove',mouseInsideAction);$(document).delegate('.events','mouseout',function(){mouseInside=false;timer=setTimeout(function(){lastRelPos=null;list.addClass('not-shifting');var active=list.children('.active');if(active.length===0){autorotate=true;}else if(!$('.main').is(':animated')){var href=active.children(':first-child').attr('href');var x=dw/2;var closest,distance=null;list.children().each(function(){if($(this).children(':first-child').attr('href')===href){var dist=Math.abs(x-($(this).offset().left+iw/2));if(distance===null||dist<distance){closest=$(this);distance=dist;}}});centerCarousel(closest,function(el){autorotate=true;deactivate(active);activate(closest);},900,'easeInOutQuad');}else{autorotate=true;}},300);});$(document).delegate('.events li','click',itemClickAction);if(locationEquals(root)){rotate();}
else if(!Modernizr.hashchange){centerCarousel(list.children('.active'),function(navEl){activate(navEl);},0);}
setInterval(rotate,5000);}
function initLightbox(el){el=el||$('body');el.find('a[href$=".jpg"]').attr('rel','media').colorbox({opacity:1,rel:'media',transition:'fade',maxWidth:'80%',maxHeight:'90%'});el.find('a[href*="youtube.com"]').attr('rel','media').each(function(){var url=this.href.replace(new RegExp("watch\\?v=","i"),'embed/');var ampIndex=url.indexOf('&');if(ampIndex>-1){url=url.substring(0,ampIndex);}
url+='?rel=0&hd=1&wmode=opaque&autoplay=1&fs=1';$(this).colorbox({href:url,iframe:true,opacity:1,rel:'media',transition:'fade',width:'80%',height:'90%',maxWidth:'80%',maxHeight:'90%'});});}
$(document).ready(function(){initCarousel();initLightbox();fillEffect('.no-csstransitions header nav a, .no-csstransitions .visual .website, .no-csstransitions .visual .ticketing, .no-csstransitions .media a h2, .no-csstransitions .news .more');});$(document).delegate('form','submit',function(ev){ev.preventDefault();$(this).ajaxSubmit({success:function(responseText,statusText,xhr,$form){var response=$(responseText).find('article');$form.closest('article').replaceWith(response);scrollTo(response);}});});$(document).delegate('.social a','click',function(ev){ev.preventDefault();var addthisEl=$('#addthis');if(addthisEl.length===0){addthisEl=$('<div id="addthis"></div>').css({visibility:'hidden'}).appendTo($('body'));}
addthisEl.empty();var url=$(this).closest('ul').attr('data-url');if(url){var link=$('<a addthis:url="'+url+'" class="addthis_button_'+$(this).attr('data-service')+'"></a>');addthisEl.append(link);addthis.toolbox('#addthis');link.click();}});$(document).delegate('a','click',function(){if($(this).attr('rel')==='media'||$(this).attr('data-service')){return false;}
var r=location.href.split('/').slice(0,3).join('/');if(this.href&&this.href.indexOf(r)!==0&&this.href.charAt(0)!=='#'&&this.href.indexOf('javascript:')!==0){window.open(this.href);return false;}
return true;});(function(){var $loader;var timer;var delay=2000;var duration=1000;function init(){$loader=$('<div class="ajaxloader"></div>').hide().click(hide).appendTo(document.body);}
function show(){timer=setTimeout(function(){$loader.fadeIn(duration);},delay);}
function hide(){clearTimeout(timer);$loader.fadeOut(200);}
$(document).ready(init).ajaxStart(show).ajaxStop(hide);})();
