
// Jan 2009 - Scott Lapin
//
// In order to get the phpList / "news&offers" / add my email    to work
// The the postEmail function is required.
// Since the footer is on som many pages....instead of adding this function to each .js file for each page
// we can just create a file named footerMenu.js and have it included when ever the footerMenu is loaded.

//This code is needed for the phplist - "adding an email address"
function postEmail() //data, value, changing) 
{

		$j('#errormsg').hide();			//reset any messages
		
		if((!$j('#email').val()) || ($j('#email').val()=='enter your email'))						// email is empty 
		{
			$j('#errormsg').show();//.animate({opacity:1},1500).fadeOut(500);
			return false;
		}
		else 						//email is not empty - success
		{
		 	$j('#updatemsg').show().animate({opacity: 1}, 1500).fadeOut(500);

			$j.post("hello",
	        {
	        	email:$j("#email").val() },function(response) {
				$j('#signup_response').html(response);
	        });
	       
		}
  
}


