$.fn.pause=function(milli,cb,type) {
	milli=milli||1000;
	type=type||"fx";
	return this.queue(type,function(){
		var self=this;
		setTimeout(function(){
			$.dequeue(self);
			cb();
		},milli);
	});
};

function doit(f,e ) {
	if(!e||e.length==0) {
		e=f.children('li:first-child');
	}
	e.fadeIn(1000).pause(6000,function(){e.fadeOut(1000 );doit(f,e.next('li'));});
}

$(document).ready( 
		function(){ 
			$('.shuffle').each(
				function(){ 
					$(this).children().each(function(){$(this).hide();});
					doit($(this));
				}
			);
		}
);

(function($){
	$.dequeue=function(a,b){
		return $(a).dequeue(b);
	};
})(jQuery);
