/**
 * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget.
 * @requires jQuery v1.2 or above
 *
 * http://gmarwaha.com/jquery/jcarousellite/
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * CUSTOM VERSION - JEA 20100323
 */
(function(d){d.fn.jCarouselLite=function(e){e=d.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},e||{});return this.each(function(){var k=false,n=e.vertical?"top":"left",l=e.vertical?"height":"width";var u=d(this),r=d("ul",u).eq(0),s=d("li:not(li li)",r),q=s.size(),t=e.visible;var g=d("li:not(li li)",r),j=g.size(),p=e.start;u.css("visibility","visible");g.css({overflow:"hidden","float":(e.vertical?"none":"left")});r.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});u.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var o=e.vertical?a(g):b(g);var f=o*j;var h=o*t;g.css({width:g.width(),height:g.height()});r.css(l,f+"px").css(n,-(p*o));u.css(l,h+"px");if(e.btnPrev){d(e.btnPrev).click(function(){return i(p-e.scroll)})}if(e.btnNext){d(e.btnNext).click(function(){return i(p+e.scroll)})}if(e.btnGo){d.each(e.btnGo,function(v,w){d(w).click(function(){return i(e.circular?e.visible+v:v)})})}if(e.mouseWheel&&u.mousewheel){u.mousewheel(function(w,v){return v>0?i(p-e.scroll):i(p+e.scroll)})}if(e.auto){setInterval(function(){i(p+e.scroll)},e.auto+e.speed)}this.doMoveNext=function(){return i(p+e.scroll)};function m(){return g.slice(p).slice(0,t)}function i(v){if(!k){if(e.beforeStart){e.beforeStart.call(this,m())}k=true;r.animate(n=="left"?{left:-(o)+"px"}:{top:-(o)+"px"},e.speed,e.easing,function(){if(e.afterEnd){e.afterEnd.call(this,m())}k=false;if(e.circular){d(g[0]).appendTo(r);g=d("li:not(li li)",r);r.css("left",0)}});if(!e.circular){d(e.btnPrev+","+e.btnNext).removeClass("disabled");d((p-e.scroll<0&&e.btnPrev)||(p+e.scroll>j-t&&e.btnNext)||[]).addClass("disabled")}}return false}})};function c(e,f){return parseInt(d.css(e[0],f))||0}function b(e){return e[0].offsetWidth+c(e,"marginLeft")+c(e,"marginRight")}function a(e){return e[0].offsetHeight+c(e,"marginTop")+c(e,"marginBottom")}})(jQuery);