// Error box functionality with javascript

// error_message()
// Error message setup
function error_message(){
	// Check to see if an error has been caught and the div has been created
	var error = $("#error");
	
	if(error.length > 0) {
	
		// Bring the error in
		error.animate({"top": "0"}, "100");
		
		// Set it so that once the user clicks the error, it disappears
		error.click(function(){$(this).animate({"top": "-=100"},"300","swing",function(){$(this).hide();});});
		//error.click(function(){$(this).animate({"top": "-=100"},"300");});
		
	}
}