jQuery.fn.liFade = function(settings) {
	settings = jQuery.extend({
		showTime: 5000
	}, settings);		
	return this.each(function(){
		var $strip = jQuery(this);
		$strip.addClass("newsticker")
		var stripWidth = 0;
		var $mask = $strip.wrap("<div class='mask'></div>");
		var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>").parent();

		var tickerControls = $("<div class='ticker-controls'></div>");
		var tickerPrev = $("<div class='ticker-prev'>prev</div>");
		var tickerNext = $("<div class='ticker-next'>next</div>");
		tickerControls.append(tickerPrev, tickerNext);
		$tickercontainer.append(tickerControls);
		
		var $li = $strip.find("li")
		$li.hide();

		var currentIndex = 0;
		$li.eq(currentIndex).fadeIn();
		function showNext() {
			$li.eq(currentIndex).fadeOut(function() {
				currentIndex = (currentIndex + 1) % $li.length;
				$li.eq(currentIndex).fadeIn();
			});
		}
		var timer = setInterval(showNext, settings.showTime);

		$strip.hover(function(){
			clearInterval(timer);
		}, function() {
			timer = setInterval(showNext, settings.showTime);
		});
		
		tickerPrev.click(function() {
			clearInterval(timer);
			$li.eq(currentIndex).stop(false, true).hide();
			currentIndex = (currentIndex + $li.length - 1) % $li.length;
			$li.eq(currentIndex).fadeIn();
			timer = setInterval(showNext, settings.showTime);
		})

		tickerNext.click(function() {
			clearInterval(timer);
			$li.eq(currentIndex).stop(false, true).hide();
			currentIndex = (currentIndex + 1) % $li.length;
			$li.eq(currentIndex).fadeIn();
			timer = setInterval(showNext, settings.showTime);
		})
	});	
};