jQuery(document).ready(function($) 
	{
			$("input#input_ville_fleur").keyup( function() 
			{ 
				lookup($(this).val()); 
				//($(this).val()
				// si on presse une touche du clavier en étant dans le champ texte qui a pour id inputString
				//$("#suggestions").show();
				//$("#suggestions").html("Recherche en cours");
				
			});
			
	
	});

function lookup(ville) {

jQuery("#suggestionsBox").show();
jQuery("#suggestionsBox").html("Recherche en cours");
var data = {
		action: 'my_fleurs',
		//action: 'demande_devis',
		ville: ville
	};

	// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
	jQuery.post(ajaxurl, data, function(response) {
		jQuery("#suggestionsBox").html(response);
	});

}

function fill(thisUrl,thisVille) { // remplir le champ texte si une suggestion est cliquée
	jQuery('#ville_url').val(thisUrl);
	jQuery('#input_ville_fleur').val(thisVille);
	setTimeout("jQuery('#suggestionsBox').hide();", 200);
}
