/*
Site-wide JS
*/

var flash_duration = 6000;

$(function(){
	setTimeout('hideMessages()', flash_duration);
	$(".more_content_block").filter(":nth-child(4n-3)").each(function(){
		$(this).css("borderRight", "1px #510110 solid");
	}).end().filter(":nth-child(4n-1)").each(function(){
		$(this).css("borderRight", "1px #43040d solid");
	});
});

function hideMessages() {
	$("div.message").filter(function(){
		return $(this).css("display") != "none"; // don't do the fade action if it's already hidden!
	})
	.animate({
		top: '-=200px'
	}, 'normal', 'swing', function(){
		$(this).remove();
	});
}
