
  $(document).ready(function(){

	jQuery.each(jQuery.validator.messages, function(i) {
 		 jQuery.validator.messages[i] = "Required";
		});
	$("#exam_form").validate({
			  highlight: function(element, errorClass) {
				 $(element).addClass(errorClass);
				 $(element.form).find("label[for=" + element.id + "]")
								.addClass(errorClass);
			
			  },
			  unhighlight: function(element, errorClass) {
				 $(element).removeClass(errorClass);
				 $(element.form).find("label[for=" + element.id + "]")
								.removeClass(errorClass);
			  },

			errorElement: "div",
			errorPlacement: function(error, element) {
     			error.appendTo( element.parent().parent(".row_field"));
   			},

			  groups: {
				home_location: "home_city home_state home_zip",
    			company_location: "company_city company_state company_zip",
				highschool: "high_school hs_degree",
				highschool_location: "hs_city hs_state",
				supervisor_contact: "supervisor supervisor_phone",
				employment: "employment_from_months employment_from_years employment_to_months employment_to_years"
  			}

		
		
		
		
		});

		$("#accept_yes").click(function(){
				$("#submit").removeAttr("disabled");						
		});
		
		$("#accept_no").click(function(){
			$("#submit").attr("disabled","disabled");
		});
});