
/* File: jquery.cycle.lite-mod.min.js */
/*
 * 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
 *
 * Contains minor Aspen Digital changes
 */
(function(e){var a="Lite-1.1";e.shuffle=function(m){for(var k,h,l=m.length;l;k=parseInt(Math.random()*l),h=m[--l],m[l]=m[k],m[k]=h){}return m};e.fn.shuffle=function(){e.shuffle(this)};e.fn.cycle=function(h){return this.each(function(){if(h=="play"){return f(this)}else{if(h=="pause"){return g(this)}}h=h||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var l=e(this);var m=h.slideExpr?e(h.slideExpr,this):l.children();if(m.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+m.length)}return}var k=e.extend({},e.fn.cycle.defaults,h||{},e.metadata?l.metadata():e.meta?l.data():{});if(k.keep){k.sync=1}if(k.pauseEffect){k.pause=1}if(k.random){m.shuffle()}var j=m.get();k.before=k.before?[k.before]:[];k.after=k.after?[k.after]:[];k.after.unshift(function(){k.busy=0});var i=this.className;k.width=parseInt((i.match(/w:(\d+)/)||[])[1])||k.width;k.height=parseInt((i.match(/h:(\d+)/)||[])[1])||k.height;k.timeout=parseInt((i.match(/t:(\d+)/)||[])[1])||k.timeout;if(l.css("position")=="static"){l.css("position","relative")}if(k.width){l.width(k.width)}if(k.height&&k.height!="auto"){l.height(k.height)}var n=0;m.css({position:"absolute",top:0,left:0}).hide();if(k.hoverExpr){b(j,k)}e(j[n]).css("opacity",1).show();if(e.browser.msie){j[n].style.removeAttribute("filter")}if(k.fit&&k.width){m.width(k.width)}if(k.fit&&k.height&&k.height!="auto"){m.height(k.height)}if(k.pause){l.hover(function(){g(this,k.pauseEffect)},function(){f(this,k.pauseEffect)})}e.fn.cycle.transitions.fade(l,m,k);m.each(function(){var p=e(this);this.cycleH=(k.fit&&k.height)?k.height:p.height();this.cycleW=(k.fit&&k.width)?k.width:p.width()});m.not(":eq("+n+")").css({opacity:0});if(k.cssFirst){e(m[n]).css(k.cssFirst)}if(k.timeout){if(k.speed.constructor==String){k.speed={slow:600,fast:200}[k.speed]||400}if(!k.sync){k.speed=k.speed/2}while((k.timeout-k.speed)<250){k.timeout+=k.speed}}k.speedIn=k.speed;k.speedOut=k.speed;k.slideCount=j.length;k.currSlide=n;k.nextSlide=1;var o=m[n];if(k.before.length){k.before[0].apply(o,[o,o,k,true])}if(k.after.length>1){k.after[1].apply(o,[o,o,k,true])}if(k.click&&!k.next){k.next=k.click}if(k.next){e(k.next).bind("click",function(){return d(j,k,k.rev?-1:1)})}if(k.prev){e(k.prev).bind("click",function(){return d(j,k,k.rev?1:-1)})}if(k.timeout){this.cycleTimeout=setTimeout(function(){c(j,k,0,!k.rev)},k.timeout+(k.delay||0))}})};function g(i,h){if(h){e(i).css({opacity:0.8})}i.cyclePause=1}function f(i,h){if(h){e(i).css({opacity:1})}i.cyclePause=0}function b(i,j){var h={},k=i[0].parentNode;e.each(i,function(l){if(this.id){h[this.id]=l+1}});e(j.hoverExpr).each(function(){var l=h[this.rel];if(l){e(this).hover(function(){k.cyclePause=1;j.nextSlide=l-1;if(k.cycleTimeout){clearTimeout(k.cycleTimeout);k.cycleTimeout=0}j.speedIn=j.speedOut=0;c(i,j,1,!j.rev)},function(){k.cyclePause=0;if(k.cycleTimeout===0){k.cycleTimeout=setTimeout(function(){c(i,j,0,!j.rev)},j.timeout)}j.speedIn=j.speedOut=j.speed})}})}function c(n,h,l,o){if(h.busy){return}var k=n[0].parentNode,s=n[h.currSlide],q=n[h.nextSlide],r=e(s),m=e(q);if(k.cycleTimeout===0&&!l){return}if(l||!k.cyclePause){if(h.sync){r.css("z-index",1);m.css("z-index",2)}if(h.before.length){e.each(h.before,function(p,t){t.apply(q,[s,q,h,o])})}var i=function(){if(h.keep){r.css({display:"none",opacity:0,"z-index":0})}if(e.browser.msie){this.style.removeAttribute("filter")}e.each(h.after,function(p,t){t.apply(q,[s,q,h,o])})};if(h.nextSlide!=h.currSlide){h.busy=1;e.fn.cycle.custom(s,q,h,i)}var j=(h.nextSlide+1)==n.length;h.nextSlide=j?0:h.nextSlide+1;h.currSlide=j?n.length-1:h.nextSlide-1}if(h.timeout){k.cycleTimeout=setTimeout(function(){c(n,h,0,!h.rev)},h.timeout)}}function d(h,i,l){var k=h[0].parentNode,j=k.cycleTimeout;if(j){clearTimeout(j);k.cycleTimeout=0}i.nextSlide=i.currSlide+l;if(i.nextSlide<0){i.nextSlide=h.length-1}else{if(i.nextSlide>=h.length){i.nextSlide=0}}c(h,i,1,l>=0);return false}e.fn.cycle.custom=function(n,k,l,h){var m=e(n),j=e(k);j.css({opacity:0});var i=function(){j.animate({opacity:1},l.speedIn,l.easeIn,h)};if(l.sync){i()}if(!l.keep){m.animate({opacity:0},l.speedOut,l.easeOut,function(){m.css({display:"none"});if(!l.sync){i()}})}};e.fn.cycle.transitions={fade:function(i,j,h){j.not(":eq(0)").css("opacity",0);h.before.push(function(){e(this).show()})}};e.fn.cycle.ver=function(){return a};e.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",keep:0,sync:1,fit:0,pause:0,pauseEffect:0,random:0,delay:0,slideExpr:null,hoverExpr:null}})(jQuery);