(function($) {
	$.fn.quotes = function(options){
		var defaults = {
			speed: 8000 // Default rotation speed
		}, 
		settings = $.extend({}, defaults, options);
		
		return this.each(function(){
			var $this = $(this),
				speed = settings.speed < 4000 ? 4000 : settings.speed; ; // Make sure speed is not set too low
			
			$this.find('blockquote').hide();
			$('blockquote:first', $this).addClass('active');
			$('blockquote.active').show();
			
			setInterval(function(){
				var active = $this.find('blockquote.active'),
					next = active.next().length ? active.next() : $this.find('blockquote:first'); 
				
                active.animate({
                    opacity: 0
                }, 1000, function() {                        
                    active.hide().css('opacity', 1);
                    next.fadeIn(1000);
                });
               
                active.removeClass('active');         
                next.addClass('active');

			}, speed);
		})
	}
})(jQuery);
