function map_search( keywords ) {
	 jQuery('#locator_zip_code').val( keywords );
	 jQuery('#search-valid').click();
}

function switchZipCode(bool){
	 if(bool){
		  jQuery('#search-valid-pays').fadeOut();
		  jQuery('#form-zip-code').fadeIn();
	 }
	 else{
		  jQuery('#search-valid-pays').show();
		  jQuery('#form-zip-code').hide();
	 }

}

function map_search(ville_id){
	 $("#search_map").val(ville_id);
	 $("#search").submit();
}

jQuery(document).ready(function(){

	 var need_zip = ['1'];

	 if(jQuery.inArray(jQuery('#locator_country').val(),need_zip) < 0 )
		  switchZipCode(0);
	 else
		 jQuery('#search-valid-pays').hide();

	 jQuery('#locator_country').change(function(){
//		  if(jQuery.inArray($(this).val(),need_zip) >= 0){
//				//switchZipCode(1);
//		  }
//		  else{
//				switchZipCode(0);
//		  }
//
		  jQuery('#search').submit();

	 })
	 
	 

});
