$(document).ready(function(){ 

	 $('#region').change( function () {
			var html = $.ajax({
			  url: "js/region.php?r="+$(this).val(),
			  async: false
			 }).responseText;

			$("#country").replaceWith(html);

      });
	 
	 $('#country').change( function () {
			$("#hiddenDIV").replaceWith("<div id='hiddenDIV'><br><br>LOADING ...</div>");
			var html = $.ajax({
			  url: "list_loader.php?id="+$(this).val(),
			  async: false
			 }).responseText;

			$("#hiddenDIV").replaceWith(html);

      });

	


	$('#isubmit').click( function () {
		
	 }); 

	$("#frmcontactus").validate({
          errorPlacement: function(label, element) {        
  		  label.insertAfter( element );
		  },    
        
          rules: {      
            "txtfname":"required",
			"txtlastname"	:"required",
			"txtemail": { required:true, email:true },
			"txtsubject"	:"required",
			"txtenquiry" : "required"
          },
          
		  
		  messages:{
            "txtfname":{ required : "<span style='color:red;font-size:80%'> Required!</span>" },
			"txtlastname" :{ required : "<span style='color:red;font-size:80%'> Required!</span>" },
			"txtemail"		:{ required : "<span  style='color:red;font-size:80%'> Required!</span>" },
			"txtsubject"   :{ required : "<span  style='color:red;font-size:80%'> Required!</span>" },
			"txtenquiry" : { required : "<span  style='color:red;font-size:80%'> Required!</span>" }
           }
		   
        });  
 });
