
/*$(document).ready(function(e)
 {
	 $(window).on('resize', function() {
  //$.modal.resize();
  $("#flywithus").resize();
    $("#contactForm").resize();
  
  });
  
 });
*/

//-------------------------------------------home page form

$(document).ready(function(e)
 {
 //setTimeout(popup, 2000); // Setting time 3s to popup login form
function popup() {

//$("#contactForm").animate({"bottom":"0px"});
		//$("#flywithus").animate({"bottom":"0px"});
}
	 //--------------------------------togg
/*	 var vis = false;
	 
    $("#flywithus").click(function()
	{
		if(vis == false)
		{
		$("#contactForm").animate({"bottom":"0px"});
		$("#flywithus").animate({"bottom":"476px"});
		vis = true;
		}
		else
		{
			$("#contactForm").animate({"bottom":"-546px"});
			$("#flywithus").animate({"bottom":"0px"});
		
			vis = false;
			}
		});*/
		
		$("#flywithus").click(function()
	{
		$("#contactForm").slideToggle();
	});
	
});
//-------------------------------------------------validation contact page
$(document).ready(function(e)
 {
$( ".contact-form" ).validate({
	
	rules: {
    tel: {
      required: true,
      number: true,
	  minlength:10,
	  maxlength:10
    }
  },
	//-------------------messages
    messages: {
        name: "Name is required.",
		  message: "Message is required.",
        email: {
            required: "Email is required.",
            email: "Not a valid email address."
        },
		 tel: {
            required: "Mobile is required.",
            number: "Enter valid 10 digits",
			minlength: "Enter valid 10 digits",
			maxlength: "Enter valid 10 digits",
	   }
    },
    focusInvalid: false,
    submitHandler: function() {
		//alert( "Successful submission" );  
		form.submit();
               
    }
});
 });
 //-------------------------------------------------validation modal form
$(document).ready(function(e)
 {
$( ".modalForm" ).validate({
	
	rules: {
    tel: {
      required: true,
      number: true,
	  minlength:10,
	  maxlength:10
    }
  },
	//-------------------messages
    messages: {
        name: "Name is required.",
		  message: "Message is required.",
     /*   email: {
            required: "Email is required.",
            email: "Not a valid email address."
        },*/
		 tel: {
            required: "Mobile is required.",
            number: "Enter valid 10 digits",
			minlength: "Enter valid 10 digits",
			maxlength: "Enter valid 10 digits",
	   }
    },
    focusInvalid: false,
    submitHandler: function() {
		//alert( "Successful submission" );  
		form.submit();
               
    }
});
 });
 
 //-----------------------------Thanks page


/*$(document).ready(function(e)
 {
 setTimeout(popup2, 2000); // Setting time 3s to popup login form
function popup2() {

//$("#contactForm").animate({"bottom":"0px"});
		$("#thanx").animate({"top":"100px"});
}
 });*/