(function($){
var _2="1.93";
$.fn.cycle=function(_3){
return this.each(function(){
if(_3&&_3.constructor==String){
switch(_3){
case "stop":
if(this.cycleTimeout){
clearTimeout(this.cycleTimeout);
}
this.cycleTimeout=0;
return;
case "pause":
this.cyclePause=1;
return;
case "resume":
this.cyclePause=0;
return;
default:
_3={fx:_3};
}
}
var _4=$(this),$slides=_4.children(),els=$slides.get();
if(els.length<2){
return;
}
var _5=$.extend({},$.fn.cycle.defaults,_3||{},$.meta?_4.data():{});
if(_5.autostop){
_5.countdown=els.length;
}
_5.before=_5.before?[_5.before]:[];
_5.after=_5.after?[_5.after]:[];
_5.after.unshift(function(){
_5.busy=0;
});
var _6=this.className;
var w=parseInt((_6.match(/w:(\d+)/)||[])[1])||_5.width;
var h=parseInt((_6.match(/h:(\d+)/)||[])[1])||_5.height;
_5.timeout=parseInt((_6.match(/t:(\d+)/)||[])[1])||_5.timeout;
if(_4.css("position")=="static"){
_4.css("position","relative");
}
if(w){
_4.width(w);
}
if(h&&h!="auto"){
_4.height(h);
}
$slides.each(function(i){
$(this).css("z-index",els.length-i);
}).css("position","absolute").hide();
$(els[0]).show();
if(_5.fit&&w){
$slides.width(w);
}
if(_5.fit&&h&&h!="auto"){
$slides.height(h);
}
if(_5.pause){
_4.hover(function(){
this.cyclePause=1;
},function(){
this.cyclePause=0;
});
}
var _a=$.fn.cycle.transitions[_5.fx];
if($.isFunction(_a)){
_a(_4,$slides,_5);
}
$slides.each(function(){
var _b=$(this);
this.cycleH=(_5.fit&&h)?h:_b.height();
this.cycleW=(_5.fit&&w)?w:_b.width();
});
_5.cssBefore=_5.cssBefore||{};
_5.animIn=_5.animIn||{};
_5.animOut=_5.animOut||{};
$slides.not(":eq(0)").css(_5.cssBefore);
if(_5.cssFirst){
$($slides[0]).css(_5.cssFirst);
}
if(_5.timeout){
if(_5.speed.constructor==String){
_5.speed={slow:600,fast:200}[_5.speed]||400;
}
if(!_5.sync){
_5.speed=_5.speed/2;
}
while((_5.timeout-_5.speed)<250){
_5.timeout+=_5.speed;
}
}
if(_5.easing){
_5.easeIn=_5.easeOut=_5.easing;
}
if(!_5.speedIn){
_5.speedIn=_5.speed;
}
if(!_5.speedOut){
_5.speedOut=_5.speed;
}
_5.nextSlide=_5.random?(Math.floor(Math.random()*(els.length-1)))+1:1;
_5.currSlide=0;
var e0=$slides[0];
if(_5.before.length){
_5.before[0].apply(e0,[e0,e0,_5,true]);
}
if(_5.after.length>1){
_5.after[1].apply(e0,[e0,e0,_5,true]);
}
if(_5.click&&!_5.next){
_5.next=_5.click;
}
if(_5.next){
$(_5.next).bind("click",function(){
return advance(els,_5,_5.rev?-1:1);
});
}
if(_5.prev){
$(_5.prev).bind("click",function(){
return advance(els,_5,_5.rev?1:-1);
});
}
if(_5.pager){
buildPager(els,_5);
}
if(_5.timeout){
this.cycleTimeout=setTimeout(function(){
go(els,_5,0,!_5.rev);
},_5.timeout+(_5.delay||0));
}
});
};
function go(_d,_e,_f,fwd){
if(_e.busy){
return;
}
var p=_d[0].parentNode,curr=_d[_e.currSlide],next=_d[_e.nextSlide];
if(p.cycleTimeout===0&&!_f){
return;
}
if(!_f&&!p.cyclePause&&_e.autostop&&(--_e.countdown<=0)){
return;
}
if(_e.before.length){
$.each(_e.before,function(i,o){
o.apply(next,[curr,next,_e,fwd]);
});
}
var _14=function(){
$.each(_e.after,function(i,o){
o.apply(next,[curr,next,_e,fwd]);
});
};
if(_f||!p.cyclePause){
if(_e.nextSlide!=_e.currSlide){
_e.busy=1;
if(_e.fxFn){
_e.fxFn(curr,next,_e,_14);
}else{
if($.isFunction($.fn.cycle[_e.fx])){
$.fn.cycle[_e.fx](curr,next,_e,_14);
}else{
$.fn.cycle.custom(curr,next,_e,_14);
}
}
}
if(_e.random){
_e.currSlide=_e.nextSlide;
while(_e.nextSlide==_e.currSlide){
_e.nextSlide=Math.floor(Math.random()*_d.length);
}
}else{
var _17=(_e.nextSlide+1)==_d.length;
_e.nextSlide=_17?0:_e.nextSlide+1;
_e.currSlide=_17?_d.length-1:_e.nextSlide-1;
}
if(_e.pager){
$(_e.pager).find("a").removeClass("activeSlide").filter("a:eq("+_e.currSlide+")").addClass("activeSlide");
}
}
if(_e.timeout){
p.cycleTimeout=setTimeout(function(){
go(_d,_e,0,!_e.rev);
},_e.timeout);
}
}
function advance(els,_19,val){
var p=els[0].parentNode,timeout=p.cycleTimeout;
if(timeout){
clearTimeout(timeout);
p.cycleTimeout=0;
}
_19.nextSlide=_19.currSlide+val;
if(_19.nextSlide<0){
_19.nextSlide=els.length-1;
}else{
if(_19.nextSlide>=els.length){
_19.nextSlide=0;
}
}
go(els,_19,1,val>=0);
return false;
}
function buildPager(els,_1d){
var $p=$(_1d.pager);
$.each(els,function(i,o){
var $a=$("<a href=\"#\">"+(i+1)+"</a>").appendTo($p).bind("click",function(){
_1d.nextSlide=i;
var p=els[0].parentNode,timeout=p.cycleTimeout;
if(timeout){
clearTimeout(timeout);
p.cycleTimeout=0;
}
go(els,_1d,1,!_1d.rev);
if(!p.cyclePause){
$("#pause").click();
}
return false;
});
if(i==0){
$a.addClass("activeSlide");
}
});
}
$.fn.cycle.custom=function(_23,_24,_25,cb){
var $l=$(_23),$n=$(_24);
$n.css(_25.cssBefore);
var fn=function(){
$n.animate(_25.animIn,_25.speedIn,_25.easeIn,cb);
};
$l.animate(_25.animOut,_25.speedOut,_25.easeOut,function(){
if(_25.cssAfter){
$l.css(_25.cssAfter);
}
if(!_25.sync){
fn();
}
});
if(_25.sync){
fn();
}
};
$.fn.cycle.transitions={fade:function(_29,_2a,_2b){
_2a.not(":eq(0)").css("opacity",0);
_2b.before.push(function(){
$(this).show();
});
_2b.animIn={opacity:1};
_2b.animOut={opacity:0};
_2b.cssAfter={display:"none"};
}};
$.fn.cycle.ver=function(){
return _2;
};
$.fn.cycle.defaults={fx:"fade",timeout:4000,speed:1000,speedIn:null,speedOut:null,click:null,next:null,prev:null,pager:null,before:null,after:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",sync:1,random:0,fit:0,pause:0,autostop:0,delay:0};
})(jQuery);
jQuery.fn.cycle.transitions.scrollUp=function(_2c,_2d,_2e){
_2c.css("overflow","hidden");
_2e.before.push(function(_2f,_30,_31){
$(this).show();
_31.cssBefore.top=_30.offsetHeight;
_31.animOut.top=0-_2f.offsetHeight;
});
_2e.cssFirst={top:0};
_2e.animIn={top:0};
_2e.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.scrollDown=function(_32,_33,_34){
_32.css("overflow","hidden");
_34.before.push(function(_35,_36,_37){
$(this).show();
_37.cssBefore.top=0-_36.offsetHeight;
_37.animOut.top=_35.offsetHeight;
});
_34.cssFirst={top:0};
_34.animIn={top:0};
_34.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.scrollLeft=function(_38,_39,_3a){
_38.css("overflow","hidden");
_3a.before.push(function(_3b,_3c,_3d){
$(this).show();
_3d.cssBefore.left=_3c.offsetWidth;
_3d.animOut.left=0-_3b.offsetWidth;
});
_3a.cssFirst={left:0};
_3a.animIn={left:0};
};
jQuery.fn.cycle.transitions.scrollRight=function(_3e,_3f,_40){
_3e.css("overflow","hidden");
_40.before.push(function(_41,_42,_43){
$(this).show();
_43.cssBefore.left=0-_42.offsetWidth;
_43.animOut.left=_41.offsetWidth;
});
_40.cssFirst={left:0};
_40.animIn={left:0};
};
jQuery.fn.cycle.transitions.scrollHorz=function(_44,_45,_46){
_44.css("overflow","hidden").width();
_46.before.push(function(_47,_48,_49,fwd){
$(this).show();
var _4b=_47.offsetWidth,nextW=_48.offsetWidth;
_49.cssBefore=fwd?{left:nextW}:{left:-nextW};
_49.animIn.left=0;
_49.animOut.left=fwd?-_4b:_4b;
_45.not(_47).css(_49.cssBefore);
});
_46.cssFirst={left:0};
_46.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.scrollHorzReversed=function(_4c,_4d,_4e){
_4c.css("overflow","hidden").width();
_4e.before.push(function(_4f,_50,_51,fwd){
$(this).show();
var _53=_4f.offsetWidth,nextW=_50.offsetWidth;
_51.cssBefore=fwd?{left:-nextW}:{left:nextW};
_51.animIn.left=0;
_51.animOut.left=fwd?_53:-_53;
_4d.not(_4f).css(_51.cssBefore);
});
_4e.cssFirst={left:0};
_4e.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.scrollVert=function(_54,_55,_56){
_54.css("overflow","hidden");
_56.before.push(function(_57,_58,_59,fwd){
$(this).show();
var _5b=_57.offsetHeight,nextH=_58.offsetHeight;
_59.cssBefore=fwd?{top:-nextH}:{top:nextH};
_59.animIn.top=0;
_59.animOut.top=fwd?_5b:-_5b;
_55.not(_57).css(_59.cssBefore);
});
_56.cssFirst={top:0};
_56.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.slideX=function(_5c,_5d,_5e){
_5e.animIn={width:"show"};
_5e.animOut={width:"hide"};
};
jQuery.fn.cycle.transitions.slideY=function(_5f,_60,_61){
_61.animIn={height:"show"};
_61.animOut={height:"hide"};
};
jQuery.fn.cycle.transitions.shuffle=function(_62,_63,_64){
var w=_62.css("overflow","visible").width();
_63.css({left:0,top:0});
_64.before.push(function(){
$(this).show();
});
_64.speed=_64.speed/2;
_64.random=0;
_64.shuffle=_64.shuffle||{left:-w,top:15};
_64.els=[];
for(var i=0;i<_63.length;i++){
_64.els.push(_63[i]);
}
_64.fxFn=function(_67,_68,_69,cb){
var $el=jQuery(_67);
$el.animate(_69.shuffle,_69.speedIn,_69.easeIn,function(){
_69.els.push(_69.els.shift());
for(var i=0,len=_69.els.length;i<len;i++){
jQuery(_69.els[i]).css("z-index",len-i);
}
$el.animate({left:0,top:0},_69.speedOut,_69.easeOut,function(){
$(this).hide();
if(cb){
cb();
}
});
});
};
};
jQuery.fn.cycle.transitions.turnUp=function(_6d,_6e,_6f){
_6f.before.push(function(_70,_71,_72){
$(this).show();
_72.cssBefore.top=_71.cycleH;
_72.animIn.height=_71.cycleH;
});
_6f.cssFirst={top:0};
_6f.cssBefore={height:0};
_6f.animIn={top:0};
_6f.animOut={height:0};
_6f.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.turnDown=function(_73,_74,_75){
_75.before.push(function(_76,_77,_78){
$(this).show();
_78.animIn.height=_77.cycleH;
_78.animOut.top=_76.cycleH;
});
_75.cssFirst={top:0};
_75.cssBefore={top:0,height:0};
_75.animOut={height:0};
_75.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.turnLeft=function(_79,_7a,_7b){
_7b.before.push(function(_7c,_7d,_7e){
$(this).show();
_7e.cssBefore.left=_7d.cycleW;
_7e.animIn.width=_7d.cycleW;
});
_7b.cssBefore={width:0};
_7b.animIn={left:0};
_7b.animOut={width:0};
_7b.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.turnRight=function(_7f,_80,_81){
_81.before.push(function(_82,_83,_84){
$(this).show();
_84.animIn.width=_83.cycleW;
_84.animOut.left=_82.cycleW;
});
_81.cssBefore={left:0,width:0};
_81.animIn={left:0};
_81.animOut={width:0};
_81.cssAfter={display:"none"};
};
jQuery.fn.cycle.transitions.zoom=function(_85,_86,_87){
_87.cssFirst={top:0,left:0};
_87.cssAfter={display:"none"};
_87.before.push(function(_88,_89,_8a){
$(this).show();
_8a.cssBefore={width:0,height:0,top:_89.cycleH/2,left:_89.cycleW/2};
_8a.animIn={top:0,left:0,width:_89.cycleW,height:_89.cycleH};
_8a.animOut={width:0,height:0,top:_88.cycleH/2,left:_88.cycleW/2};
});
};

