	$(function() {
		   
		function checkCountry() {
		
		if ($("#country").val() !='USA')
		{

			$("#state").hide();
			$("#city").hide();

			$(".lab").hide();
	
		} else {
			
			$(".lab").show();

		}
				
}
	
	$('#country').chainSelect('#state','/scripts/jq_getstates.cfm',
			{
				before:function (target) //before request hide the target combobox and display the loading message
				{
					$("#loading").css("display","block");
					$(target).css("display","none");
				},
				after:function (target) //after request show the target combobox and hide the loading message
				{
					$("#loading").css("display","none");
					$(target).css("display","inline");
					checkCountry();
				}
			});
			$('#state').chainSelect('#city','/scripts/jq_getcities.cfm',
			{
				before:function (target)
				{
					$("#loading").css("display","block");
					$(target).css("display","none");
				},
				after:function (target)
				{
					$("#loading").css("display","none");
					$(target).css("display","inline");
					checkCountry();
					//$("#plz").remove();
				}
		}); 

	


		
		if ($("#city option").size()==1 && $("#state option:selected").val() !== '') {
		
			$("#state").change();
			
		}



});