$(document).ready(function(){
	$("#rech_mult").click(function(){
		$("#form_recherche").show("slow");
		$("#prec").hide();
		return false;
	});	
	$("#form_rech_ferme").click(function(){
		$("#form_recherche").hide("slow",function(){
			$("#prec").show();		
		});
		
	});

$("#voir_navig").click(function(){
	$("#rech, #cont_menu").show("slow");
	$(this).fadeOut("slow");
});

$("#ferme_recherche a").click(function(){
	$("#rech, #cont_menu").hide("slow");
	$("#voir_navig").fadeIn("slow");
});


$("#contact_offre").click(function(){
	//alert(lg);
	$("#contact_form_cont").show("slow");
	$("#contact_form").html('<iframe id="ifr_contact" src="contact.'+lg+'.html?origine=annonces&numero_offre='+num_offre+'">');;
	$("#voir_navig").fadeOut("slow");
	
});

$("#ferme_mail_contact").click(function(){
	$("#contact_form_cont").hide("slow");
	$("#voir_navig").fadeIn("slow");
});


/*gommettes*/
$(".gommettesgg a").click(function(){
	$.post("inc/gommettes.php",{id: $(this).attr('title'),couleur: $(this).attr('lang')},function(data){
		donnees = data.split('|');
		$("#gom"+donnees[0]).html('<img src="img/gommettes/'+donnees[1]+'.gif">');
	});
	
});
















	
});

function verif_form(){

	a = $("#num_offre").val() + $("#departement").val()/**/;
	
	if(($("#prix_de").val() == 0) && ($("#prix_a").val() == '9999999')){
		var chk = false;
	}
	else{ var chk = true;}
	
	
	
	$("input.categorie").each(function(){
	
	if($(this).attr("checked") == true){
		chk = true;
	} 
	
	});
	
	if((chk == false) && (a == '')){
		alert('Veuillez spécifier au moins un critère de recherche');
		return false;
	}

}