function meteo(){
    $("#meteoVille").each(
        function(x){
            var meteoVille = $(this).val();
            
            var html = $.ajax({
                type: "GET",
                url: "http://www.lanouvelletribune.com/plugins/auto/weather/weather.php",
                data: 'weather='+meteoVille,

                beforeSend: function(){
                    $(".meteo").html("Chargement en cours...");
                },
                success: function(msg){
                    
                    $(".meteo").html(msg);
                }
            }).responseText;
        }
        );
}



function selector(id){

    $("#flash-info").each(
        function(x){
            $("#flash-info img").css({
                "display":"none"
            });
            $("#flash-info div."+id+" img").css({
                "display":"block"
            });
        }
        );
}

$(document).ready(function(){
	var $dialog = $('<div></div>')
		.html('<p>Veuillez entrer au moins 3 caract&egrave;res pour lancer la recherche</p>')
		.dialog({
			autoOpen: false,
			title: 'Recherche sur le site'
		});

	$("#flash-info img").css({
		"display" : "none"
	});
	$("#flash-info img:first").css({
		"display" : "block"
	});
	
	$('#form-search').submit(function(event) {
		if ($('#recherche').attr('value').length < 3 ) {
			$dialog.dialog('open');
			return false;
		}
	});

});