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