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