(function(A){A.fn.liteSlider=function(D){var I={content:".content",width:500,height:250,autoplay:false,delay:3,buttonsClass:"",activeClass:"",controlBt:"",playText:" Play",pauseText:"Pause"};var D=A.extend(I,D);var L=1;var J=0;var B=D.autoplay;var S=(A(this).attr("class")).split(" ");var R="."+S[0];var E=0;var M;var Q=1;var T=parseInt(D.delay)*1000;A(this).children(D.content).each(function(){M=++E});function P(U){U.wrap('<div class="sliderContentsWrap" />')}function F(U){A(".sliderContentsWrap").css({padding:0,margin:0,width:D.width,height:D.height,overflow:"hidden",position:"relative"});U.css({padding:0,margin:0,width:D.width*M,height:D.height,position:"absolute"});U.children(D.content).css({"float":"left",width:D.width,height:D.height})}function G(){i=0;A("."+D.buttonsClass).each(function(){i++;A(this).addClass("bt"+i);A(this).attr("rel",i)})}function H(U){var V=-(D.width)*(parseInt(U)-1);A(".sliderContentsWrap "+R).animate({left:V});A("."+D.buttonsClass).each(function(){A(this).removeClass(D.activeClass);if(A(this).hasClass("bt"+U)){A(this).addClass(D.activeClass)}});Q=U}function K(){if(Q<M){H(parseInt(Q)+1)}else{H(1)}}function N(){clearInterval(J);J=setInterval(function(){K()},T);A(D.controlBt).text(D.pauseText);B=true}function C(){clearInterval(J);A(D.controlBt).text(D.playText);B=false}function O(U){P(U);F(U);G();if(D.autoplay==true){N()}else{C()}}return this.each(function(){O(A(this));A("."+D.buttonsClass).click(function(U){U.preventDefault();C();H(A(this).attr("rel"))});A(D.controlBt).click(function(U){U.preventDefault();if(B==true){C()}else{N()}})})}})(jQuery);
