(function(d){function i(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments,""))}function m(h,c,g,l){if(!c.busy){var k=c.container,n=h[c.currSlide],a=h[c.nextSlide];if(!(k.cycleTimeout===0&&!g))if(!g&&!k.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide))c.end&&c.end(c);else{if(g||!k.cyclePause){c.before.length&&d.each(c.before,function(o,q){q.apply(a,[n,a,c,l])});var p=function(){d.browser.msie&&c.cleartype&& this.style.removeAttribute("filter");d.each(c.after,function(o,q){q.apply(a,[n,a,c,l])})};if(c.nextSlide!=c.currSlide){c.busy=1;if(c.fxFn)c.fxFn(n,a,c,p,l);else d.isFunction(d.fn.cycle[c.fx])?d.fn.cycle[c.fx](n,a,c,p):d.fn.cycle.custom(n,a,c,p,g&&c.fastOnEvent)}if(c.random){c.currSlide=c.nextSlide;if(++c.randomIndex==h.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else{g=c.nextSlide+1==h.length;c.nextSlide=g?0:c.nextSlide+1;c.currSlide=g?h.length-1:c.nextSlide-1}c.pager&&d.fn.cycle.updateActivePagerLink(c.pager, c.currSlide)}if(c.timeout&&!c.continuous)k.cycleTimeout=setTimeout(function(){m(h,c,0,!c.rev)},c.timeout);else if(c.continuous&&k.cyclePause)k.cycleTimeout=setTimeout(function(){m(h,c,0,!c.rev)},10)}}}function b(h,c,g){var l=c.container,k=l.cycleTimeout;if(k){clearTimeout(k);l.cycleTimeout=0}if(c.random&&g<0){c.randomIndex--;if(--c.randomIndex==-2)c.randomIndex=h.length-2;else if(c.randomIndex==-1)c.randomIndex=h.length-1;c.nextSlide=c.randomMap[c.randomIndex]}else if(c.random){if(++c.randomIndex== h.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else{c.nextSlide=c.currSlide+g;if(c.nextSlide<0){if(c.nowrap)return false;c.nextSlide=h.length-1}else if(c.nextSlide>=h.length){if(c.nowrap)return false;c.nextSlide=0}}c.prevNextClick&&typeof c.prevNextClick=="function"&&c.prevNextClick(g>0,c.nextSlide,h[c.nextSlide]);m(h,c,1,g>=0);return false}function e(h,c){var g=d(c.pager);d.each(h,function(l,k){d.fn.cycle.createPagerAnchor(l,k,g,h,c)});d.fn.cycle.updateActivePagerLink(c.pager,c.startingSlide)} function j(h){function c(l){l=parseInt(l).toString(16);return l.length<2?"0"+l:l}function g(l){for(;l&&l.nodeName.toLowerCase()!="html";l=l.parentNode){var k=d.css(l,"background-color");if(k.indexOf("rgb")>=0){l=k.match(/\d+/g);return"#"+c(l[0])+c(l[1])+c(l[2])}if(k&&k!="transparent")return k}return"#ffffff"}h.each(function(){d(this).css("background-color",g(this))})}var f=d.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);d.fn.cycle=function(h,c){return this.each(function(){if(h===undefined||h=== null)h={};if(h.constructor==String)switch(h){case "stop":this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=0;d(this).data("cycle.opts","");return;case "pause":this.cyclePause=1;return;case "resume":this.cyclePause=0;if(c===true){h=d(this).data("cycle.opts");if(!h){i("options not found, can not resume");return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}m(h.elements,h,1,1)}return;default:h={fx:h}}else if(h.constructor==Number){var g=h;h=d(this).data("cycle.opts"); if(!h){i("options not found, can not advance slide");return}if(g<0||g>=h.elements.length){i("invalid slide index: "+g);return}h.nextSlide=g;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}m(h.elements,h,1,g>=h.currSlide);return}this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cyclePause=this.cycleTimeout=0;var l=d(this),k=h.slideExpr?d(h.slideExpr,this):l.children(),n=k.get();if(n.length<2)i("terminating; too few slides: "+n.length);else{var a=d.extend({},d.fn.cycle.defaults, h||{},d.metadata?l.metadata():d.meta?l.data():{});if(a.autostop)a.countdown=a.autostopCount||n.length;l.data("cycle.opts",a);a.container=this;a.elements=n;a.before=a.before?[a.before]:[];a.after=a.after?[a.after]:[];a.after.unshift(function(){a.busy=0});a.continuous&&a.after.push(function(){m(n,a,0,!a.rev)});f&&a.cleartype&&!a.cleartypeNoBg&&j(k);g=this.className;a.width=parseInt((g.match(/w:(\d+)/)||[])[1])||a.width;a.height=parseInt((g.match(/h:(\d+)/)||[])[1])||a.height;a.timeout=parseInt((g.match(/t:(\d+)/)|| [])[1])||a.timeout;l.css("position")=="static"&&l.css("position","relative");a.width&&l.width(a.width);a.height&&a.height!="auto"&&l.height(a.height);if(a.startingSlide)a.startingSlide=parseInt(a.startingSlide);if(a.random){a.randomMap=[];for(g=0;g<n.length;g++)a.randomMap.push(g);a.randomMap.sort(function(){return Math.random()-0.5});a.randomIndex=0;a.startingSlide=a.randomMap[0]}else if(a.startingSlide>=n.length)a.startingSlide=0;var p=a.startingSlide||0;k.css({position:"absolute",top:0,left:0}).hide().each(function(o){o= p?o>=p?n.length-(o-p):p-o:n.length-o;d(this).css("z-index",o)});d(n[p]).css("opacity",1).show();d.browser.msie&&n[p].style.removeAttribute("filter");a.fit&&a.width&&k.width(a.width);a.fit&&a.height&&a.height!="auto"&&k.height(a.height);a.pause&&l.hover(function(){this.cyclePause=1},function(){this.cyclePause=0});g=d.fn.cycle.transitions[a.fx];if(d.isFunction(g))g(l,k,a);else a.fx!="custom"&&i("unknown transition: "+a.fx);k.each(function(){var o=d(this);this.cycleH=a.fit&&a.height?a.height:o.height(); this.cycleW=a.fit&&a.width?a.width:o.width()});a.cssBefore=a.cssBefore||{};a.animIn=a.animIn||{};a.animOut=a.animOut||{};k.not(":eq("+p+")").css(a.cssBefore);a.cssFirst&&d(k[p]).css(a.cssFirst);if(a.timeout){a.timeout=parseInt(a.timeout);if(a.speed.constructor==String)a.speed=d.fx.speeds[a.speed]||parseInt(a.speed);for(a.sync||(a.speed/=2);a.timeout-a.speed<250;)a.timeout+=a.speed}if(a.easing)a.easeIn=a.easeOut=a.easing;if(!a.speedIn)a.speedIn=a.speed;if(!a.speedOut)a.speedOut=a.speed;a.slideCount= n.length;a.currSlide=p;if(a.random){a.nextSlide=a.currSlide;if(++a.randomIndex==n.length)a.randomIndex=0;a.nextSlide=a.randomMap[a.randomIndex]}else a.nextSlide=a.startingSlide>=n.length-1?0:a.startingSlide+1;g=k[p];a.before.length&&a.before[0].apply(g,[g,g,a,true]);a.after.length>1&&a.after[1].apply(g,[g,g,a,true]);if(a.click&&!a.next)a.next=a.click;a.next&&d(a.next).bind("click",function(){return b(n,a,a.rev?-1:1)});a.prev&&d(a.prev).bind("click",function(){return b(n,a,a.rev?1:-1)});a.pager&&e(n, a);a.addSlide=function(o,q){o=d(o);var r=o[0];a.autostopCount||a.countdown++;n[q?"unshift":"push"](r);if(a.els)a.els[q?"unshift":"push"](r);a.slideCount=n.length;o.css("position","absolute");o[q?"prependTo":"appendTo"](l);if(q){a.currSlide++;a.nextSlide++}f&&a.cleartype&&!a.cleartypeNoBg&&j(o);a.fit&&a.width&&o.width(a.width);a.fit&&a.height&&a.height!="auto"&&k.height(a.height);r.cycleH=a.fit&&a.height?a.height:o.height();r.cycleW=a.fit&&a.width?a.width:o.width();o.css(a.cssBefore);a.pager&&d.fn.cycle.createPagerAnchor(n.length- 1,r,d(a.pager),n,a);typeof a.onAddSlide=="function"&&a.onAddSlide(o)};if(a.timeout||a.continuous)this.cycleTimeout=setTimeout(function(){m(n,a,0,!a.rev)},a.continuous?10:a.timeout+(a.delay||0))}})};d.fn.cycle.updateActivePagerLink=function(h,c){d(h).find("a").removeClass("activeSlide").filter("a:eq("+c+")").addClass("activeSlide")};d.fn.cycle.createPagerAnchor=function(h,c,g,l,k){c=typeof k.pagerAnchorBuilder=="function"?d(k.pagerAnchorBuilder(h,c)):d('<a href="#">'+(h+1)+"</a>");c.parents("body").length== 0&&c.appendTo(g);c.bind(k.pagerEvent,function(){k.nextSlide=h;var n=k.container,a=n.cycleTimeout;if(a){clearTimeout(a);n.cycleTimeout=0}typeof k.pagerClick=="function"&&k.pagerClick(k.nextSlide,l[k.nextSlide]);m(l,k,1,k.currSlide<h);return false});k.pauseOnPagerHover&&c.hover(function(){k.container.cyclePause=1},function(){k.container.cyclePause=0})};d.fn.cycle.custom=function(h,c,g,l,k){var n=d(h),a=d(c);a.css(g.cssBefore);var p=k?1:g.speedIn,o=k?null:g.easeIn,q=function(){a.animate(g.animIn,p,o, l)};n.animate(g.animOut,k?1:g.speedOut,k?null:g.easeOut,function(){g.cssAfter&&n.css(g.cssAfter);g.sync||q()});g.sync&&q()};d.fn.cycle.transitions={fade:function(h,c,g){c.not(":eq("+g.startingSlide+")").css("opacity",0);g.before.push(function(){d(this).show()});g.animIn={opacity:1};g.animOut={opacity:0};g.cssBefore={opacity:0};g.cssAfter={display:"none"};g.onAddSlide=function(l){l.hide()}}};d.fn.cycle.ver=function(){return"2.30"};d.fn.cycle.defaults={fx:"fade",timeout:4E3,continuous:0,speed:1E3,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,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0,fastOnEvent:0}})(jQuery); (function(d){d.fn.cycle.transitions.scrollUp=function(i,m,b){i.css("overflow","hidden");b.before.push(function(e,j,f){d(this).show();f.cssBefore.top=j.offsetHeight;f.animOut.top=0-e.offsetHeight});b.cssFirst={top:0};b.animIn={top:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.scrollDown=function(i,m,b){i.css("overflow","hidden");b.before.push(function(e,j,f){d(this).show();f.cssBefore.top=0-j.offsetHeight;f.animOut.top=e.offsetHeight});b.cssFirst={top:0};b.animIn={top:0};b.cssAfter={display:"none"}}; d.fn.cycle.transitions.scrollLeft=function(i,m,b){i.css("overflow","hidden");b.before.push(function(e,j,f){d(this).show();f.cssBefore.left=j.offsetWidth;f.animOut.left=0-e.offsetWidth});b.cssFirst={left:0};b.animIn={left:0}};d.fn.cycle.transitions.scrollRight=function(i,m,b){i.css("overflow","hidden");b.before.push(function(e,j,f){d(this).show();f.cssBefore.left=0-j.offsetWidth;f.animOut.left=e.offsetWidth});b.cssFirst={left:0};b.animIn={left:0}};d.fn.cycle.transitions.scrollHorz=function(i,m,b){i.css("overflow", "hidden").width();b.before.push(function(e,j,f,h){d(this).show();var c=e.offsetWidth;j=j.offsetWidth;f.cssBefore=h?{left:j}:{left:-j};f.animIn.left=0;f.animOut.left=h?-c:c;m.not(e).css(f.cssBefore)});b.cssFirst={left:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.scrollVert=function(i,m,b){i.css("overflow","hidden");b.before.push(function(e,j,f,h){d(this).show();var c=e.offsetHeight;j=j.offsetHeight;f.cssBefore=h?{top:-j}:{top:j};f.animIn.top=0;f.animOut.top=h?c:-c;m.not(e).css(f.cssBefore)}); b.cssFirst={top:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.slideX=function(i,m,b){b.before.push(function(e){d(e).css("zIndex",1)});b.onAddSlide=function(e){e.hide()};b.cssBefore={zIndex:2};b.animIn={width:"show"};b.animOut={width:"hide"}};d.fn.cycle.transitions.slideY=function(i,m,b){b.before.push(function(e){d(e).css("zIndex",1)});b.onAddSlide=function(e){e.hide()};b.cssBefore={zIndex:2};b.animIn={height:"show"};b.animOut={height:"hide"}};d.fn.cycle.transitions.shuffle=function(i,m,b){i= i.css("overflow","visible").width();m.css({left:0,top:0});b.before.push(function(){d(this).show()});b.speed/=2;b.random=0;b.shuffle=b.shuffle||{left:-i,top:15};b.els=[];for(i=0;i<m.length;i++)b.els.push(m[i]);for(i=0;i<b.startingSlide;i++)b.els.push(b.els.shift());b.fxFn=function(e,j,f,h,c){var g=c?d(e):d(j);g.animate(f.shuffle,f.speedIn,f.easeIn,function(){c?f.els.push(f.els.shift()):f.els.unshift(f.els.pop());if(c)for(var l=0,k=f.els.length;l<k;l++)d(f.els[l]).css("z-index",k-l);else{l=d(e).css("z-index"); g.css("z-index",parseInt(l)+1)}g.animate({left:0,top:0},f.speedOut,f.easeOut,function(){d(c?this:e).hide();h&&h()})})};b.onAddSlide=function(e){e.hide()}};d.fn.cycle.transitions.turnUp=function(i,m,b){b.before.push(function(e,j,f){d(this).show();f.cssBefore.top=j.cycleH;f.animIn.height=j.cycleH});b.onAddSlide=function(e){e.hide()};b.cssFirst={top:0};b.cssBefore={height:0};b.animIn={top:0};b.animOut={height:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.turnDown=function(i,m,b){b.before.push(function(e, j,f){d(this).show();f.animIn.height=j.cycleH;f.animOut.top=e.cycleH});b.onAddSlide=function(e){e.hide()};b.cssFirst={top:0};b.cssBefore={top:0,height:0};b.animOut={height:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.turnLeft=function(i,m,b){b.before.push(function(e,j,f){d(this).show();f.cssBefore.left=j.cycleW;f.animIn.width=j.cycleW});b.onAddSlide=function(e){e.hide()};b.cssBefore={width:0};b.animIn={left:0};b.animOut={width:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.turnRight= function(i,m,b){b.before.push(function(e,j,f){d(this).show();f.animIn.width=j.cycleW;f.animOut.left=e.cycleW});b.onAddSlide=function(e){e.hide()};b.cssBefore={left:0,width:0};b.animIn={left:0};b.animOut={width:0};b.cssAfter={display:"none"}};d.fn.cycle.transitions.zoom=function(i,m,b){b.cssFirst={top:0,left:0};b.cssAfter={display:"none"};b.before.push(function(e,j,f){d(this).show();f.cssBefore={width:0,height:0,top:j.cycleH/2,left:j.cycleW/2};f.cssAfter={display:"none"};f.animIn={top:0,left:0,width:j.cycleW, height:j.cycleH};f.animOut={width:0,height:0,top:e.cycleH/2,left:e.cycleW/2};d(e).css("zIndex",2);d(j).css("zIndex",1)});b.onAddSlide=function(e){e.hide()}};d.fn.cycle.transitions.fadeZoom=function(i,m,b){b.before.push(function(e,j,f){f.cssBefore={width:0,height:0,opacity:1,left:j.cycleW/2,top:j.cycleH/2,zIndex:1};f.animIn={top:0,left:0,width:j.cycleW,height:j.cycleH}});b.animOut={opacity:0};b.cssAfter={zIndex:0}};d.fn.cycle.transitions.blindX=function(i,m,b){i=i.css("overflow","hidden").width(); m.show();b.before.push(function(e){d(e).css("zIndex",1)});b.cssBefore={left:i,zIndex:2};b.cssAfter={zIndex:1};b.animIn={left:0};b.animOut={left:i}};d.fn.cycle.transitions.blindY=function(i,m,b){i=i.css("overflow","hidden").height();m.show();b.before.push(function(e){d(e).css("zIndex",1)});b.cssBefore={top:i,zIndex:2};b.cssAfter={zIndex:1};b.animIn={top:0};b.animOut={top:i}};d.fn.cycle.transitions.blindZ=function(i,m,b){var e=i.css("overflow","hidden").height();i=i.width();m.show();b.before.push(function(j){d(j).css("zIndex", 1)});b.cssBefore={top:e,left:i,zIndex:2};b.cssAfter={zIndex:1};b.animIn={top:0,left:0};b.animOut={top:e,left:i}};d.fn.cycle.transitions.growX=function(i,m,b){b.before.push(function(e,j,f){f.cssBefore={left:this.cycleW/2,width:0,zIndex:2};f.animIn={left:0,width:this.cycleW};f.animOut={left:0};d(e).css("zIndex",1)});b.onAddSlide=function(e){e.hide().css("zIndex",1)}};d.fn.cycle.transitions.growY=function(i,m,b){b.before.push(function(e,j,f){f.cssBefore={top:this.cycleH/2,height:0,zIndex:2};f.animIn= {top:0,height:this.cycleH};f.animOut={top:0};d(e).css("zIndex",1)});b.onAddSlide=function(e){e.hide().css("zIndex",1)}};d.fn.cycle.transitions.curtainX=function(i,m,b){b.before.push(function(e,j,f){f.cssBefore={left:j.cycleW/2,width:0,zIndex:1,display:"block"};f.animIn={left:0,width:this.cycleW};f.animOut={left:e.cycleW/2,width:0};d(e).css("zIndex",2)});b.onAddSlide=function(e){e.hide()};b.cssAfter={zIndex:1,display:"none"}};d.fn.cycle.transitions.curtainY=function(i,m,b){b.before.push(function(e, j,f){f.cssBefore={top:j.cycleH/2,height:0,zIndex:1,display:"block"};f.animIn={top:0,height:this.cycleH};f.animOut={top:e.cycleH/2,height:0};d(e).css("zIndex",2)});b.onAddSlide=function(e){e.hide()};b.cssAfter={zIndex:1,display:"none"}};d.fn.cycle.transitions.cover=function(i,m,b){var e=b.direction||"left",j=i.css("overflow","hidden").width(),f=i.height();b.before.push(function(h,c,g){g.cssBefore=g.cssBefore||{};g.cssBefore.zIndex=2;g.cssBefore.display="block";if(e=="right")g.cssBefore.left=-j;else if(e== "up")g.cssBefore.top=f;else if(e=="down")g.cssBefore.top=-f;else g.cssBefore.left=j;d(h).css("zIndex",1)});if(!b.animIn)b.animIn={left:0,top:0};if(!b.animOut)b.animOut={left:0,top:0};b.cssAfter=b.cssAfter||{};b.cssAfter.zIndex=2;b.cssAfter.display="none"};d.fn.cycle.transitions.uncover=function(i,m,b){var e=b.direction||"left",j=i.css("overflow","hidden").width(),f=i.height();b.before.push(function(h,c,g){g.cssBefore.display="block";if(e=="right")g.animOut.left=j;else if(e=="up")g.animOut.top=-f; else if(e=="down")g.animOut.top=f;else g.animOut.left=-j;d(h).css("zIndex",2);d(c).css("zIndex",1)});b.onAddSlide=function(h){h.hide()};if(!b.animIn)b.animIn={left:0,top:0};b.cssBefore=b.cssBefore||{};b.cssBefore.top=0;b.cssBefore.left=0;b.cssAfter=b.cssAfter||{};b.cssAfter.zIndex=1;b.cssAfter.display="none"};d.fn.cycle.transitions.toss=function(i,m,b){var e=i.css("overflow","visible").width(),j=i.height();b.before.push(function(f,h,c){d(f).css("zIndex",2);c.cssBefore.display="block";if(!c.animOut.left&& !c.animOut.top)c.animOut={left:e*2,top:-j/2,opacity:0};else c.animOut.opacity=0});b.onAddSlide=function(f){f.hide()};b.cssBefore={left:0,top:0,zIndex:1,opacity:1};b.animIn={left:0};b.cssAfter={zIndex:2,display:"none"}};d.fn.cycle.transitions.wipe=function(i,m,b){var e=i.css("overflow","hidden").width(),j=i.height();b.cssBefore=b.cssBefore||{};var f;if(b.clip)if(/l2r/.test(b.clip))f="rect(0px 0px "+j+"px 0px)";else if(/r2l/.test(b.clip))f="rect(0px "+e+"px "+j+"px "+e+"px)";else if(/t2b/.test(b.clip))f= "rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(b.clip))f="rect("+j+"px "+e+"px "+j+"px 0px)";else if(/zoom/.test(b.clip)){var h=parseInt(j/2),c=parseInt(e/2);f="rect("+h+"px "+c+"px "+h+"px "+c+"px)"}b.cssBefore.clip=b.cssBefore.clip||f||"rect(0px 0px 0px 0px)";i=b.cssBefore.clip.match(/(\d+)/g);h=parseInt(i[0]);var g=parseInt(i[1]),l=parseInt(i[2]);c=parseInt(i[3]);b.before.push(function(k,n,a){function p(){var t=h?h-parseInt(r*(h/s)):0,u=c?c-parseInt(r*(c/s)):0,v=l<j?l+parseInt(r*((j-l)/s||1)): j,w=g<e?g+parseInt(r*((e-g)/s||1)):e;q.css({clip:"rect("+t+"px "+w+"px "+v+"px "+u+"px)"});r++<=s?setTimeout(p,13):o.css("display","none")}if(k!=n){var o=d(k).css("zIndex",2),q=d(n).css({zIndex:3,display:"block"}),r=1,s=parseInt(a.speedIn/13)-1;p()}});b.cssAfter={};b.animIn={left:0};b.animOut={left:0}}})(jQuery);
