(function($) {
	$.fn.featureList = function(options) {
		var tabs	= $(this);
		var output	= $(options.output);

		new jQuery.featureList(tabs, output, options);

		return this;	
	};

	$.featureList = function(tabs, output, options) {
		function slide(nr) {
			if (typeof nr == "undefined") {
				nr = visible_item + 1;
				nr = nr >= total_items ? 0 : nr;
			}
			
			tabs.removeClass('current').filter(":eq(" + nr + ")").addClass('current').blur();
			
			
			/* output.stop(true, true).children().hide("blind", 300); */
			output.filter(":visible").fadeOut(function() {
														   
					
					/* output.filter(":visible").children().stop(true, true).show("blind", 300); */
				
				});
			output.filter(":eq(" + nr + ")").fadeIn(function() {						
						visible_item = nr;
						
					});
			/*
			output.filter(":visible").fadeOut()
														   
			output.filter(":eq(" + nr + ")").fadeIn(function() {						
				visible_item = nr;		
			});
			*/
			
		}

		var options			= options || {}; 
		var total_items		= tabs.length;
		var visible_item	= options.start_item || 0;

		output.hide().eq( visible_item ).show();
		tabs.eq( visible_item ).addClass('current');

		tabs.click(function() {
			if ($(this).hasClass('current')) {
				$(this).blur();
				return false;	
			}
			slide( tabs.index(this) );
		});
	};
})(jQuery);
