
$(function() {
	
	$('#contact-form').validate({
		submitHandler: function(form) {
			var dataString = $(form).formSerialize();
			//alert(dataString);

			$(form).ajaxSubmit({success: mailcomplete});
		}
	});
	
});

function mailcomplete(){
	//alert('DONE!');
	$('#contact-form-wrapper').html("<div id='sent-message'></div>")
					$('#sent-message').html('<h4>Contact Form Submitted!</h4>')
					.append("<p>We will be in touch soon.</p>")
					.hide()
					.fadeIn(1500, function() {
						$('#sent-message h4').after("<img id='checkmark' src='img/layout/check.png' />")
					})
}
