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