$(document).ready(function() {
	/* homepage slider parameters */						   
	$('#header').cycle({ 
	fx:     'fade', 
	speed:  2000, 
	timeout: 5000 
	});	
    
    $('#newsletter').hide();
    
    $('#newsletter_link').click(function(){
        
            $('#newsletter').toggle();
            return false;
    });
    
});

function validate_newsletter_form(form) {
  //alert(form);
 
  var email = document.getElementById('nemail').value;
  
  var emailRegex = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;

  if(email == "") {
    inlineMsg('email','<strong>Error</strong><br />You must enter your email.',2);
    return false;
  }
  if(!email.match(emailRegex)) {
    inlineMsg('email','<strong>Error</strong><br />You have entered an invalid email.',2);
    return false;
  }

  

   return true;
}