(function($){var n=$.preload=function(c,d){if(c.split){c=$(c);}d=$.extend({},n.defaults,d);var f=$.map(c,function(a){if(!a){return;}if(a.split){return d.base+a+d.ext;}var b=a.src||a.href;if(typeof d.placeholder=="string"&&a.src){a.src=d.placeholder;}if(b&&d.find){b=b.replace(d.find,d.replace);}return b||null;}),g={loaded:0,failed:0,next:0,done:0,total:f.length};if(!g.total){return m();}var h="<img/>",j=d.threshold;while(--j>0){h+="<img/>";}h=$(h).load(k).error(k).bind("abort",k).each(l);function k(e){g.found=e.type=="load";g.image=this.src;var a=g.original=c[this.index];g[g.found?"loaded":"failed"]++;g.done++;if(d.placeholder&&a.src){a.src=g.found?g.image:d.notFound||a.src;}if(d.onComplete){d.onComplete(g);}if(g.done<g.total){l(0,this);}else{if(h.unbind){h.unbind("load").unbind("error").unbind("abort");}h=null;m();}}function l(i,a,b){if($.browser.msie&&g.next&&g.next%n.gap==0&&!b){setTimeout(function(){l(i,a,1);},0);return !1;}if(g.next==g.total){return !1;}a.index=g.next;a.src=f[g.next++];if(d.onRequest){g.image=a.src;g.original=c[g.next-1];d.onRequest(g);}}function m(){if(d.onFinish){d.onFinish(g);}}};n.gap=14;n.defaults={threshold:2,base:"",ext:"",replace:""};$.fn.preload=function(a){n(this,a);return this;};})(jQuery);(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel;};$.ifixpng.regexp={bg:/^url\(["']?(.*\.png([?].*)?)["']?\)$/i,img:/.*\.png([?].*)?$/i},$.ifixpng.getPixel=function(){return $.ifixpng.pixel||"images/pixel.gif";};var hack={base:$("base").attr("href"),ltie7:$.browser.msie&&$.browser.version<7,filter:function(src){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";}};$.fn.ifixpng=hack.ltie7?function(){function fixImage(image,source,width,height,hidden){image.css({filter:hack.filter(source),width:width,height:height}).attr({src:$.ifixpng.getPixel()}).positionFix();}return this.each(function(){var $$=$(this);if($$.is("img")||$$.is("input")){var source,img;if(this.src&&this.src.match($.ifixpng.regexp.img)){source=(hack.base&&this.src.substring(0,1)!="/"&&this.src.indexOf(hack.base)===-1)?hack.base+this.src:this.src;if(!this.width||!this.height){$(new Image()).one("load",function(){fixImage($$,source,this.width,this.height);$(this).remove();}).attr("src",source);}else{fixImage($$,source,this.width,this.height);}}}else{if(this.style){var imageSrc=$$.css("backgroundImage");if(imageSrc&&imageSrc.match($.ifixpng.regexp.bg)&&this.currentStyle.backgroundRepeat=="no-repeat"){imageSrc=RegExp.$1;var x=this.currentStyle.backgroundPositionX||0,y=this.currentStyle.backgroundPositionY||0;if(x||y){var css={},img;if(typeof x!="undefined"){if(x=="left"){css.left=0;}else{if(x=="right"){css.right=$$.width()%2===1?-1:0;}else{css.left=x;}}}if(typeof y!="undefined"){if(y=="bottom"){css.bottom=$$.height()%2===1?-1:0;}else{if(y=="top"){css.top=0;}else{css.top=y;}}}img=new Image();$(img).one("load",function(){var x,y,expr={},prop;if(/center|%/.test(css.top)){expr.top="(this.parentNode.offsetHeight - this.offsetHeight) * "+(css.top=="center"?0.5:(parseInt(css.top)/100));delete css.top;}if(/center|%/.test(css.left)){expr.left="(this.parentNode.offsetWidth - this.offsetWidth) * "+(css.left=="center"?0.5:(parseInt(css.left)/100));delete css.left;}$$.positionFix().css({backgroundImage:"none"}).prepend($("<div></div>").css(css).css({width:this.width,height:this.height,position:"absolute",filter:hack.filter(imageSrc)}));if(expr.top||expr.left){var elem=$$.children(":first")[0];for(prop in expr){elem.style.setExpression(prop,expr[prop],"JavaScript");}}$(this).remove();});img.src=imageSrc;}else{$$.css({backgroundImage:"none",filter:hack.filter(imageSrc)});}}}}});}:function(){return this;};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);if($$.css("position")!="absolute"){$$.css({position:"relative"});}});};})(jQuery);(function(F){var A="2.34";if(F.support==undefined){F.support={opacity:!(F.browser.msie&&/MSIE 6.0/.test(navigator.userAgent))};}function C(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments,""));}}F.fn.cycle=function(I){if(this.length==0){C("terminating; zero elements found by selector"+(F.isReady?"":" (DOM not ready)"));return this;}var J=arguments[1];return this.each(function(){if(this.cycleStop==undefined){this.cycleStop=0;}if(I===undefined||I===null){I={};}if(I.constructor==String){switch(I){case"stop":this.cycleStop++;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=0;F(this).removeData("cycle.opts");return;case"pause":this.cyclePause=1;return;case"resume":this.cyclePause=0;if(J===true){I=F(this).data("cycle.opts");if(!I){C("options not found, can not resume");return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0;}D(I.elements,I,1,1);}return;default:I={fx:I};}}else{if(I.constructor==Number){var R=I;I=F(this).data("cycle.opts");if(!I){C("options not found, can not advance slide");return;}if(R<0||R>=I.elements.length){C("invalid slide index: "+R);return;}I.nextSlide=R;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0;}D(I.elements,I,1,R>=I.currSlide);return;}}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=0;this.cyclePause=0;var W=F(this);var S=I.slideExpr?F(I.slideExpr,this):W.children();var N=S.get();if(N.length<2){C("terminating; too few slides: "+N.length);return;}var K=F.extend({},F.fn.cycle.defaults,I||{},F.metadata?W.metadata():F.meta?W.data():{});if(K.autostop){K.countdown=K.autostopCount||N.length;}W.data("cycle.opts",K);K.container=this;K.stopCount=this.cycleStop;K.elements=N;K.before=K.before?[K.before]:[];K.after=K.after?[K.after]:[];K.after.unshift(function(){K.busy=0;});if(K.continuous){K.after.push(function(){D(N,K,0,!K.rev);});}if(!F.support.opacity&&K.cleartype&&!K.cleartypeNoBg){B(S);}var Y=this.className;K.width=parseInt((Y.match(/w:(\d+)/)||[])[1])||K.width;K.height=parseInt((Y.match(/h:(\d+)/)||[])[1])||K.height;K.timeout=parseInt((Y.match(/t:(\d+)/)||[])[1])||K.timeout;if(W.css("position")=="static"){W.css("position","relative");}if(K.width){W.width(K.width);}if(K.height&&K.height!="auto"){W.height(K.height);}if(K.startingSlide){K.startingSlide=parseInt(K.startingSlide);}if(K.random){K.randomMap=[];for(var O=0;O<N.length;O++){K.randomMap.push(O);}K.randomMap.sort(function(c,Z){return Math.random()-0.5;});K.randomIndex=0;K.startingSlide=K.randomMap[0];}else{if(K.startingSlide>=N.length){K.startingSlide=0;}}var Q=K.startingSlide||0;S.css({position:"absolute",top:0,left:0}).hide().each(function(Z){var a=Q?Z>=Q?N.length-(Z-Q):Q-Z:N.length-Z;F(this).css("z-index",a);});F(N[Q]).css("opacity",1).show();if(F.browser.msie){N[Q].style.removeAttribute("filter");}if(K.fit&&K.width){S.width(K.width);}if(K.fit&&K.height&&K.height!="auto"){S.height(K.height);}if(K.containerResize){var T=0,M=0;for(var O=0;O<N.length;O++){var L=F(N[O]),V=L.outerWidth(),P=L.outerHeight();T=V>T?V:T;M=P>M?P:M;}W.css({width:T+"px",height:M+"px"});}if(K.pause){W.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}var X=F.fn.cycle.transitions[K.fx];if(F.isFunction(X)){X(W,S,K);}else{if(K.fx!="custom"){C("unknown transition: "+K.fx);}}S.each(function(){var Z=F(this);this.cycleH=(K.fit&&K.height)?K.height:Z.height();this.cycleW=(K.fit&&K.width)?K.width:Z.width();});K.cssBefore=K.cssBefore||{};K.animIn=K.animIn||{};K.animOut=K.animOut||{};S.not(":eq("+Q+")").css(K.cssBefore);if(K.cssFirst){F(S[Q]).css(K.cssFirst);}if(K.timeout){K.timeout=parseInt(K.timeout);if(K.speed.constructor==String){K.speed=F.fx.speeds[K.speed]||parseInt(K.speed);}if(!K.sync){K.speed=K.speed/2;}while((K.timeout-K.speed)<250){K.timeout+=K.speed;}}if(K.easing){K.easeIn=K.easeOut=K.easing;}if(!K.speedIn){K.speedIn=K.speed;}if(!K.speedOut){K.speedOut=K.speed;}K.slideCount=N.length;K.currSlide=Q;if(K.random){K.nextSlide=K.currSlide;if(++K.randomIndex==N.length){K.randomIndex=0;}K.nextSlide=K.randomMap[K.randomIndex];}else{K.nextSlide=K.startingSlide>=(N.length-1)?0:K.startingSlide+1;}var U=S[Q];if(K.before.length){K.before[0].apply(U,[U,U,K,true]);}if(K.after.length>1){K.after[1].apply(U,[U,U,K,true]);}if(K.click&&!K.next){K.next=K.click;}if(K.next){F(K.next).bind("click",function(){return E(N,K,K.rev?-1:1);});}if(K.prev){F(K.prev).bind("click",function(){return E(N,K,K.rev?1:-1);});}if(K.pager){H(N,K);}K.addSlide=function(a,b){var Z=F(a),c=Z[0];if(!K.autostopCount){K.countdown++;}N[b?"unshift":"push"](c);if(K.els){K.els[b?"unshift":"push"](c);}K.slideCount=N.length;Z.css("position","absolute");Z[b?"prependTo":"appendTo"](W);if(b){K.currSlide++;K.nextSlide++;}if(!F.support.opacity&&K.cleartype&&!K.cleartypeNoBg){B(Z);}if(K.fit&&K.width){Z.width(K.width);}if(K.fit&&K.height&&K.height!="auto"){S.height(K.height);}c.cycleH=(K.fit&&K.height)?K.height:Z.height();c.cycleW=(K.fit&&K.width)?K.width:Z.width();Z.css(K.cssBefore);if(K.pager){F.fn.cycle.createPagerAnchor(N.length-1,c,F(K.pager),N,K);}if(typeof K.onAddSlide=="function"){K.onAddSlide(Z);}};if(K.timeout||K.continuous){this.cycleTimeout=setTimeout(function(){D(N,K,0,!K.rev);},K.continuous?10:K.timeout+(K.delay||0));}});};function D(N,I,M,O){if(I.busy){return;}var L=I.container,Q=N[I.currSlide],P=N[I.nextSlide];if(L.cycleStop!=I.stopCount||L.cycleTimeout===0&&!M){return;}if(!M&&!L.cyclePause&&((I.autostop&&(--I.countdown<=0))||(I.nowrap&&!I.random&&I.nextSlide<I.currSlide))){if(I.end){I.end(I);}return;}if(M||!L.cyclePause){if(I.before.length){F.each(I.before,function(R,S){if(L.cycleStop!=I.stopCount){return;}S.apply(P,[Q,P,I,O]);});}var J=function(){if(F.browser.msie&&I.cleartype){this.style.removeAttribute("filter");}F.each(I.after,function(R,S){if(L.cycleStop!=I.stopCount){return;}S.apply(P,[Q,P,I,O]);});};if(I.nextSlide!=I.currSlide){I.busy=1;if(I.fxFn){I.fxFn(Q,P,I,J,O);}else{if(F.isFunction(F.fn.cycle[I.fx])){F.fn.cycle[I.fx](Q,P,I,J);}else{F.fn.cycle.custom(Q,P,I,J,M&&I.fastOnEvent);}}}if(I.random){I.currSlide=I.nextSlide;if(++I.randomIndex==N.length){I.randomIndex=0;}I.nextSlide=I.randomMap[I.randomIndex];}else{var K=(I.nextSlide+1)==N.length;I.nextSlide=K?0:I.nextSlide+1;I.currSlide=K?N.length-1:I.nextSlide-1;}if(I.pager){F.fn.cycle.updateActivePagerLink(I.pager,I.currSlide);}}if(I.timeout&&!I.continuous){L.cycleTimeout=setTimeout(function(){D(N,I,0,!I.rev);},G(Q,P,I,O));}else{if(I.continuous&&L.cyclePause){L.cycleTimeout=setTimeout(function(){D(N,I,0,!I.rev);},10);}}}F.fn.cycle.updateActivePagerLink=function(I,J){F(I).find("a").removeClass("activeSlide").filter("a:eq("+J+")").addClass("activeSlide");};function G(M,K,L,J){if(L.timeoutFn){var I=L.timeoutFn(M,K,L,J);if(I!==false){return I;}}return L.timeout;}function E(I,J,M){var L=J.container,K=L.cycleTimeout;if(K){clearTimeout(K);L.cycleTimeout=0;}if(J.random&&M<0){J.randomIndex--;if(--J.randomIndex==-2){J.randomIndex=I.length-2;}else{if(J.randomIndex==-1){J.randomIndex=I.length-1;}}J.nextSlide=J.randomMap[J.randomIndex];}else{if(J.random){if(++J.randomIndex==I.length){J.randomIndex=0;}J.nextSlide=J.randomMap[J.randomIndex];}else{J.nextSlide=J.currSlide+M;if(J.nextSlide<0){if(J.nowrap){return false;}J.nextSlide=I.length-1;}else{if(J.nextSlide>=I.length){if(J.nowrap){return false;}J.nextSlide=0;}}}}if(J.prevNextClick&&typeof J.prevNextClick=="function"){J.prevNextClick(M>0,J.nextSlide,I[J.nextSlide]);}D(I,J,1,M>=0);return false;}function H(J,K){var I=F(K.pager);F.each(J,function(L,M){F.fn.cycle.createPagerAnchor(L,M,I,J,K);});F.fn.cycle.updateActivePagerLink(K.pager,K.startingSlide);}F.fn.cycle.createPagerAnchor=function(L,M,J,K,N){var I=(typeof N.pagerAnchorBuilder=="function")?N.pagerAnchorBuilder(L,M):'<a href="#">'+(L+1)+"</a>";if(!I){return;}var O=F(I);if(O.parents("body").length==0){O.appendTo(J);}O.bind(N.pagerEvent,function(){N.nextSlide=L;var Q=N.container,P=Q.cycleTimeout;if(P){clearTimeout(P);Q.cycleTimeout=0;}if(typeof N.pagerClick=="function"){N.pagerClick(N.nextSlide,K[N.nextSlide]);}D(K,N,1,N.currSlide<L);return false;});if(N.pauseOnPagerHover){O.hover(function(){N.container.cyclePause++;},function(){N.container.cyclePause--;});}};function B(K){function J(L){var L=parseInt(L).toString(16);return L.length<2?"0"+L:L;}function I(N){for(;N&&N.nodeName.toLowerCase()!="html";N=N.parentNode){var L=F.css(N,"background-color");if(L.indexOf("rgb")>=0){var M=L.match(/\d+/g);return"#"+J(M[0])+J(M[1])+J(M[2]);}if(L&&L!="transparent"){return L;}}return"#ffffff";}K.each(function(){F(this).css("background-color",I(this));});}F.fn.cycle.custom=function(T,N,I,K,J){var S=F(T),O=F(N);O.css(I.cssBefore);var L=J?1:I.speedIn;var R=J?1:I.speedOut;var M=J?null:I.easeIn;var Q=J?null:I.easeOut;var P=function(){O.animate(I.animIn,L,M,K);};S.animate(I.animOut,R,Q,function(){if(I.cssAfter){S.css(I.cssAfter);}if(!I.sync){P();}});if(I.sync){P();}};F.fn.cycle.transitions={fade:function(J,K,I){K.not(":eq("+I.startingSlide+")").css("opacity",0);I.before.push(function(){F(this).show();});I.animIn={opacity:1};I.animOut={opacity:0};I.cssBefore={opacity:0};I.cssAfter={display:"none"};I.onAddSlide=function(L){L.hide();};}};F.fn.cycle.ver=function(){return A;};F.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,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:0,nowrap:0,fastOnEvent:0};})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild);}});}return this;};if(!$.browser.version){$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];}})(jQuery);(function($){$.dimensions={version:"@VERSION"};$.each(["Height","Width"],function(i,name){$.fn["inner"+name]=function(){if(!this[0]){return;}var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+name]:num(this,name.toLowerCase())+num(this,"padding"+torl)+num(this,"padding"+borr);};$.fn["outer"+name]=function(options){if(!this[0]){return;}var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";options=$.extend({margin:false},options||{});var val=this.is(":visible")?this[0]["offset"+name]:num(this,name.toLowerCase())+num(this,"border"+torl+"Width")+num(this,"border"+borr+"Width")+num(this,"padding"+torl)+num(this,"padding"+borr);return val+(options.margin?(num(this,"margin"+torl)+num(this,"margin"+borr)):0);};});$.each(["Left","Top"],function(i,name){$.fn["scroll"+name]=function(val){if(!this[0]){return;}return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=="Left"?val:$(window)["scrollLeft"](),name=="Top"?val:$(window)["scrollTop"]()):this["scroll"+name]=val;}):this[0]==window||this[0]==document?self[(name=="Left"?"pageXOffset":"pageYOffset")]||$.boxModel&&document.documentElement["scroll"+name]||document.body["scroll"+name]:this[0]["scroll"+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,"marginTop");offset.left-=num(elem,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;}})(jQuery);(function($){var Range=function(x1,y1,x2,y2){this.x1=x1;this.x2=x2;this.y1=y1;this.y2=y2;};Range.prototype.contains=function(range){return(this.x1<=range.x1&&range.x2<=this.x2)&&(this.y1<=range.y1&&range.y2<=this.y2);};Range.prototype.transform=function(x,y){return new Range(this.x1+x,this.y1+y,this.x2+x,this.y2+y);};$.fn.positionBy=function(args){var date1=new Date();if(this.length==0){return this;}var args=$.extend({target:null,targetPos:null,elementPos:null,x:null,y:null,positions:null,addClass:false,force:false,container:window,hideAfterPosition:false},args);if(args.x!=null){var tLeft=args.x;var tTop=args.y;var tWidth=0;var tHeight=0;}else{var $target=$($(args.target)[0]);var tWidth=$target.outerWidth();var tHeight=$target.outerHeight();var tOffset=$target.offset();var tLeft=tOffset.left;var tTop=tOffset.top;}var tRight=tLeft+tWidth;var tBottom=tTop+tHeight;return this.each(function(){var $element=$(this);if(!$element.is(":visible")){$element.css({left:-3000,top:-3000}).show();}var eWidth=$element.outerWidth();var eHeight=$element.outerHeight();var position=[];var next=[];position[0]=new Range(tRight,tTop,tRight+eWidth,tTop+eHeight);next[0]=[1,7,4];position[1]=new Range(tRight,tBottom-eHeight,tRight+eWidth,tBottom);next[1]=[0,6,4];position[2]=new Range(tRight,tBottom,tRight+eWidth,tBottom+eHeight);next[2]=[1,3,10];position[3]=new Range(tRight-eWidth,tBottom,tRight,tBottom+eHeight);next[3]=[1,6,10];position[4]=new Range(tLeft,tBottom,tLeft+eWidth,tBottom+eHeight);next[4]=[1,6,9];position[5]=new Range(tLeft-eWidth,tBottom,tLeft,tBottom+eHeight);next[5]=[6,4,9];position[6]=new Range(tLeft-eWidth,tBottom-eHeight,tLeft,tBottom);next[6]=[7,1,4];position[7]=new Range(tLeft-eWidth,tTop,tLeft,tTop+eHeight);next[7]=[6,0,4];position[8]=new Range(tLeft-eWidth,tTop-eHeight,tLeft,tTop);next[8]=[7,9,4];position[9]=new Range(tLeft,tTop-eHeight,tLeft+eWidth,tTop);next[9]=[0,7,4];position[10]=new Range(tRight-eWidth,tTop-eHeight,tRight,tTop);next[10]=[0,7,3];position[11]=new Range(tRight,tTop-eHeight,tRight+eWidth,tTop);next[11]=[0,10,3];position[12]=new Range(tRight-eWidth,tTop,tRight,tTop+eHeight);next[12]=[13,7,10];position[13]=new Range(tRight-eWidth,tBottom-eHeight,tRight,tBottom);next[13]=[12,6,3];position[14]=new Range(tLeft,tBottom-eHeight,tLeft+eWidth,tBottom);next[14]=[15,1,4];position[15]=new Range(tLeft,tTop,tLeft+eWidth,tTop+eHeight);next[15]=[14,0,9];if(args.positions!==null){var pos=args.positions[0];}else{if(args.targetPos!=null&&args.elementPos!=null){var pos=[];pos[0]=[];pos[0][0]=15;pos[0][1]=7;pos[0][2]=8;pos[0][3]=9;pos[1]=[];pos[1][0]=0;pos[1][1]=12;pos[1][2]=10;pos[1][3]=11;pos[2]=[];pos[2][0]=2;pos[2][1]=3;pos[2][2]=13;pos[2][3]=1;pos[3]=[];pos[3][0]=4;pos[3][1]=5;pos[3][2]=6;pos[3][3]=14;var pos=pos[args.targetPos][args.elementPos];}}var ePos=position[pos];var fPos=pos;if(!args.force){$window=$(window);var sx=$window.scrollLeft();var sy=$window.scrollTop();var container=new Range(sx,sy,sx+$window.width(),sy+$window.height());var stack;if(args.positions){stack=args.positions;}else{stack=[pos];}var test=[];while(stack.length>0){var p=stack.shift();if(test[p]){continue;}test[p]=true;if(!container.contains(position[p])){if(args.positions===null){stack=jQuery.merge(stack,next[p]);}}else{ePos=position[p];break;}}}$element.parents().each(function(){var $this=$(this);if($this.css("position")!="static"){var abs=$this.offset();ePos=ePos.transform(-abs.left,-abs.top);return false;}});var css={left:ePos.x1,top:ePos.y1};if(args.hideAfterPosition){css.display="none";}$element.css(css);if(args.addClass){$element.removeClass("positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 positionBy12 positionBy13 positionBy14 positionBy15").addClass("positionBy"+p);}});};})(jQuery);(function($){function addEvents(ul){var settings=$.data($(ul).parents().andSelf().filter("ul.jd_menu")[0],"jdMenuSettings");$("> li",ul).bind("mouseenter.jdmenu mouseleave.jdmenu",function(evt){$(this).toggleClass("jdm_hover");var ul=$("> ul",this);if(ul.length==1){clearTimeout(this.$jdTimer);var enter=(evt.type=="mouseenter");var fn=(enter?showMenu:hideMenu);this.$jdTimer=setTimeout(function(){fn(ul[0],settings.onAnimate,settings.isVertical);},enter?settings.showDelay:settings.hideDelay);}}).bind("click.jdmenu",function(evt){var ul=$("> ul",this);if(ul.length==1&&(settings.disableLinks==true||$(this).hasClass("accessible"))){showMenu(ul,settings.onAnimate,settings.isVertical);return false;}if(evt.target==this){var link=$("> a",evt.target).not(".accessible");if(link.length>0){var a=link[0];if(!a.onclick){window.open(a.href,a.target||"_self");}else{$(a).trigger("click");}}}if(settings.disableLinks||(!settings.disableLinks&&!$(this).parent().hasClass("jd_menu"))){$(this).parent().jdMenuHide();evt.stopPropagation();}}).find("> a").bind("focus.jdmenu blur.jdmenu",function(evt){var p=$(this).parents("li:eq(0)");if(evt.type=="focus"){p.addClass("jdm_hover");}else{p.removeClass("jdm_hover");}}).filter(".accessible").bind("click.jdmenu",function(evt){evt.preventDefault();});}function showMenu(ul,animate,vertical){var ul=$(ul);if(ul.is(":visible")){return;}ul.bgiframe();var li=ul.parent();ul.trigger("jdMenuShow").positionBy({target:li[0],targetPos:(vertical===true||!li.parent().hasClass("jd_menu")?1:3),elementPos:0,hideAfterPosition:true});if(!ul.hasClass("jdm_events")){ul.addClass("jdm_events");addEvents(ul);}li.addClass("jdm_active").siblings("li").find("> ul:eq(0):visible").each(function(){hideMenu(this);});if(animate===undefined){ul.show();}else{animate.apply(ul[0],[true]);}}function hideMenu(ul,animate){var ul=$(ul);$(".bgiframe",ul).remove();ul.filter(":not(.jd_menu)").find("> li > ul:eq(0):visible").each(function(){hideMenu(this);}).end();if(animate===undefined){ul.hide();}else{animate.apply(ul[0],[false]);}ul.trigger("jdMenuHide").parents("li:eq(0)").removeClass("jdm_active jdm_hover").end().find("> li").removeClass("jdm_active jdm_hover");}$.fn.jdMenu=function(settings){var settings=$.extend({showDelay:200,hideDelay:500,disableLinks:true},settings);if(!$.isFunction(settings.onAnimate)){settings.onAnimate=undefined;}return this.filter("ul.jd_menu").each(function(){$.data(this,"jdMenuSettings",$.extend({isVertical:$(this).hasClass("jd_menu_vertical")},settings));addEvents(this);});};$.fn.jdMenuUnbind=function(){$("ul.jdm_events",this).unbind(".jdmenu").find("> a").unbind(".jdmenu");};$.fn.jdMenuHide=function(){return this.filter("ul").each(function(){hideMenu(this);});};$(window).bind("click.jdmenu",function(){$("ul.jd_menu ul:visible").jdMenuHide();});})(jQuery);if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox, jQuery library not found";}var Shadowbox={};Shadowbox.lib={adapter:"jquery",getStyle:function(B,A){return jQuery(B).css(A);},setStyle:function(C,B,D){if(typeof B!="object"){var A={};A[B]=D;B=A;}jQuery(C).css(B);},get:function(A){return(typeof A=="string")?document.getElementById(A):A;},remove:function(A){jQuery(A).remove();},getTarget:function(A){return A.target;},getPageXY:function(A){return[A.pageX,A.pageY];},preventDefault:function(A){A.preventDefault();},keyCode:function(A){return A.keyCode;},addEvent:function(C,A,B){jQuery(C).bind(A,B);},removeEvent:function(C,A,B){jQuery(C).unbind(A,B);},append:function(B,A){jQuery(B).append(A);}};(function(A){A.fn.shadowbox=function(B){return this.each(function(){var E=A(this);var D=A.extend({},B||{},A.metadata?E.metadata():A.meta?E.data():{});var C=this.className||"";D.width=parseInt((C.match(/w:(\d+)/)||[])[1])||D.width;D.height=parseInt((C.match(/h:(\d+)/)||[])[1])||D.height;Shadowbox.setup(E,D);});};})(jQuery);if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox, no base library adapter found";}(function(){var version="2.0";var options={animate:true,animateFade:true,animSequence:"wh",flvPlayer:"flvplayer.swf",modal:false,overlayColor:"#000",overlayOpacity:0.8,flashBgColor:"#000000",autoplayMovies:true,showMovieControls:true,slideshowDelay:0,resizeDuration:0.55,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:"default",counterLimit:10,viewportPadding:20,handleOversize:"resize",handleException:null,handleUnsupported:"link",initialHeight:160,initialWidth:320,enableKeys:true,onOpen:null,onFinish:null,onChange:null,onClose:null,skipSetup:false,errors:{fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}},ext:{img:["png","jpg","jpeg","gif","bmp"],swf:["swf"],flv:["flv"],qt:["dv","mov","moov","movie","mp4"],wmp:["asf","wm","wmv"],qtwmp:["avi","mpg","mpeg"],iframe:["asp","aspx","cgi","cfm","htm","html","pl","php","php3","php4","php5","phtml","rb","rhtml","shtml","txt","vbs"]}};var SB=Shadowbox;var SL=SB.lib;var default_options;var RE={domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var gallery;var current;var content;var content_id="shadowbox_content";var dims;var initialized=false;var activated=false;var slide_timer;var slide_start;var slide_delay=0;var ua=navigator.userAgent.toLowerCase();var client={isStrict:document.compatMode=="CSS1Compat",isOpera:ua.indexOf("opera")>-1,isIE:ua.indexOf("msie")>-1,isIE7:ua.indexOf("msie 7")>-1,isSafari:/webkit|khtml/.test(ua),isWindows:ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1,isMac:ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1,isLinux:ua.indexOf("linux")!=-1};client.isBorderBox=client.isIE&&!client.isStrict;client.isSafari3=client.isSafari&&!!(document.evaluate);client.isGecko=ua.indexOf("gecko")!=-1&&!client.isSafari;var ltIE7=client.isIE&&!client.isIE7;var plugins;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i<len;++i){if(navigator.plugins[i].name.indexOf(plugin_name)>-1){detected=true;break;}}return detected;};var f4m=detectPlugin("Flip4Mac");plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m};}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo){detected=true;}}catch(e){}return detected;};plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false};}var apply=function(o,e){for(var p in e){o[p]=e[p];}return o;};var isLink=function(el){return el&&typeof el.tagName=="string"&&(el.tagName.toUpperCase()=="A"||el.tagName.toUpperCase()=="AREA");};SL.getViewportHeight=function(){var h=window.innerHeight;var mode=document.compatMode;if((mode||client.isIE)&&!client.isOpera){h=client.isStrict?document.documentElement.clientHeight:document.body.clientHeight;}return h;};SL.getViewportWidth=function(){var w=window.innerWidth;var mode=document.compatMode;if(mode||client.isIE){w=client.isStrict?document.documentElement.clientWidth:document.body.clientWidth;}return w;};SL.createHTML=function(obj){var html="<"+obj.tag;for(var attr in obj){if(attr=="tag"||attr=="html"||attr=="children"){continue;}if(attr=="cls"){html+=' class="'+obj.cls+'"';}else{html+=" "+attr+'="'+obj[attr]+'"';}}if(RE.empty.test(obj.tag)){html+="/>";}else{html+=">";var cn=obj.children;if(cn){for(var i=0,len=cn.length;i<len;++i){html+=this.createHTML(cn[i]);}}if(obj.html){html+=obj.html;}html+="</"+obj.tag+">";}return html;};var ease=function(x){return 1+Math.pow(x-1,3);};var animate=function(el,p,to,d,cb){var from=parseFloat(SL.getStyle(el,p));if(isNaN(from)){from=0;}if(from==to){if(typeof cb=="function"){cb();}return;}var delta=to-from;var op=p=="opacity";var unit=op?"":"px";var fn=function(ease){SL.setStyle(el,p,from+ease*delta+unit);};if(!options.animate&&!op||op&&!options.animateFade){fn(1);if(typeof cb=="function"){cb();}return;}d*=1000;var begin=new Date().getTime();var end=begin+d;var timer=setInterval(function(){var time=new Date().getTime();if(time>=end){clearInterval(timer);fn(1);if(typeof cb=="function"){cb();}}else{fn(ease((time-begin)/d));}},10);};var clearOpacity=function(el){var s=el.style;if(client.isIE){if(typeof s.filter=="string"&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,"");}}else{s.opacity="";s["-moz-opacity"]="";s["-khtml-opacity"]="";}};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,"height"),10)||0;if(!client.isBorderBox){h+=parseInt(SL.getStyle(el,"padding-top"),10)+parseInt(SL.getStyle(el,"padding-bottom"),10)+parseInt(SL.getStyle(el,"border-top-width"),10)+parseInt(SL.getStyle(el,"border-bottom-width"),10);}}return h;};var getPlayer=function(url){var m=url.match(RE.domain);var d=m&&document.domain==m[1];if(url.indexOf("#")>-1&&d){return"inline";}var q=url.indexOf("?");if(q>-1){url=url.substring(0,q);}if(RE.img.test(url)){return"img";}if(RE.swf.test(url)){return plugins.fla?"swf":"unsupported-swf";}if(RE.flv.test(url)){return plugins.fla?"flv":"unsupported-flv";}if(RE.qt.test(url)){return plugins.qt?"qt":"unsupported-qt";}if(RE.wmp.test(url)){if(plugins.wmp){return"wmp";}if(plugins.f4m){return"qt";}if(client.isMac){return plugins.qt?"unsupported-f4m":"unsupported-qtf4m";}return"unsupported-wmp";}else{if(RE.qtwmp.test(url)){if(plugins.qt){return"qt";}if(plugins.wmp){return"wmp";}return client.isMac?"unsupported-qt":"unsupported-qtwmp";}else{if(!d||RE.iframe.test(url)){return"iframe";}}}return"unsupported";};var handleClick=function(ev){var link;if(isLink(this)){link=this;}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode;}}if(link){SB.open(link);if(gallery.length){SL.preventDefault(ev);}}};var toggleNav=function(id,on){var el=SL.get("shadowbox_nav_"+id);if(el){el.style.display=on?"":"none";}};var buildBars=function(cb){var obj=gallery[current];var title_i=SL.get("shadowbox_title_inner");title_i.innerHTML=obj.title||"";var nav=SL.get("shadowbox_nav");if(nav){var c,n,pl,pa,p;if(options.displayNav){c=true;var len=gallery.length;if(len>1){if(options.continuous){n=p=true;}else{n=(len-1)>current;p=current>0;}}if(options.slideshowDelay>0&&hasNext()){pa=slide_timer!="paused";pl=!pa;}}else{c=n=pl=pa=p=false;}toggleNav("close",c);toggleNav("next",n);toggleNav("play",pl);toggleNav("pause",pa);toggleNav("previous",p);}var counter=SL.get("shadowbox_counter");if(counter){var co="";if(options.displayCounter&&gallery.length>1){if(options.counterType=="skip"){var i=0,len=gallery.length,end=len;var limit=parseInt(options.counterLimit);if(limit<len){var h=Math.round(limit/2);i=current-h;if(i<0){i+=len;}end=current+(limit-h);if(end>len){end-=len;}}while(i!=end){if(i==len){i=0;}co+='<a onclick="Shadowbox.change('+i+');"';if(i==current){co+=' class="shadowbox_counter_current"';}co+=">"+(++i)+"</a>";}}else{co=(current+1)+" "+SB.LANG.of+" "+len;}}counter.innerHTML=co;}cb();};var hideBars=function(anim,cb){var obj=gallery[current];var title=SL.get("shadowbox_title");var info=SL.get("shadowbox_info");var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var fn=function(){buildBars(cb);};var title_h=getComputedHeight(title);var info_h=getComputedHeight(info)*-1;if(anim){animate(title_i,"margin-top",title_h,0.35);animate(info_i,"margin-top",info_h,0.35,fn);}else{SL.setStyle(title_i,"margin-top",title_h+"px");SL.setStyle(info_i,"margin-top",info_h+"px");fn();}};var showBars=function(cb){var title_i=SL.get("shadowbox_title_inner");var info_i=SL.get("shadowbox_info_inner");var t=title_i.innerHTML!="";if(t){animate(title_i,"margin-top",0,0.35);}animate(info_i,"margin-top",0,0.35,cb);};var loadContent=function(){var obj=gallery[current];if(!obj){return;}var changing=false;if(content){content.remove();changing=true;}var p=obj.player=="inline"?"html":obj.player;if(typeof SB[p]!="function"){SB.raise("Unknown player "+obj.player);}content=new SB[p](content_id,obj);listenKeys(false);toggleLoading(true);hideBars(changing,function(){if(!content){return;}if(!changing){SL.get("shadowbox").style.display="";}var fn=function(){resizeContent(function(){if(!content){return;}showBars(function(){if(!content){return;}SL.get("shadowbox_body_inner").innerHTML=SL.createHTML(content.markup(dims));toggleLoading(false,function(){if(!content){return;}if(typeof content.onLoad=="function"){content.onLoad();}if(options.onFinish&&typeof options.onFinish=="function"){options.onFinish(gallery[current]);}if(slide_timer!="paused"){SB.play();}listenKeys(true);});});});};if(typeof content.ready!="undefined"){var id=setInterval(function(){if(content){if(content.ready){clearInterval(id);id=null;fn();}}else{clearInterval(id);id=null;}},100);}else{fn();}});if(gallery.length>1){var next=gallery[current+1]||gallery[0];if(next.player=="img"){var a=new Image();a.src=next.content;}var prev=gallery[current-1]||gallery[gallery.length-1];if(prev.player=="img"){var b=new Image();b.src=prev.content;}}};var setDimensions=function(height,width,resizable){resizable=resizable||false;var sb=SL.get("shadowbox_body");var h=height=parseInt(height);var w=width=parseInt(width);var view_h=SL.getViewportHeight();var view_w=SL.getViewportWidth();var border_w=parseInt(SL.getStyle(sb,"border-left-width"),10)+parseInt(SL.getStyle(sb,"border-right-width"),10);var extra_w=border_w+2*options.viewportPadding;if(w+extra_w>=view_w){w=view_w-extra_w;}var border_h=parseInt(SL.getStyle(sb,"border-top-width"),10)+parseInt(SL.getStyle(sb,"border-bottom-width"),10);var bar_h=getComputedHeight(SL.get("shadowbox_title"))+getComputedHeight(SL.get("shadowbox_info"));var extra_h=border_h+2*options.viewportPadding+bar_h;if(h+extra_h>=view_h){h=view_h-extra_h;}var drag=false;var resize_h=height;var resize_w=width;var handle=options.handleOversize;if(resizable&&(handle=="resize"||handle=="drag")){var change_h=(height-h)/height;var change_w=(width-w)/width;if(handle=="resize"){if(change_h>change_w){w=Math.round((width/height)*h);}else{if(change_w>change_h){h=Math.round((height/width)*w);}}resize_w=w;resize_h=h;}else{var link=gallery[current];if(link){drag=link.player=="img"&&(change_h>0||change_w>0);}}}dims={height:h+border_h+bar_h,width:w+border_w,inner_h:h,inner_w:w,top:(view_h-(h+extra_h))/2+options.viewportPadding,resize_h:resize_h,resize_w:resize_w,drag:drag};};var resizeContent=function(cb){if(!content){return;}setDimensions(content.height,content.width,content.resizable);if(cb){switch(options.animSequence){case"hw":adjustHeight(dims.inner_h,dims.top,true,function(){adjustWidth(dims.width,true,cb);});break;case"wh":adjustWidth(dims.width,true,function(){adjustHeight(dims.inner_h,dims.top,true,cb);});break;case"sync":default:adjustWidth(dims.width,true);adjustHeight(dims.inner_h,dims.top,true,cb);}}else{adjustWidth(dims.width,false);adjustHeight(dims.inner_h,dims.top,false);var c=SL.get(content_id);if(c){if(content.resizable&&options.handleOversize=="resize"){c.height=dims.resize_h;c.width=dims.resize_w;}if(gallery[current].player=="img"&&options.handleOversize=="drag"){var top=parseInt(SL.getStyle(c,"top"));if(top+content.height<dims.inner_h){SL.setStyle(c,"top",dims.inner_h-content.height+"px");}var left=parseInt(SL.getStyle(c,"left"));if(left+content.width<dims.inner_w){SL.setStyle(c,"left",dims.inner_w-content.width+"px");}}}}};var adjustHeight=function(height,top,anim,cb){height=parseInt(height);var sb=SL.get("shadowbox_body");if(anim){animate(sb,"height",height,options.resizeDuration);}else{SL.setStyle(sb,"height",height+"px");}var s=SL.get("shadowbox");if(anim){animate(s,"top",top,options.resizeDuration,cb);}else{SL.setStyle(s,"top",top+"px");if(typeof cb=="function"){cb();}}};var adjustWidth=function(width,anim,cb){width=parseInt(width);var s=SL.get("shadowbox");if(anim){animate(s,"width",width,options.resizeDuration,cb);}else{SL.setStyle(s,"width",width+"px");if(typeof cb=="function"){cb();}}};var listenKeys=function(on){if(!options.enableKeys){return;}SL[(on?"add":"remove")+"Event"](document,"keydown",handleKey);};var handleKey=function(e){var code=SL.keyCode(e);SL.preventDefault(e);if(code==81||code==88||code==27){SB.close();}else{if(code==37){SB.previous();}else{if(code==39){SB.next();}else{if(code==32){SB[(typeof slide_timer=="number"?"pause":"play")]();}}}}};var toggleLoading=function(on,cb){var loading=SL.get("shadowbox_loading");if(on){loading.style.display="";if(typeof cb=="function"){cb();}}else{var p=gallery[current].player;var anim=(p=="img"||p=="html");var fn=function(){loading.style.display="none";clearOpacity(loading);if(typeof cb=="function"){cb();}};if(anim){animate(loading,"opacity",0,options.fadeDuration,fn);}else{fn();}}};var fixTop=function(){SL.get("shadowbox_container").style.top=document.documentElement.scrollTop+"px";};var fixHeight=function(){SL.get("shadowbox_overlay").style.height=SL.getViewportHeight()+"px";};var hasNext=function(){return gallery.length>1&&(current!=gallery.length-1||options.continuous);};var toggleVisible=function(cb){var els,v=(cb)?"hidden":"visible";var hide=["select","object","embed"];for(var i=0;i<hide.length;++i){els=document.getElementsByTagName(hide[i]);for(var j=0,len=els.length;j<len;++j){els[j].style.visibility=v;}}var so=SL.get("shadowbox_overlay");var sc=SL.get("shadowbox_container");var sb=SL.get("shadowbox");if(cb){SL.setStyle(so,{backgroundColor:options.overlayColor,opacity:0});if(!options.modal){SL.addEvent(so,"click",SB.close);}if(ltIE7){fixTop();fixHeight();SL.addEvent(window,"scroll",fixTop);}sb.style.display="none";sc.style.visibility="visible";animate(so,"opacity",parseFloat(options.overlayOpacity),options.fadeDuration,cb);}else{SL.removeEvent(so,"click",SB.close);if(ltIE7){SL.removeEvent(window,"scroll",fixTop);}sb.style.display="none";animate(so,"opacity",0,options.fadeDuration,function(){sc.style.visibility="hidden";sb.style.display="";clearOpacity(so);});}};Shadowbox.init=function(opts){if(initialized){return;}if(typeof SB.LANG=="undefined"){SB.raise("No Shadowbox language loaded");return;}if(typeof SB.SKIN=="undefined"){SB.raise("No Shadowbox skin loaded");return;}apply(options,opts||{});var markup=SB.SKIN.markup.replace(/\{(\w+)\}/g,function(m,p){return SB.LANG[p];});var bd=document.body||document.documentElement;SL.append(bd,markup);if(ltIE7){SL.setStyle(SL.get("shadowbox_container"),"position","absolute");SL.get("shadowbox_body").style.zoom=1;var png=SB.SKIN.png_fix;if(png&&png.constructor==Array){for(var i=0;i<png.length;++i){var el=SL.get(png[i]);if(el){var match=SL.getStyle(el,"background-image").match(/url\("(.*\.png)"\)/);if(match){SL.setStyle(el,{backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+match[1]+",sizingMethod=scale);"});}}}}}for(var e in options.ext){RE[e]=new RegExp(".("+options.ext[e].join("|")+")s*$","i");}var id;SL.addEvent(window,"resize",function(){if(id){clearTimeout(id);id=null;}id=setTimeout(function(){if(ltIE7){fixHeight();}resizeContent();},50);});if(!options.skipSetup){SB.setup();}initialized=true;};Shadowbox.loadSkin=function(skin,dir){if(!(/\/$/.test(dir))){dir+="/";}skin=dir+skin+"/";document.write('<link rel="stylesheet" type="text/css" href="'+skin+'skin.css">');document.write('<script type="text/javascript" src="'+skin+'skin.js"><\/script>');};Shadowbox.loadLanguage=function(lang,dir){if(!(/\/$/.test(dir))){dir+="/";}document.write('<script type="text/javascript" src="'+dir+"shadowbox-"+lang+'.js"><\/script>');};Shadowbox.loadPlayer=function(players,dir){if(typeof players=="string"){players=[players];}if(!(/\/$/.test(dir))){dir+="/";}for(var i=0,len=players.length;i<len;++i){document.write('<script type="text/javascript" src="'+dir+"shadowbox-"+players[i]+'.js"><\/script>');}};Shadowbox.setup=function(links,opts){if(!links){var links=[];var a=document.getElementsByTagName("a"),rel;for(var i=0,len=a.length;i<len;++i){rel=a[i].getAttribute("rel");if(rel&&RE.rel.test(rel)){links[links.length]=a[i];}}}else{if(!links.length){links=[links];}}var link;for(var i=0,len=links.length;i<len;++i){link=links[i];if(typeof link.shadowboxCacheKey=="undefined"){link.shadowboxCacheKey=cache.length;SL.addEvent(link,"click",handleClick);}cache[link.shadowboxCacheKey]=this.buildCacheObj(link,opts);}};Shadowbox.buildCacheObj=function(link,opts){var href=link.href;var o={el:link,title:link.getAttribute("title"),player:getPlayer(href),options:apply({},opts||{}),content:href};var opt,l_opts=["player","title","height","width","gallery"];for(var i=0,len=l_opts.length;i<len;++i){opt=l_opts[i];if(typeof o.options[opt]!="undefined"){o[opt]=o.options[opt];delete o.options[opt];}}var rel=link.getAttribute("rel");if(rel){var match=rel.match(RE.gallery);if(match){o.gallery=escape(match[2]);}var params=rel.split(";");for(var i=0,len=params.length;i<len;++i){match=params[i].match(RE.param);if(match){if(match[1]=="options"){eval("apply(o.options, "+match[2]+")");}else{o[match[1]]=match[2];}}}}return o;};Shadowbox.applyOptions=function(opts){if(opts){default_options=apply({},options);options=apply(options,opts);}};Shadowbox.revertOptions=function(){if(default_options){options=default_options;default_options=null;}};Shadowbox.open=function(obj,opts){this.revertOptions();if(isLink(obj)){if(typeof obj.shadowboxCacheKey=="undefined"||typeof cache[obj.shadowboxCacheKey]=="undefined"){obj=this.buildCacheObj(obj,opts);}else{obj=cache[obj.shadowboxCacheKey];}}if(obj.constructor==Array){gallery=obj;current=0;}else{var copy=apply({},obj);if(!obj.gallery){gallery=[copy];current=0;}else{current=null;gallery=[];var ci;for(var i=0,len=cache.length;i<len;++i){ci=cache[i];if(ci.gallery){if(ci.content==obj.content&&ci.gallery==obj.gallery&&ci.title==obj.title){current=gallery.length;}if(ci.gallery==obj.gallery){gallery.push(apply({},ci));}}}if(current==null){gallery.unshift(copy);current=0;}}}obj=gallery[current];if(obj.options||opts){this.applyOptions(apply(apply({},obj.options||{}),opts||{}));}var match,r;for(var i=0,len=gallery.length;i<len;++i){r=false;if(gallery[i].player=="unsupported"){r=true;}else{if(match=RE.unsupported.exec(gallery[i].player)){if(options.handleUnsupported=="link"){gallery[i].player="html";var s,a,oe=options.errors;switch(match[1]){case"qtwmp":s="either";a=[oe.qt.url,oe.qt.name,oe.wmp.url,oe.wmp.name];break;case"qtf4m":s="shared";a=[oe.qt.url,oe.qt.name,oe.f4m.url,oe.f4m.name];break;default:s="single";if(match[1]=="swf"||match[1]=="flv"){match[1]="fla";}a=[oe[match[1]].url,oe[match[1]].name];}var msg=SB.LANG.errors[s].replace(/\{(\d+)\}/g,function(m,i){return a[i];});gallery[i].content='<div class="shadowbox_message">'+msg+"</div>";}else{r=true;}}else{if(gallery[i].player=="inline"){var match=RE.inline.exec(gallery[i].content);if(match){var el;if(el=SL.get(match[1])){gallery[i].content=el.innerHTML;}else{SB.raise("Cannot find element with id "+match[1]);}}else{SB.raise("Cannot find element id for inline content");}}}}if(r){gallery.splice(i,1);if(i<current){--current;}else{if(i==current){current=i>0?current-1:i;}}--i;len=gallery.length;}}if(gallery.length){if(options.onOpen&&typeof options.onOpen=="function"){options.onOpen(obj);}if(!activated){setDimensions(options.initialHeight,options.initialWidth);adjustHeight(dims.inner_h,dims.top,false);adjustWidth(dims.width,false);toggleVisible(loadContent);}else{loadContent();}activated=true;}};Shadowbox.change=function(num){if(!gallery){return;}if(!gallery[num]){if(!options.continuous){return;}else{num=num<0?(gallery.length-1):0;}}if(typeof slide_timer=="number"){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0;}current=num;if(options.onChange&&typeof options.onChange=="function"){options.onChange(gallery[current]);}loadContent();};Shadowbox.next=function(){this.change(current+1);};Shadowbox.previous=function(){this.change(current-1);};Shadowbox.play=function(){if(!hasNext()){return;}if(!slide_delay){slide_delay=options.slideshowDelay*1000;}if(slide_delay){slide_start=new Date().getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;SB.next();},slide_delay);toggleNav("play",false);toggleNav("pause",true);}};Shadowbox.pause=function(){if(typeof slide_timer=="number"){var time=new Date().getTime();slide_delay=Math.max(0,slide_delay-(time-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer="paused";}toggleNav("pause",false);toggleNav("play",true);}};Shadowbox.close=function(){if(!activated){return;}listenKeys(false);toggleVisible(false);if(content){content.remove();content=null;}if(typeof slide_timer=="number"){clearTimeout(slide_timer);}slide_timer=null;slide_delay=0;if(options.onClose&&typeof options.onClose=="function"){options.onClose(gallery[current]);}activated=false;};Shadowbox.clearCache=function(){for(var i=0,len=cache.length;i<len;++i){if(cache[i].el){SL.removeEvent(cache[i].el,"click",handleClick);delete cache[i].el.shadowboxCacheKey;}}cache=[];};Shadowbox.getPlugins=function(){return plugins;};Shadowbox.getOptions=function(){return options;};Shadowbox.getCurrent=function(){return gallery[current];};Shadowbox.getVersion=function(){return version;};Shadowbox.getClient=function(){return client;};Shadowbox.getContent=function(){return content;};Shadowbox.getDimensions=function(){return dims;};Shadowbox.raise=function(e){if(typeof options.handleException=="function"){options.handleException(e);}else{throw e;}};})();if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox language file, base library not found.";}Shadowbox.LANG={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};(function(){var F=Shadowbox;var L=F.lib;var A=F.getClient();var I;var M;var J="shadowbox_drag_layer";var K;var D=function(){I={x:0,y:0,start_x:null,start_y:null};};var E=function(N,O,C){if(N){D();var P=["position:absolute","height:"+O+"px","width:"+C+"px","cursor:"+(A.isGecko?"-moz-grab":"move"),"background-color:"+(A.isIE?"#fff;filter:alpha(opacity=0)":"transparent")];L.append(L.get("shadowbox_body_inner"),'<div id="'+J+'" style="'+P.join(";")+'"></div>');L.addEvent(L.get(J),"mousedown",H);}else{var Q=L.get(J);if(Q){L.removeEvent(Q,"mousedown",H);L.remove(Q);}}};var H=function(N){L.preventDefault(N);var C=L.getPageXY(N);I.start_x=C[0];I.start_y=C[1];M=L.get("shadowbox_content");L.addEvent(document,"mousemove",G);L.addEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grabbing");}};var B=function(){L.removeEvent(document,"mousemove",G);L.removeEvent(document,"mouseup",B);if(A.isGecko){L.setStyle(L.get(J),"cursor","-moz-grab");}};var G=function(Q){var O=F.getContent();var R=F.getDimensions();var P=L.getPageXY(Q);var N=P[0]-I.start_x;I.start_x+=N;I.x=Math.max(Math.min(0,I.x+N),R.inner_w-O.width);L.setStyle(M,"left",I.x+"px");var C=P[1]-I.start_y;I.start_y+=C;I.y=Math.max(Math.min(0,I.y+C),R.inner_h-O.height);L.setStyle(M,"top",I.y+"px");};Shadowbox.img=function(O,N){this.id=O;this.obj=N;this.resizable=true;this.ready=false;var C=this;K=new Image();K.onload=function(){C.height=C.obj.height?parseInt(C.obj.height,10):K.height;C.width=C.obj.width?parseInt(C.obj.width,10):K.width;C.ready=true;K.onload="";K=null;};K.src=N.content;};Shadowbox.img.prototype={markup:function(C){return{tag:"img",id:this.id,height:C.resize_h,width:C.resize_w,src:this.obj.content,style:"position:absolute"};},onLoad:function(){var C=F.getDimensions();if(C.drag&&F.getOptions().handleOversize=="drag"){E(true,C.resize_h,C.resize_w);}},remove:function(){var C=L.get(this.id);if(C){L.remove(C);}E(false);if(K){K.onload="";K=null;}}};})();(function(){var A=Shadowbox;var B=A.lib;Shadowbox.html=function(D,C){this.id=D;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):300;this.width=this.obj.width?parseInt(this.obj.width,10):500;};Shadowbox.html.prototype={markup:function(C){return{tag:"div",id:this.id,cls:"html",html:this.obj.content};},remove:function(){var C=B.get(this.id);if(C){B.remove(C);}}};})();(function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.iframe=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):B.getViewportHeight();this.width=this.obj.width?parseInt(this.obj.width,10):B.getViewportWidth();};Shadowbox.iframe.prototype={markup:function(E){var C={tag:"iframe",id:this.id,name:this.id,height:"100%",width:"100%",frameborder:"0",marginwidth:"0",marginheight:"0",scrolling:"auto"};if(D.isIE){C.allowtransparency="true";if(!D.isIE7){C.src='javascript:false;document.write("");';}}return C;},onLoad:function(){var C=(D.isIE)?B.get(this.id).contentWindow:window.frames[this.id];C.location=this.obj.content;},remove:function(){var C=B.get(this.id);if(C){B.remove(C);if(D.isGecko){delete window.frames[this.id];}}}};})();(function(){var A=Shadowbox;var B=A.lib;Shadowbox.flv=function(D,C){this.id=D;this.obj=C;this.resizable=true;this.height=this.obj.height?parseInt(this.obj.height,10):300;if(A.getOptions().showMovieControls==true){this.height+=20;}this.width=this.obj.width?parseInt(this.obj.width,10):300;};Shadowbox.flv.prototype={markup:function(G){var E=this.obj;var F=G.resize_h;var I=G.resize_w;var L=A.getOptions();var C=String(L.autoplayMovies);var J=L.showMovieControls;var H=String(J);var K=F-(J?20:0);var D=["file="+this.obj.content,"height="+F,"width="+I,"autostart="+C,"displayheight="+K,"showicons="+H,"backcolor=0x000000","frontcolor=0xCCCCCC","lightcolor=0x557722"];return{tag:"object",id:this.id,name:this.id,type:"application/x-shockwave-flash",data:L.flvPlayer,children:[{tag:"param",name:"movie",value:L.flvPlayer},{tag:"param",name:"flashvars",value:D.join("&amp;")},{tag:"param",name:"allowfullscreen",value:"true"}],height:F,width:I};},remove:function(){var C=B.get(this.id);if(C){B.remove(C);}}};})();(function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.qt=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):300;if(A.getOptions().showMovieControls==true){this.height+=16;}this.width=this.obj.width?parseInt(this.obj.width,10):300;};Shadowbox.qt.prototype={markup:function(H){var F=A.getOptions();var G=String(F.autoplayMovies);var E=String(F.showMovieControls);var C={tag:"object",id:this.id,name:this.id,height:this.height,width:this.width,children:[{tag:"param",name:"src",value:this.obj.content},{tag:"param",name:"scale",value:"aspect"},{tag:"param",name:"controller",value:E},{tag:"param",name:"autoplay",value:G}],kioskmode:"true"};if(D.isIE){C.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";C.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";}else{C.type="video/quicktime";C.data=this.obj.content;}return C;},remove:function(){try{document[this.id].Stop();}catch(E){}var C=B.get(this.id);if(C){B.remove(C);}}};})();(function(){var A=Shadowbox;var B=A.lib;var D=A.getClient();Shadowbox.wmp=function(E,C){this.id=E;this.obj=C;this.height=this.obj.height?parseInt(this.obj.height,10):300;if(A.getOptions().showMovieControls){this.height+=(D.isIE?70:45);}this.width=this.obj.width?parseInt(this.obj.width,10):300;};Shadowbox.wmp.prototype={markup:function(H){var F=A.getOptions();var G=F.autoplayMovies?1:0;var E={tag:"object",id:this.id,name:this.id,height:this.height,width:this.width,children:[{tag:"param",name:"autostart",value:G}]};if(D.isIE){var C=F.showMovieControls?"full":"none";E.classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6";E.children[E.children.length]={tag:"param",name:"url",value:this.obj.content};E.children[E.children.length]={tag:"param",name:"uimode",value:C};}else{var C=F.showMovieControls?1:0;E.type="video/x-ms-wmv";E.data=this.obj.content;E.children[E.children.length]={tag:"param",name:"showcontrols",value:C};}return E;},remove:function(){if(D.isIE){try{window[this.id].controls.stop();window[this.id].URL="non-existent.wmv";window[this.id]=function(){};}catch(E){}}var C=B.get(this.id);if(C){setTimeout(function(){B.remove(C);},10);}}};})();(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],"validator");if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug){event.preventDefault();}function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is("form")){return this.validate().form();}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);}break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return !$.trim(a.value);},filled:function(a){return !!$.trim(a.value);},unchecked:function(a){return !a.checked;}});$.format=function(source,params){if(arguments.length==1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args);};}if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted){this.element(element);}},highlight:function(element,errorClass){$(element).addClass(errorClass);},unhighlight:function(element,errorClass){$(element).removeClass(errorClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein g??ltiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);}this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return !(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj){count++;}return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false;}rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value,element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id+", check the '"+rule.method+"' method");throw e;}}if(dependencyMismatch){return;}if(this.objectLength(rules)){this.successList.push(element);}return true;},customMetaMessage:function(element,method){if(!$.metadata){return;}var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i];}}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function"){message=message.call(this,rule.parameters,element);}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parents(this.settings.wrapper));}return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length){this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){return this.errors().filter("[for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length;}}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},string:function(param,element){return !!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return !$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;}delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else{if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr("class");classes&&$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata){return{};}var meta=$.data(element.form,"validator").settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(["minlength","maxlength","min","max"],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(["rangelength","range"],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages;}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";}switch(element.nodeName.toLowerCase()){case"select":var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes.value.specified)?options[0].text:options[0].value).length>0);case"input":if(this.checkable(element)){return this.getLength(value,element)>0;}default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch";}var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};}this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}previous.valid=response;validator.stopRequest(element,response);}},param));return"pending";}else{if(this.pending[element.name]){return"pending";}}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch";}if(/[^0-9-]+/.test(value)){return false;}var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9;}}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});})(jQuery);(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false;}this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie){return false;}this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}});})(jQuery);