$().ready(function() {
	// validate the comment form when it is submitted

	$("#sendContact").validate({
			
			invalidHandler: function(e, validator) {
				var errors = validator.numberOfInvalids();
				if (errors) {
					var message = errors == 1
						? 'There was 1 problem submitting your request. Please make correction below.'
						: 'There were ' + errors + ' problems submitting your request. Please make corrections below.';
					$("div.error span").html(message);
					$("div.error").show();
					//$.scrollTo("#contact-form");
				} else {
					$("div.error").hide();
				
				}
			}
			
		});
});
