//contact us form


$(function () {
    $('#myDksContactusForm').validate({
        rules: {
            txtname:{
                required: true
            },
			txtemail:{
                required: true
            },
			txtphone: {
                required: true
            },
			txtmessage: {
                required: true
            }
        

        },
        submitHandler: function (form) {			 
            $.ajax({
               type:'post',
               url:'ajax/general-enquiry.php',
               data:$(form).serialize(),
               beforeSend: function() { 
                    $("#myDksContactusForm").blur();
                    $("#Formsbtn").prop('disabled', true); // disable button
                },
               success:function(response){
				//   alert(response);
                  var data=JSON.parse(response);
                  if(data.status=="true"){
                      alert(data.msg);
                      window.location.reload();                       
                  }
                  else{
                      alert(data.msg);
                  }
               }
            });
            return false;
        }
    });
});