(function($){var n='2.10';var q=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);$.fn.cycle=function(m){return this.each(function(){m=m||{};if(m.constructor==String){switch(m){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:m={fx:m}}}var c=$(this);var d=m.slideExpr?$(m.slideExpr,this):c.children();var e=d.get();if(e.length<2)return;var f=$.extend({},$.fn.cycle.defaults,m||{},$.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});clearTypeFix(d);var g=this.className;var w=parseInt((g.match(/w:(\d+)/)||[])[1])||f.width;var h=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(w)c.width(w);if(h&&h!='auto')c.height(h);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 j=f.startingSlide||0;d.css('position','absolute').hide().each(function(i){var z=j?i>=j?e.length-(i-j):j-i:e.length-i;$(this).css('z-index',z)});$(e[j]).show();if(f.fit&&w)d.width(w);if(f.fit&&h&&h!='auto')d.height(h);if(f.pause)c.hover(function(){this.cyclePause=1},function(){this.cyclePause=0});var k=$.fn.cycle.transitions[f.fx];if($.isFunction(k))k(c,d,f);d.each(function(){var a=$(this);this.cycleH=(f.fit&&h)?h:a.height();this.cycleW=(f.fit&&w)?w:a.width()});f.cssBefore=f.cssBefore||{};f.animIn=f.animIn||{};f.animOut=f.animOut||{};d.not(':eq('+j+')').css(f.cssBefore);if(f.cssFirst)$(d[j]).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=j;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 l=d[j];if(f.before.length)f.before[0].apply(l,[l,l,f,true]);if(f.after.length>1)f.after[1].apply(l,[l,l,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);if(f.timeout)this.cycleTimeout=setTimeout(function(){go(e,f,0,!f.rev)},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)))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)$(b.pager).find('a').removeClass('activeSlide').filter('a:eq('+b.currSlide+')').addClass('activeSlide')}if(b.timeout)p.cycleTimeout=setTimeout(function(){go(a,b,0,!b.rev)},b.timeout)};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('click',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})});d.find('a').filter('a:eq('+c.startingSlide+')').addClass('activeSlide')};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.cssAfter={display:'none'}}};$.fn.cycle.ver=function(){return n};$.fn.cycle.defaults={fx:'fade',timeout:4000,speed:1000,speedIn:null,speedOut:null,click:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerAnchorBuilder: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',startingSlide:0,sync:1,random:0,fit:0,pause:0,autostop:0,delay:0,slideExpr:null,cleartype:0,nowrap:0}})(jQuery);