/*
 * jQuery Cycle Lite Plugin
 * http://malsup.com/jquery/cycle/lite/
 * Copyright (c) 2008 M. Alsup
 * Version: 1.0 (06/08/2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.3 or later
 */
(function(a){function c(b,d,e,f){if(d.busy)return;var g=b[0].parentNode,h=b[d.currSlide],i=b[d.nextSlide];if(g.cycleTimeout===0&&!e)return;if(e||!g.cyclePause){d.before.length&&a.each(d.before,function(a,b){b.apply(i,[h,i,d,f])});var j=function(){a.browser.msie&&this.style.removeAttribute("filter"),a.each(d.after,function(a,b){b.apply(i,[h,i,d,f])})};d.nextSlide!=d.currSlide&&(d.busy=1,a.fn.cycle.custom(h,i,d,j));var k=d.nextSlide+1==b.length;d.nextSlide=k?0:d.nextSlide+1,d.currSlide=k?b.length-1:d.nextSlide-1}d.timeout&&(g.cycleTimeout=setTimeout(function(){c(b,d,0,!d.rev)},d.timeout))}function d(a,b,d){var e=a[0].parentNode,f=e.cycleTimeout;return f&&(clearTimeout(f),e.cycleTimeout=0),b.nextSlide=b.currSlide+d,b.nextSlide<0?b.nextSlide=a.length-1:b.nextSlide>=a.length&&(b.nextSlide=0),c(a,b,1,d>=0),!1}var b="Lite-1.0";a.fn.cycle=function(b){return this.each(function(){b=b||{},this.cycleTimeout&&clearTimeout(this.cycleTimeout),this.cycleTimeout=0,this.cyclePause=0;var e=a(this),f=b.slideExpr?a(b.slideExpr,this):e.children(),g=f.get();if(g.length<2){window.console&&window.console.log&&window.console.log("terminating; too few slides: "+g.length);return}var h=a.extend({},a.fn.cycle.defaults,b||{},a.metadata?e.metadata():a.meta?e.data():{});h.before=h.before?[h.before]:[],h.after=h.after?[h.after]:[],h.after.unshift(function(){h.busy=0});var i=this.className;h.width=parseInt((i.match(/w:(\d+)/)||[])[1])||h.width,h.height=parseInt((i.match(/h:(\d+)/)||[])[1])||h.height,h.timeout=parseInt((i.match(/t:(\d+)/)||[])[1])||h.timeout,e.css("position")=="static"&&e.css("position","relative"),h.width&&e.width(h.width),h.height&&h.height!="auto"&&e.height(h.height);var j=0;f.css({position:"absolute",top:0,left:0}).hide().each(function(b){a(this).css("z-index",g.length-b)}),a(g[j]).css("opacity",1).show(),a.browser.msie&&g[j].style.removeAttribute("filter"),h.fit&&h.width&&f.width(h.width),h.fit&&h.height&&h.height!="auto"&&f.height(h.height),h.pause&&e.hover(function(){this.cyclePause=1},function(){this.cyclePause=0}),a.fn.cycle.transitions.fade(e,f,h),f.each(function(){var b=a(this);this.cycleH=h.fit&&h.height?h.height:b.height(),this.cycleW=h.fit&&h.width?h.width:b.width()}),f.not(":eq("+j+")").css({opacity:0}),h.cssFirst&&a(f[j]).css(h.cssFirst);if(h.timeout){h.speed.constructor==String&&(h.speed={slow:600,fast:200}[h.speed]||400),h.sync||(h.speed=h.speed/2);while(h.timeout-h.speed<250)h.timeout+=h.speed}h.speedIn=h.speed,h.speedOut=h.speed,h.slideCount=g.length,h.currSlide=j,h.nextSlide=1;var k=f[j];h.before.length&&h.before[0].apply(k,[k,k,h,!0]),h.after.length>1&&h.after[1].apply(k,[k,k,h,!0]),h.click&&!h.next&&(h.next=h.click),h.next&&a(h.next).bind("click",function(){return d(g,h,h.rev?-1:1)}),h.prev&&a(h.prev).bind("click",function(){return d(g,h,h.rev?1:-1)}),h.timeout&&(this.cycleTimeout=setTimeout(function(){c(g,h,0,!h.rev)},h.timeout+(h.delay||0)))})},a.fn.cycle.custom=function(b,c,d,e){var f=a(b),g=a(c);g.css({opacity:0});var h=function(){g.animate({opacity:1},d.speedIn,d.easeIn,e)};f.animate({opacity:0},d.speedOut,d.easeOut,function(){f.css({display:"none"}),d.sync||h()}),d.sync&&h()},a.fn.cycle.transitions={fade:function(b,c,d){c.not(":eq(0)").css("opacity",0),d.before.push(function(){a(this).show()})}},a.fn.cycle.ver=function(){return b},a.fn.cycle.defaults={timeout:4e3,speed:1e3,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery)
