/* Author: Interact Creative

*/

$('input, textarea').focus(function() {
  if (this.value == this.defaultValue){
    this.value = '';
  }

  if(this.value != this.defaultValue){
    this.select();
  }
});

$('input, textarea').blur(function() {
  if ($.trim(this.value) == ''){
    this.value = (this.defaultValue ? this.defaultValue : '');
  }
});

$('#mailinglistform').submit(function(ev){
  var form = document.mailinglistform;
  var message = "";
  var email = form.mailinglist.value;

  var valid = true;

  if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)))
  {
    valid = false;
    message = message + "Please make sure you have entered a valid e-mail address.\n";
  }

  if (!valid){
    alert(message);
    ev.preventDefault();
  }
});




















