(function($,W,D)
{
    var JQUERY4U = {};
 
    JQUERY4U.UTIL =
    {
        setupFormValidation: function()
        {
            //form validation rules
            $("#appoitment").validate({
                rules: {
                    fname: "required",
                   email: {
                        required: true,
                        email: true
                    },
                    
				   phone: "required",
				   date: "required",
				   time: "required",
				   agree: "required"
                },
                messages: {
                    fname: "Please enter your  name",
                   
                    phone: "Please enter your  phone",
					 date: "Please enter date",
					  time: "Please enter time",
                    email: "Please enter a valid email address",
                    agree: "Please accept our policy"
                },
                submitHandler: function(form) {
                    form.submit();
                }
            });
			
			
        }
    }
 
    //when the dom has loaded setup form validation rules
    $(D).ready(function($) {
        JQUERY4U.UTIL.setupFormValidation();
    });
 
})(jQuery, window, document);

