/* * jQuery Cycle Plugin * Examples and documentation at: http://malsup.com/jquery/cycle/ * Copyright (c) 2007-2008 M. Alsup * Version: 2.32 (21-DEC-2008) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(function(G){var H="2.32";var C=G.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function D(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments,""))}}G.fn.cycle=function(J){if(this.length==0){D("terminating; zero elements found by selector"+(G.isReady?"":" (DOM not ready)"));return this}var K=arguments[1];return this.each(function(){if(J===undefined||J===null){J={}}if(J.constructor==String){switch(J){case"stop":if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;G(this).data("cycle.opts","");return ;case"pause":this.cyclePause=1;return ;case"resume":this.cyclePause=0;if(K===true){J=G(this).data("cycle.opts");if(!J){D("options not found, can not resume");return }if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}B(J.elements,J,1,1)}return ;default:J={fx:J}}}else{if(J.constructor==Number){var S=J;J=G(this).data("cycle.opts");if(!J){D("options not found, can not advance slide");return }if(S<0||S>=J.elements.length){D("invalid slide index: "+S);return }J.nextSlide=S;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}B(J.elements,J,1,S>=J.currSlide);return }}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var X=G(this);var T=J.slideExpr?G(J.slideExpr,this):X.children();var O=T.get();if(O.length<2){D("terminating; too few slides: "+O.length);return }var L=G.extend({},G.fn.cycle.defaults,J||{},G.metadata?X.metadata():G.meta?X.data():{});if(L.autostop){L.countdown=L.autostopCount||O.length}X.data("cycle.opts",L);L.container=this;L.elements=O;L.before=L.before?[L.before]:[];L.after=L.after?[L.after]:[];L.after.unshift(function(){L.busy=0});if(L.continuous){L.after.push(function(){B(O,L,0,!L.rev)})}if(C&&L.cleartype&&!L.cleartypeNoBg){E(T)}var Z=this.className;L.width=parseInt((Z.match(/w:(\d+)/)||[])[1])||L.width;L.height=parseInt((Z.match(/h:(\d+)/)||[])[1])||L.height;L.timeout=parseInt((Z.match(/t:(\d+)/)||[])[1])||L.timeout;if(X.css("position")=="static"){X.css("position","relative")}if(L.width){X.width(L.width)}if(L.height&&L.height!="auto"){X.height(L.height)}if(L.startingSlide){L.startingSlide=parseInt(L.startingSlide)}if(L.random){L.randomMap=[];for(var P=0;P=O.length){L.startingSlide=0}}var R=L.startingSlide||0;T.css({position:"absolute",top:0,left:0}).hide().each(function(a){var b=R?a>=R?O.length-(a-R):R-a:O.length-a;G(this).css("z-index",b)});G(O[R]).css("opacity",1).show();if(G.browser.msie){O[R].style.removeAttribute("filter")}if(L.fit&&L.width){T.width(L.width)}if(L.fit&&L.height&&L.height!="auto"){T.height(L.height)}if(L.containerResize){var U=0,N=0;for(var P=0;PU?W:U;N=Q>N?Q:N}X.css({width:U+"px",height:N+"px"})}if(L.pause){X.hover(function(){this.cyclePause++},function(){this.cyclePause--})}var Y=G.fn.cycle.transitions[L.fx];if(G.isFunction(Y)){Y(X,T,L)}else{if(L.fx!="custom"){D("unknown transition: "+L.fx)}}T.each(function(){var a=G(this);this.cycleH=(L.fit&&L.height)?L.height:a.height();this.cycleW=(L.fit&&L.width)?L.width:a.width()});L.cssBefore=L.cssBefore||{};L.animIn=L.animIn||{};L.animOut=L.animOut||{};T.not(":eq("+R+")").css(L.cssBefore);if(L.cssFirst){G(T[R]).css(L.cssFirst)}if(L.timeout){L.timeout=parseInt(L.timeout);if(L.speed.constructor==String){L.speed=G.fx.speeds[L.speed]||parseInt(L.speed)}if(!L.sync){L.speed=L.speed/2}while((L.timeout-L.speed)<250){L.timeout+=L.speed}}if(L.easing){L.easeIn=L.easeOut=L.easing}if(!L.speedIn){L.speedIn=L.speed}if(!L.speedOut){L.speedOut=L.speed}L.slideCount=O.length;L.currSlide=R;if(L.random){L.nextSlide=L.currSlide;if(++L.randomIndex==O.length){L.randomIndex=0}L.nextSlide=L.randomMap[L.randomIndex]}else{L.nextSlide=L.startingSlide>=(O.length-1)?0:L.startingSlide+1}var V=T[R];if(L.before.length){L.before[0].apply(V,[V,V,L,true])}if(L.after.length>1){L.after[1].apply(V,[V,V,L,true])}if(L.click&&!L.next){L.next=L.click}if(L.next){G(L.next).bind("click",function(){return I(O,L,L.rev?-1:1)})}if(L.prev){G(L.prev).bind("click",function(){return I(O,L,L.rev?1:-1)})}if(L.pager){A(O,L)}L.addSlide=function(b,c){var a=G(b),d=a[0];if(!L.autostopCount){L.countdown++}O[c?"unshift":"push"](d);if(L.els){L.els[c?"unshift":"push"](d)}L.slideCount=O.length;a.css("position","absolute");a[c?"prependTo":"appendTo"](X);if(c){L.currSlide++;L.nextSlide++}if(C&&L.cleartype&&!L.cleartypeNoBg){E(a)}if(L.fit&&L.width){a.width(L.width)}if(L.fit&&L.height&&L.height!="auto"){T.height(L.height)}d.cycleH=(L.fit&&L.height)?L.height:a.height();d.cycleW=(L.fit&&L.width)?L.width:a.width();a.css(L.cssBefore);if(L.pager){G.fn.cycle.createPagerAnchor(O.length-1,d,G(L.pager),O,L)}if(typeof L.onAddSlide=="function"){L.onAddSlide(a)}};if(L.timeout||L.continuous){this.cycleTimeout=setTimeout(function(){B(O,L,0,!L.rev)},L.continuous?10:L.timeout+(L.delay||0))}})};function B(O,J,N,P){if(J.busy){return }var M=J.container,R=O[J.currSlide],Q=O[J.nextSlide];if(M.cycleTimeout===0&&!N){return }if(!N&&!M.cyclePause&&((J.autostop&&(--J.countdown<=0))||(J.nowrap&&!J.random&&J.nextSlide=J.length){if(K.nowrap){return false}K.nextSlide=0}}}}if(K.prevNextClick&&typeof K.prevNextClick=="function"){K.prevNextClick(N>0,K.nextSlide,J[K.nextSlide])}B(J,K,1,N>=0);return false}function A(K,L){var J=G(L.pager);G.each(K,function(M,N){G.fn.cycle.createPagerAnchor(M,N,J,K,L)});G.fn.cycle.updateActivePagerLink(L.pager,L.startingSlide)}G.fn.cycle.createPagerAnchor=function(M,N,K,L,O){var J=(typeof O.pagerAnchorBuilder=="function")?O.pagerAnchorBuilder(M,N):''+(M+1)+"";if(!J){return }var P=G(J);if(P.parents("body").length==0){P.appendTo(K)}P.bind(O.pagerEvent,function(){O.nextSlide=M;var R=O.container,Q=R.cycleTimeout;if(Q){clearTimeout(Q);R.cycleTimeout=0}if(typeof O.pagerClick=="function"){O.pagerClick(O.nextSlide,L[O.nextSlide])}B(L,O,1,O.currSlide=0){var N=M.match(/\d+/g);return"#"+K(N[0])+K(N[1])+K(N[2])}if(M&&M!="transparent"){return M}}return"#ffffff"}L.each(function(){G(this).css("background-color",J(this))})}G.fn.cycle.custom=function(U,O,J,L,K){var T=G(U),P=G(O);P.css(J.cssBefore);var M=K?1:J.speedIn;var S=K?1:J.speedOut;var N=K?null:J.easeIn;var R=K?null:J.easeOut;var Q=function(){P.animate(J.animIn,M,N,L)};T.animate(J.animOut,S,R,function(){if(J.cssAfter){T.css(J.cssAfter)}if(!J.sync){Q()}});if(J.sync){Q()}};G.fn.cycle.transitions={fade:function(K,L,J){L.not(":eq("+J.startingSlide+")").css("opacity",0);J.before.push(function(){G(this).show()});J.animIn={opacity:1};J.animOut={opacity:0};J.cssBefore={opacity:0};J.cssAfter={display:"none"};J.onAddSlide=function(M){M.hide()}}};G.fn.cycle.ver=function(){return H};G.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(A){A.fn.cycle.transitions.scrollUp=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.top=E.offsetHeight;F.animOut.top=0-G.offsetHeight});B.cssFirst={top:0};B.animIn={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollDown=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.top=0-E.offsetHeight;F.animOut.top=G.offsetHeight});B.cssFirst={top:0};B.animIn={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollLeft=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.left=E.offsetWidth;F.animOut.left=0-G.offsetWidth});B.cssFirst={left:0};B.animIn={left:0}};A.fn.cycle.transitions.scrollRight=function(C,D,B){C.css("overflow","hidden");B.before.push(function(G,E,F){A(this).show();F.cssBefore.left=0-E.offsetWidth;F.animOut.left=G.offsetWidth});B.cssFirst={left:0};B.animIn={left:0}};A.fn.cycle.transitions.scrollHorz=function(C,D,B){C.css("overflow","hidden").width();B.before.push(function(I,G,H,F){A(this).show();var E=I.offsetWidth,J=G.offsetWidth;H.cssBefore=F?{left:J}:{left:-J};H.animIn.left=0;H.animOut.left=F?-E:E;D.not(I).css(H.cssBefore)});B.cssFirst={left:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.scrollVert=function(C,D,B){C.css("overflow","hidden");B.before.push(function(J,G,H,F){A(this).show();var I=J.offsetHeight,E=G.offsetHeight;H.cssBefore=F?{top:-E}:{top:E};H.animIn.top=0;H.animOut.top=F?I:-I;D.not(J).css(H.cssBefore)});B.cssFirst={top:0};B.cssAfter={display:"none"}};A.fn.cycle.transitions.slideX=function(C,D,B){B.before.push(function(G,E,F){A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide()};B.cssBefore={zIndex:2};B.animIn={width:"show"};B.animOut={width:"hide"}};A.fn.cycle.transitions.slideY=function(C,D,B){B.before.push(function(G,E,F){A(G).css("zIndex",1)});B.onAddSlide=function(E){E.hide()};B.cssBefore={zIndex:2};B.animIn={height:"show"};B.animOut={height:"hide"}};A.fn.cycle.transitions.shuffle=function(E,F,D){var B=E.css("overflow","visible").width();F.css({left:0,top:0});D.before.push(function(){A(this).show()});D.speed=D.speed/2;D.random=0;D.shuffle=D.shuffle||{left:-B,top:15};D.els=[];for(var C=0;C