(function($){
	 $.fn.octoCarousel = function(options) {
	
	  var defaults = {
	   delay: 2000
	  };
	  var options = $.extend(defaults, options);
	  
	  return this.each(function() {
		  	var obj = $(this);
		  	var interval = 0;
		  	var objectFunction = function(i){
			  	var currentDiv = $("div:visible", obj)
			  	
			  	if (currentDiv.fadeOut('slow').next().length)
			  		currentDiv.next().fadeIn('slow');
			  	else
			  		$("div:first", obj).fadeIn('slow');
			}
		  	
		  	
			$("div", obj).hide();

			$("div:first", obj).show();

			$(obj).bind('mouseenter', function(){
				clearInterval(interval);
			}).bind('mouseleave', function(){
				interval = setInterval(objectFunction, options['delay']);
			});

			interval = setInterval(objectFunction, options['delay']);
	
	  });
	 };
})(jQuery);
