/*
How to use

$(class).wizgallery();
*/

(function($) {
	var show_index		= 0;
	var select_index	= 0;
	$.fn.wizgallery = function(options) {
		var defaults = {  
			autoSlideInterval: 5000
		};
		
		var options = $.extend(defaults, options); 
		var el = this; 
		el.addClass('wizgallery');
		select_index = show_index % this.size();
	
		this.each(function(index){
			if(index == select_index) $(this).show();
			else $(this).hide();
		});
		show_index++;
		return setTimeout( function() { el.wizgallery(options); }, options.autoSlideInterval);
		
	};
})(jQuery);
