// JavaScript Document


$(document).ready(function() {		   
	$("#thecaptcha").hide();
	if($("#contact_form").length>0){
		var pageId = $("body").attr('id'); 
		$("#page").val(pageId);
					 
		 $("#contact_form p label").inFieldLabels();
	}
	
	if($("#contact_form").length > 0){
		
		$("#contact_form").validate({
			invalidHandler: function(e, validator) {
			var errors = validator.numberOfInvalids();
			if (errors) {
				var message = errors == 1
					? 'You missed 1 field. It has been highlighted above'
					: 'You missed ' + errors + ' fields.  They have been highlighted above';
				$("div.error span").html(message);
				$("div.error").show();
			} else {
				$("div.error").hide();
			}
		}
		});
	}
	
	

});


