jQuery.validator.addMethod("phone", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, ""); 
	return this.optional(element) || phone_number.length > 9 &&
		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");

function ddshow(){
	var choice = document.getElementById("cdepts").value;
	var obj = document.getElementById("panel");
	if (choice == "Project_Inquiry"){
		obj.style.display = "";
	} else {
		obj.style.display = "none";
	}
}

$(document).ready(function(){
	$("#commentForm").validate({
		rules: {
			project: {
				required: "#cdepts[value=Project_Inquiry]"
			},
			'checklist[]': {
				required: "#cdepts[value=Project_Inquiry]"
			}
		}
	});
});
