$(document).ready(function(){$("#rechercheForm").submit(function(){var b=$("#rechercheVille").val(),a=$("#rechercheForm1").val();""==a?""==b?$("form#rechercheForm").attr("action",""):$("form#rechercheForm").attr("action","../"+b+"/"):""!=a&&(""==b?$("form#rechercheForm").attr("action",a+"/"):$("form#rechercheForm").attr("action","../"+b+"/"+a+"/"))});var c;try{localStorage.setItem("test",
"test"),localStorage.removeItem("test"),c=!0}catch(d){c=!1}if(!0===c)if(window.localStorage){$(".localst").bind("click",function(){var b=$(this).parent().parent().attr("id"),a=localStorage.getItem("divid");null==a?(a=[],a.push(b)):(a=JSON.parse(a),-1==jQuery.inArray(b,a)&&a.push(b));localStorage.setItem("divid",JSON.stringify(a));a=localStorage.getItem("an");if(null==a)a=[],a.push('
'+$("#"+b+" .div1").html()+' '+$("#"+
b+" .div2").html()+' '+$("#"+b+" .div3").html()+' '+$("#"+b+" .div4 #dprix").html()+" |
"),$("#"+b).find("#imgdes").html('Cette annonce a bien \u00e9t\u00e9 ajout\u00e9e \u00e0 vos favoris'),$("#"+b).find("#imgdes span").css({height:"40px","line-height":"18px"}),$("div#ds").html(a),$("#supfavoris").show(),$("span.showcounting").html(a.length);
else{var a=JSON.parse(a),c=''+$("#"+b+" .div1").html()+' '+$("#"+b+" .div2").html()+' '+$("#"+b+" .div3").html()+' '+$("#"+b+" .div4 #dprix").html()+" |
";-1!=jQuery.inArray(c,a)?$("#"+b).find("#imgdes").html('Vous avez d\u00e9ja ajout\u00e9 cette annonce \u00e0 vos favoris'):
(a.push(c),$("#"+b).find("#imgdes").html('Cette annonce a bien \u00e9t\u00e9 ajout\u00e9e \u00e0 vos favoris'));$("#"+b).find("#imgdes span").css({height:"40px","line-height":"18px","font-size":"12px"});$("span.showcounting").html(a.length);$("#"+b).find("#imgdes").removeAttr("class")}localStorage.setItem("an",JSON.stringify(a))});ns=JSON.parse(localStorage.getItem("an"));if(void 0!==ns&&null!==ns&&0!==ns.length)for($("span.showcounting").html(ns.length),
i=0;iVous avez d\u00e9ja ajout\u00e9 cette annonce \u00e0 vos favoris'),$("#"+dd).find("#imgdes span").css({height:"40px","line-height":"18px","font-size":"12px"}))}).get()}else alert("Votre navigateur ne supporte pas localStorage.")});