$(document).ready(function()
{
	if($(".message").length > 0){
		$(".message").hide();
		len	= $(".message").length;
		doIt(0,len);
	}
});

function doIt(i,len)
{
	var t = 500;
	$(".message").eq(i).slideDown(t,function(){
		$(this).animate({opacity: 1.0},3000).slideUp(t,function(){
			if(i <= len){
				i++;
				$(this).animate({opacity: 0},300,function(){
						doIt(i,len);
				});
			}
		});
	});
}
