jQuery.fn.banner = function(settings) {
	var config = { 'width':'200px', 'height':'100px', 'delay':2000 };
	if (settings) $.extend(config, settings);

	this
		.css('position','absolute')
		.css('display','block')
		.css('width',settings.width)
		.css('overflow','hidden')
		.css('height',settings.height)
		.css('margin','0px')
		.css('padding','0px')
		//.css('background','red')
		;
	var x = 0;
	this
		.find('LI').css('list-style-type','none').css('padding','0px').css('margin','0px').css('position','absolute')
			.fadeOut(0)
			.each(function() {
				$(this).css('left',x+'px');
				//x += $(this).width();
				})
		;

	this.bannernext(settings);

	return this;
};

jQuery.fn.bannernext = function(settings) {
	this.each(function() {
		var lis = $(this).find('li');
		var active=-1;
		for (var i=0;i<lis.length;i++) {
			if ($(lis[i]).css('display')!='none') {
				active = i;
				$(lis[i]).fadeOut();
				break;
			}
		}
		if (active>=0)
			$(lis[active]).fadeOut(750);
		active++;
		if (active>=lis.length) active=0;
		$(lis[active]).fadeIn(500);
		setTimeout('$("#'+this.id+'").bannernext('+$.toJSON(settings)+')',settings.delay);
		});
};
