(
function($){$.fn.simpleSlider=function(options){var defaults={speed:1000,pause:2000,transition:'slide'},options=$.extend(defaults,options);return this.each(function(){var $this=$(this);var containerWidth=$this.width();var marginProps={marginRight:$this.css('marginRight'),marginLeft:$this.css('marginLeft'),marginTop:$this.css('marginTop'),marginBottom:$this.css('marginBottom')};$this.wrap('<div class="slider-wrap"></div>');if(options.pause<=options.speed)options.pause=options.speed+100;$this.css({'position':'relative','padding':0,'margin':0});if(options.transition==='slide'){$this.children().css({'position':'absolute','top':0,'left':$this.width()+10,'list-style':'none'});$this.children(':first').css({'left':0});$('.slider-wrap').css({'width':containerWidth,'height':$this.height(),'position':'relative','marginLeft':marginProps.marginLeft,'marginRight':marginProps.marginRight,'marginTop':marginProps.marginTop,'marginBottom':marginProps.marginBottom,'overflow':'hidden'});}if(options.transition==='fade'){var $zindex=$this.children.length+99;$this.children().css({'width':$this.children().width(),'position':'absolute','left':0});for(var i=$this.children().length,y=0;i>0;i--,y++){$this.children().eq(y).css('zIndex',i+99);}fade();}if(options.transition==='slide')slide();function fade(){setInterval(function(){$this.children(':first').animate({'opacity':0},options.speed,function(){$this.children(':first').css('opacity',1).css('zIndex',$this.children(':last').css('zIndex')-1).appendTo($this);})},options.pause);}function slide(){setInterval(function(){var firstChild=$this.children(':first');firstChild.animate({'left':-($this.width())},options.speed,"easeOutQuad",function(){$(this).css({'left':$this.width()+10}).appendTo($this);});firstChild.next().animate({'left':0},options.speed,"easeOutQuad");},options.pause);}});}})(jQuery);