  $(function() {
    $('.error').hide();
    $(".submit").click(function() {
      // validate and process form here
      
      $('.error').hide();
  	  var name = $("input#name").val();
  		if (name == "") {
        $("#name_error").show();
        $("input#name").focus();
        return false;
      }
  		var email = $("input#email").val();
  		if ((email == "")||(email.indexOf('@') < 0) || ((email.charAt(email.length-4) != '.') && (email.charAt(email.length-3) != '.'))) {
        $("#email_error").show();
        $("input#email").focus();
        return false;
      }
  var title = $("input#title").val(); 	
  var company = $("input#company").val();    
  var location = $("input#location").val();
  var phone = $("input#phone").val(); 
  var business = $("input#business").val();
  var subject = $("input#subject").val();
  var message = $("textarea#message").val();
  
  var dataString = 'name='+ name + '&email=' + email + '&company=' + company + '&title=' + title + '&subject=' + subject + '&phone=' + phone + '&business=' + business + '&subject=' + subject + '&message=' + message;
  //alert (dataString);return false;
  $.ajax({
    type: "POST",
    url: "process.php",
    data: dataString,
    success: function() {
      $('.memberForm').html("<div id='success'></div>");
      $('#success').html("<h4>Membership Form Submitted!</h4><p>We will be in touch soon.</p><p>Please enjoy the rest of the Website!</p>")
      .hide()
      .fadeIn(1500);
    }
  });
  return false;
	  
    });
  });