  $(function() {
    $('.error').hide();
    $(".button").click(function() {
      // validate and process form here
      $('.error').hide();
  	  var first_name = $("input#firstname").val();
  		if (first_name == "") {
        $("label#firstname_error").show();
        $("input#firstname").focus();
        return false;
      }
	  var last_name = $("input#lastname").val();
  		if (last_name == "") {
        $("label#lastname_error").show();
        $("input#lastname").focus();
        return false;
      }
  	  var email = $("input#email").val();
  		if (email == "") {
        $("label#email_error").show();
        $("input#email").focus();
        return false;
      }
	  var attach1 = $("input#attach1").val();
  		if (attach1 == "") {
        $("label#attach1_error").show();
        $("input#attach1").focus();
        return false;
	  }
	  var dataString = 'firstname=' + first_name + '&lastname=' + last_name + '&email=' + email + '&attach1=' + attach1;
	  
	  $.ajax({
		type: "POST",
		url: "bin/process.asp",
		data: dataString,
		success: function() {
			$('#block3').html("<div id='message'></div>"); 
			$('#message').html("<p>Thanks for submitting your resume!</p>")
			.hide()
			.fadeIn(1500, function() {
			  $('#message').append("<img id='checkmark' src='images/check.png' />");
			});
		}
	  });
	  return false;
	  
    });
  });
	
  
  
  
