(function($) {
	$.fn.superCycle = function(options) {
	  var defaults = {
	    tag: 'p',
	    length:4000,
	    fade:500,
	    stay:2000,
	    type: 'default'
	  };
	  // Extend our default options with those provided.
	  var opts = $.extend(defaults, options);

	  // Get a list of supplied tags
	  return this.each(function(){

	  	var tags = $(opts.tag,this);
		var len  = tags.size();
		var current = 0;

		// Hide all tags
		tags.hide();

		function fade()
		{
			var ctag = tags.eq(current);
			
			ctag.fadeIn(opts.fade);
			ctag.animate({opacity: 1.0}, opts.stay);
 			ctag.fadeOut(opts.fade);

 			current++;

 			if(current == len)
 			{
 				current = 0;
 			}

 			var time = (parseFloat(opts.stay) + (parseFloat(opts.fade)*2));
 			setTimeout(fade,time);
			//if (opts.type=="default" || opts.type=='') { setTimeout(fade,opts.length); }; // normal 			
	//if (opts.type=="overlay" || opts.type=="overlap") { setTimeout(fade,opts.length/2); }; //overlap
		}

		fade();

	  });

	};
})(jQuery);