(function($)
{
	$.fn.jwSlider = function(b)
	{
		var c = {speed:1000, pause:2000}, b = $.extend(c,b);
		if (b.pause <= b.speed) b.pause = b.speed + 100;
		
		return this.each(function()
		{
			var a = $(this);
			a.wrap('<div class="slider-wrap" />');
			a.css({'width':'99999px','position':'relative','padding':0});

			a.children().css({'float':'left','list-style':'none'});
			$('.slider-wrap').css({'width':a.children().width(),'overflow':'hidden'});
			
			slide();
			
			function slide()
			{
				setInterval(function()
				{
					a.animate({'left':'-'+a.parent().width()},b.speed,function()
					{
						a.css('left',0).children(':first').appendTo(a);
					})
				}, b.pause);
			}
	
		}
	)}
})(jQuery);
