(function(A){(function(J){var M="2.88";if(J.support==undefined){J.support={opacity:!(J.browser.msie)};}function B(R){if(J.fn.cycle.debug){G(R);}}function G(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}J.fn.cycle=function(S,R){var T={s:this.selector,c:this.context};if(this.length===0&&S!="stop"){if(!J.isReady&&T.s){G("DOM not ready, queuing slideshow");J(function(){J(T.s,T.c).cycle(S,R);});return this;}G("terminating; zero elements found by selector"+(J.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var X=N(this,S,R);if(X===false){return ;}X.updateActivePagerLink=X.updateActivePagerLink||J.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var Y=J(this);var Z=X.slideExpr?J(X.slideExpr,this):Y.children();var V=Z.get();if(V.length<2){G("terminating; too few slides: "+V.length);return ;}var U=L(Y,Z,V,X,T);if(U===false){return ;}var W=U.continuous?10:I(V[U.currSlide],V[U.nextSlide],U,!U.rev);if(W){W+=(U.delay||0);if(W<10){W=10;}B("first timeout: "+W);this.cycleTimeout=setTimeout(function(){F(V,U,0,(!U.rev&&!X.backwards));},W);}});};function N(R,U,S){if(R.cycleStop==undefined){R.cycleStop=0;}if(U===undefined||U===null){U={};}if(U.constructor==String){switch(U){case"destroy":case"stop":var W=J(R).data("cycle.opts");if(!W){return false;}R.cycleStop++;if(R.cycleTimeout){clearTimeout(R.cycleTimeout);}R.cycleTimeout=0;J(R).removeData("cycle.opts");if(U=="destroy"){Q(W);}return false;case"toggle":R.cyclePause=(R.cyclePause===1)?0:1;V(R.cyclePause,S,R);return false;case"pause":R.cyclePause=1;return false;case"resume":R.cyclePause=0;V(false,S,R);return false;case"prev":case"next":var W=J(R).data("cycle.opts");if(!W){G('options not found, "prev/next" ignored');return false;}J.fn.cycle[U](W);return false;default:U={fx:U};}return U;}else{if(U.constructor==Number){var T=U;U=J(R).data("cycle.opts");if(!U){G("options not found, can not advance slide");return false;}if(T<0||T>=U.elements.length){G("invalid slide index: "+T);return false;}U.nextSlide=T;if(R.cycleTimeout){clearTimeout(R.cycleTimeout);R.cycleTimeout=0;}if(typeof S=="string"){U.oneTimeFx=S;}F(U.elements,U,1,T>=U.currSlide);return false;}}return U;function V(Y,Z,X){if(!Y&&Z===true){var a=J(X).data("cycle.opts");if(!a){G("options not found, can not resume");return false;}if(X.cycleTimeout){clearTimeout(X.cycleTimeout);X.cycleTimeout=0;}F(a.elements,a,1,(!W.rev&&!W.backwards));}}}function C(R,S){if(!J.support.opacity&&S.cleartype&&R.style.filter){try{R.style.removeAttribute("filter");}catch(T){}}}function Q(R){if(R.next){J(R.next).unbind(R.prevNextEvent);}if(R.prev){J(R.prev).unbind(R.prevNextEvent);}if(R.pager||R.pagerAnchorBuilder){J.each(R.pagerAnchors||[],function(){this.unbind().remove();});}R.pagerAnchors=null;if(R.destroy){R.destroy(R);}}function L(Y,q,V,U,f){var c=J.extend({},J.fn.cycle.defaults,U||{},J.metadata?Y.metadata():J.meta?Y.data():{});if(c.autostop){c.countdown=c.autostopCount||V.length;}var S=Y[0];Y.data("cycle.opts",c);c.$cont=Y;c.stopCount=S.cycleStop;c.elements=V;c.before=c.before?[c.before]:[];c.after=c.after?[c.after]:[];c.after.unshift(function(){c.busy=0;});if(!J.support.opacity&&c.cleartype){c.after.push(function(){C(this,c);});}if(c.continuous){c.after.push(function(){F(V,c,0,(!c.rev&&!c.backwards));});}O(c);if(!J.support.opacity&&c.cleartype&&!c.cleartypeNoBg){H(q);}if(Y.css("position")=="static"){Y.css("position","relative");}if(c.width){Y.width(c.width);}if(c.height&&c.height!="auto"){Y.height(c.height);}if(c.startingSlide){c.startingSlide=parseInt(c.startingSlide);}else{if(c.backwards){c.startingSlide=V.length-1;}}if(c.random){c.randomMap=[];for(var m=0;m<V.length;m++){c.randomMap.push(m);}c.randomMap.sort(function(h,e){return Math.random()-0.5;});c.randomIndex=1;c.startingSlide=c.randomMap[1];}else{if(c.startingSlide>=V.length){c.startingSlide=0;}}c.currSlide=c.startingSlide||0;var X=c.startingSlide;q.css({position:"absolute",top:0,left:0}).hide().each(function(e){var h;if(c.backwards){h=X?e<=X?V.length+(e-X):X-e:V.length-e;}else{h=X?e>=X?V.length-(e-X):X-e:V.length-e;}J(this).css("z-index",h);});J(V[X]).css("opacity",1).show();C(V[X],c);if(c.fit&&c.width){q.width(c.width);}if(c.fit&&c.height&&c.height!="auto"){q.height(c.height);}var d=c.containerResize&&!Y.innerHeight();if(d){var W=0,b=0;for(var k=0;k<V.length;k++){var R=J(V[k]),r=R[0],a=R.outerWidth(),n=R.outerHeight();if(!a){a=r.offsetWidth||r.width||R.attr("width");}if(!n){n=r.offsetHeight||r.height||R.attr("height");}W=a>W?a:W;b=n>b?n:b;}if(W>0&&b>0){Y.css({width:W+"px",height:b+"px"});}}if(c.pause){Y.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(D(c)===false){return false;}var T=false;U.requeueAttempts=U.requeueAttempts||0;q.each(function(){var j=J(this);this.cycleH=(c.fit&&c.height)?c.height:(j.height()||this.offsetHeight||this.height||j.attr("height")||0);this.cycleW=(c.fit&&c.width)?c.width:(j.width()||this.offsetWidth||this.width||j.attr("width")||0);if(j.is("img")){var h=(J.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var o=(J.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var i=(J.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var e=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(h||o||i||e){if(f.s&&c.requeueOnImageNotLoaded&&++U.requeueAttempts<100){G(U.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){J(f.s,f.c).cycle(U);},c.requeueTimeout);T=true;return false;}else{G("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(T){return false;}c.cssBefore=c.cssBefore||{};c.animIn=c.animIn||{};c.animOut=c.animOut||{};q.not(":eq("+X+")").css(c.cssBefore);if(c.cssFirst){J(q[X]).css(c.cssFirst);}if(c.timeout){c.timeout=parseInt(c.timeout);if(c.speed.constructor==String){c.speed=J.fx.speeds[c.speed]||parseInt(c.speed);}if(!c.sync){c.speed=c.speed/2;}var g=c.fx=="shuffle"?500:250;while((c.timeout-c.speed)<g){c.timeout+=c.speed;}}if(c.easing){c.easeIn=c.easeOut=c.easing;}if(!c.speedIn){c.speedIn=c.speed;}if(!c.speedOut){c.speedOut=c.speed;}c.slideCount=V.length;c.currSlide=c.lastSlide=X;if(c.random){if(++c.randomIndex==V.length){c.randomIndex=0;}c.nextSlide=c.randomMap[c.randomIndex];}else{if(c.backwards){c.nextSlide=c.startingSlide==0?(V.length-1):c.startingSlide-1;}else{c.nextSlide=c.startingSlide>=(V.length-1)?0:c.startingSlide+1;}}if(!c.multiFx){var l=J.fn.cycle.transitions[c.fx];if(J.isFunction(l)){l(Y,q,c);}else{if(c.fx!="custom"&&!c.multiFx){G("unknown transition: "+c.fx,"; slideshow terminating");return false;}}}var Z=q[X];if(c.before.length){c.before[0].apply(Z,[Z,Z,c,true]);}if(c.after.length>1){c.after[1].apply(Z,[Z,Z,c,true]);}if(c.next){J(c.next).bind(c.prevNextEvent,function(){return P(c,c.rev?-1:1);});}if(c.prev){J(c.prev).bind(c.prevNextEvent,function(){return P(c,c.rev?1:-1);});}if(c.pager||c.pagerAnchorBuilder){E(V,c);}K(c,V);return c;}function O(R){R.original={before:[],after:[]};R.original.cssBefore=J.extend({},R.cssBefore);R.original.cssAfter=J.extend({},R.cssAfter);R.original.animIn=J.extend({},R.animIn);R.original.animOut=J.extend({},R.animOut);J.each(R.before,function(){R.original.before.push(this);});J.each(R.after,function(){R.original.after.push(this);});}function D(X){var V,T,S=J.fn.cycle.transitions;if(X.fx.indexOf(",")>0){X.multiFx=true;X.fxs=X.fx.replace(/\s*/g,"").split(",");for(V=0;V<X.fxs.length;V++){var W=X.fxs[V];T=S[W];if(!T||!S.hasOwnProperty(W)||!J.isFunction(T)){G("discarding unknown transition: ",W);X.fxs.splice(V,1);V--;}}if(!X.fxs.length){G("No valid transitions named; slideshow terminating.");return false;}}else{if(X.fx=="all"){X.multiFx=true;X.fxs=[];for(p in S){T=S[p];if(S.hasOwnProperty(p)&&J.isFunction(T)){X.fxs.push(p);}}}}if(X.multiFx&&X.randomizeEffects){var U=Math.floor(Math.random()*20)+30;for(V=0;V<U;V++){var R=Math.floor(Math.random()*X.fxs.length);X.fxs.push(X.fxs.splice(R,1)[0]);}B("randomized fx sequence: ",X.fxs);}return true;}function K(S,R){S.addSlide=function(U,V){var T=J(U),W=T[0];if(!S.autostopCount){S.countdown++;}R[V?"unshift":"push"](W);if(S.els){S.els[V?"unshift":"push"](W);}S.slideCount=R.length;T.css("position","absolute");T[V?"prependTo":"appendTo"](S.$cont);if(V){S.currSlide++;S.nextSlide++;}if(!J.support.opacity&&S.cleartype&&!S.cleartypeNoBg){H(T);}if(S.fit&&S.width){T.width(S.width);}if(S.fit&&S.height&&S.height!="auto"){$slides.height(S.height);}W.cycleH=(S.fit&&S.height)?S.height:T.height();W.cycleW=(S.fit&&S.width)?S.width:T.width();T.css(S.cssBefore);if(S.pager||S.pagerAnchorBuilder){J.fn.cycle.createPagerAnchor(R.length-1,W,J(S.pager),R,S);}if(J.isFunction(S.onAddSlide)){S.onAddSlide(T);}else{T.hide();}};}J.fn.cycle.resetState=function(S,R){R=R||S.fx;S.before=[];S.after=[];S.cssBefore=J.extend({},S.original.cssBefore);S.cssAfter=J.extend({},S.original.cssAfter);S.animIn=J.extend({},S.original.animIn);S.animOut=J.extend({},S.original.animOut);S.fxFn=null;J.each(S.original.before,function(){S.before.push(this);});J.each(S.original.after,function(){S.after.push(this);});var T=J.fn.cycle.transitions[R];if(J.isFunction(T)){T(S.$cont,J(S.elements),S);}};function F(Y,R,X,a){if(X&&R.busy&&R.manualTrump){B("manualTrump in go(), stopping active transition");J(Y).stop(true,true);R.busy=false;}if(R.busy){B("transition active, ignoring new tx request");return ;}var V=R.$cont[0],c=Y[R.currSlide],b=Y[R.nextSlide];if(V.cycleStop!=R.stopCount||V.cycleTimeout===0&&!X){return ;}if(!X&&!V.cyclePause&&!R.bounce&&((R.autostop&&(--R.countdown<=0))||(R.nowrap&&!R.random&&R.nextSlide<R.currSlide))){if(R.end){R.end(R);}return ;}var Z=false;if((X||!V.cyclePause)&&(R.nextSlide!=R.currSlide)){Z=true;var W=R.fx;c.cycleH=c.cycleH||J(c).height();c.cycleW=c.cycleW||J(c).width();b.cycleH=b.cycleH||J(b).height();b.cycleW=b.cycleW||J(b).width();if(R.multiFx){if(R.lastFx==undefined||++R.lastFx>=R.fxs.length){R.lastFx=0;}W=R.fxs[R.lastFx];R.currFx=W;}if(R.oneTimeFx){W=R.oneTimeFx;R.oneTimeFx=null;}J.fn.cycle.resetState(R,W);if(R.before.length){J.each(R.before,function(d,e){if(V.cycleStop!=R.stopCount){return ;}e.apply(b,[c,b,R,a]);});}var T=function(){J.each(R.after,function(d,e){if(V.cycleStop!=R.stopCount){return ;}e.apply(b,[c,b,R,a]);});};B("tx firing; currSlide: "+R.currSlide+"; nextSlide: "+R.nextSlide);R.busy=1;if(R.fxFn){R.fxFn(c,b,R,T,a,X&&R.fastOnEvent);}else{if(J.isFunction(J.fn.cycle[R.fx])){J.fn.cycle[R.fx](c,b,R,T,a,X&&R.fastOnEvent);}else{J.fn.cycle.custom(c,b,R,T,a,X&&R.fastOnEvent);}}}if(Z||R.nextSlide==R.currSlide){R.lastSlide=R.currSlide;if(R.random){R.currSlide=R.nextSlide;if(++R.randomIndex==Y.length){R.randomIndex=0;}R.nextSlide=R.randomMap[R.randomIndex];if(R.nextSlide==R.currSlide){R.nextSlide=(R.currSlide==R.slideCount-1)?0:R.currSlide+1;}}else{if(R.backwards){var U=(R.nextSlide-1)<0;if(U&&R.bounce){R.backwards=!R.backwards;R.nextSlide=1;R.currSlide=0;}else{R.nextSlide=U?(Y.length-1):R.nextSlide-1;R.currSlide=U?0:R.nextSlide+1;}}else{var U=(R.nextSlide+1)==Y.length;if(U&&R.bounce){R.backwards=!R.backwards;R.nextSlide=Y.length-2;R.currSlide=Y.length-1;}else{R.nextSlide=U?0:R.nextSlide+1;R.currSlide=U?Y.length-1:R.nextSlide-1;}}}}if(Z&&R.pager){R.updateActivePagerLink(R.pager,R.currSlide,R.activePagerClass);}var S=0;if(R.timeout&&!R.continuous){S=I(Y[R.currSlide],Y[R.nextSlide],R,a);}else{if(R.continuous&&V.cyclePause){S=10;}}if(S>0){V.cycleTimeout=setTimeout(function(){F(Y,R,0,(!R.rev&&!R.backwards));},S);}}J.fn.cycle.updateActivePagerLink=function(R,T,S){J(R).each(function(){J(this).children().removeClass(S).eq(T).addClass(S);});};function I(V,T,U,S){if(U.timeoutFn){var R=U.timeoutFn.call(V,V,T,U,S);while((R-U.speed)<250){R+=U.speed;}B("calculated timeout: "+R+"; speed: "+U.speed);if(R!==false){return R;}}return U.timeout;}J.fn.cycle.next=function(R){P(R,R.rev?-1:1);};J.fn.cycle.prev=function(R){P(R,R.rev?1:-1);};function P(T,W){var S=T.elements;var V=T.$cont[0],U=V.cycleTimeout;if(U){clearTimeout(U);V.cycleTimeout=0;}if(T.random&&W<0){T.randomIndex--;if(--T.randomIndex==-2){T.randomIndex=S.length-2;}else{if(T.randomIndex==-1){T.randomIndex=S.length-1;}}T.nextSlide=T.randomMap[T.randomIndex];}else{if(T.random){T.nextSlide=T.randomMap[T.randomIndex];}else{T.nextSlide=T.currSlide+W;if(T.nextSlide<0){if(T.nowrap){return false;}T.nextSlide=S.length-1;}else{if(T.nextSlide>=S.length){if(T.nowrap){return false;}T.nextSlide=0;}}}}var R=T.onPrevNextEvent||T.prevNextClick;if(J.isFunction(R)){R(W>0,T.nextSlide,S[T.nextSlide]);}F(S,T,1,W>=0);return false;}function E(S,T){var R=J(T.pager);J.each(S,function(U,V){J.fn.cycle.createPagerAnchor(U,V,R,S,T);});T.updateActivePagerLink(T.pager,T.startingSlide,T.activePagerClass);}J.fn.cycle.createPagerAnchor=function(V,W,T,U,X){var S;if(J.isFunction(X.pagerAnchorBuilder)){S=X.pagerAnchorBuilder(V,W);B("pagerAnchorBuilder("+V+", el) returned: "+S);}else{S='<a href="#">'+(V+1)+"</a>";}if(!S){return ;}var Y=J(S);if(Y.parents("body").length===0){var R=[];if(T.length>1){T.each(function(){var Z=Y.clone(true);J(this).append(Z);R.push(Z[0]);});Y=J(R);}else{Y.appendTo(T);}}X.pagerAnchors=X.pagerAnchors||[];X.pagerAnchors.push(Y);Y.bind(X.pagerEvent,function(c){c.preventDefault();X.nextSlide=V;var b=X.$cont[0],a=b.cycleTimeout;if(a){clearTimeout(a);b.cycleTimeout=0;}var Z=X.onPagerEvent||X.pagerClick;if(J.isFunction(Z)){Z(X.nextSlide,U[X.nextSlide]);}F(U,X,1,X.currSlide<V);});if(!/^click/.test(X.pagerEvent)&&!X.allowPagerClickBubble){Y.bind("click.cycle",function(){return false;});}if(X.pauseOnPagerHover){Y.hover(function(){X.$cont[0].cyclePause++;},function(){X.$cont[0].cyclePause--;});}};J.fn.cycle.hopsFromLast=function(U,T){var S,R=U.lastSlide,V=U.currSlide;if(T){S=V>R?V-R:U.slideCount-R;}else{S=V<R?R-V:R+U.slideCount-V;}return S;};function H(T){B("applying clearType background-color hack");function S(U){U=parseInt(U).toString(16);return U.length<2?"0"+U:U;}function R(W){for(;W&&W.nodeName.toLowerCase()!="html";W=W.parentNode){var U=J.css(W,"background-color");if(U.indexOf("rgb")>=0){var V=U.match(/\d+/g);return"#"+S(V[0])+S(V[1])+S(V[2]);}if(U&&U!="transparent"){return U;}}return"#ffffff";}T.each(function(){J(this).css("background-color",R(this));});}J.fn.cycle.commonReset=function(W,U,V,S,T,R){J(V.elements).not(W).hide();V.cssBefore.opacity=1;V.cssBefore.display="block";if(S!==false&&U.cycleW>0){V.cssBefore.width=U.cycleW;}if(T!==false&&U.cycleH>0){V.cssBefore.height=U.cycleH;}V.cssAfter=V.cssAfter||{};V.cssAfter.display="none";J(W).css("zIndex",V.slideCount+(R===true?1:0));J(U).css("zIndex",V.slideCount+(R===true?0:1));};J.fn.cycle.custom=function(d,X,R,U,W,S){var c=J(d),Y=J(X);var T=R.speedIn,b=R.speedOut,V=R.easeIn,a=R.easeOut;Y.css(R.cssBefore);if(S){if(typeof S=="number"){T=b=S;}else{T=b=1;}V=a=null;}var Z=function(){Y.animate(R.animIn,T,V,U);};c.animate(R.animOut,b,a,function(){if(R.cssAfter){c.css(R.cssAfter);}if(!R.sync){Z();}});if(R.sync){Z();}};J.fn.cycle.transitions={fade:function(S,T,R){T.not(":eq("+R.currSlide+")").css("opacity",0);R.before.push(function(W,U,V){J.fn.cycle.commonReset(W,U,V);V.cssBefore.opacity=0;});R.animIn={opacity:1};R.animOut={opacity:0};R.cssBefore={top:0,left:0};}};J.fn.cycle.ver=function(){return M;};J.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,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:!J.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);})(window.jQuery);window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments));}};
