jQuery(function ($) {
	$(document).ready(function(){
		// Set which divs should display like flash alert/error.
		if($('div.flasherror')) flashAlert($('div.flasherror'), 3800);
		if($('div.points-alert')) flashAlert($('div.points-alert'), 8000);
		
		// Function to display flash alerts/errors.
		function flashAlert(node, time)
		{
			var h = $(node).height();
			
			$(node).pause(time)
				   .animate({opacity:0, height:0}, function(){ $(this).hide(); });
		}
	});// End Document Ready
});// End jQuery Scope