$("document").ready(function(){var e=$(".site_centre_milieu").height()-67;var h=$(".site_centre_gauche_haut .navigation_treeview ul.treeview").height();if(h<e){$(".site_centre_gauche_haut .navigation_treeview ul.treeview").css("height",e)}var c=$(".site_centre_milieu").height()-47;var f=$(".site_centre_gauche_haut .menuCompte ul.menuCompteLu").height();if(f<c){$(".site_centre_gauche_haut .menuCompte ul.menuCompteLu").css("height",c)}$(".tampon-selection li:first-child,.tampon-selection li.tampon-quantity span:first-child,.EShopMenu .treeview > .expandable:first-child").addClass("first-child");var d=$(".site_centre_milieu").height()-50;var g=$(".exp-eboutique .exp-eboutique-navigation ul").height();if(g<d){$(".exp-eboutique .exp-eboutique-navigation ul.treeview").css("height",d)}try{var a=-26;var k=56;var l=parseInt($(".zone_banniereDroite").css("top"));var j=parseInt($(".marketingbanner").css("margin-top"));if(isNaN(j)){j=0}var i=parseInt($(".marketingbanner").css("margin-bottom"));if(isNaN(i)){i=0}var n=$(".marketingbanner").outerHeight();if(n==0){a=0}l=l+j+i+a;var m=0;j=parseInt($(".banniere_code_avantage").css("margin-top"));i=parseInt($(".banniere_code_avantage").css("margin-bottom"));n=$(".banniere_code_avantage").outerHeight();if(n==0){a=0}m=m+parseInt($(".banniere_code_avantage").height())+j+i+n+a;if(l+m>k){$(".zone_banniereDroite").css("top",l+m)}}catch(b){}RollOver();MonCompteOver();if($.browser.msie){$(".select-search,select[id$='ShelfDropDownList']").mousedown(function(){if($(this).css("width")!="auto"){var o=$(this).width();$(this).data("origWidth",$(this).css("width")).css("width","auto");if($(this).width()<o){$(this).css("width",$(this).data("origWidth"))}}}).blur(function(){$(this).css("width",$(this).data("origWidth"))}).change(function(){$(this).css("width",$(this).data("origWidth"))})}InitConnexion();InitClikBackground()});function InitClikBackground(){$("form").click(function(b){var c=$(document).width();if(c>1000){var a=(c-1000)/2;if(b.clientX<a||b.clientX>(c-a)){}}})}function LoadInterticiel(a){$.ajax({type:"GET",url:"/Interticiel.gis",contentType:"application/json; charset=utf-8",dataType:"json",success:function(d){var c=d.css.length;for(var b=0;b!=c;b++){$("head").append(d.css[b])}var c=d.js.length;for(var b=0;b!=c;b++){$("head").append(d.js[b])}d.html.replace("'","&quote;");$(a).append(d.html)},error:function(c,d,b){alert(d)}})}function RollOver(){var a=new Image();$("[urlHover]").each(function(){a.src=$(this).attr("urlHover");$(this).hover(function(b){var c=$(this);var f=c.attr("src");var d=c.attr("urlHover");c.attr("src",d);c.attr("urlHover",f)},function(b){var c=$(this);var f=c.attr("src");var d=c.attr("urlHover");c.attr("src",d);c.attr("urlHover",f)})})}function InitConnexion(){var a=$(".popin-connexion");if(a.length==0){return}$(".popin-connexion .btn-connexion").click(function(){return TestCookie2()});$('[connexion="aticf"]').click(function(){var b=$(this).attr("typePage");if(!isNaN(b)){$(".popin-connexion").find('input[id$="CurrentTypePage"]').val(b)}var c=$('input[id$="IsActifXiti"]').val();if(c=="true"){xt_click($(this).parent()[0],"C","11","popin_login","A")}$(".popin-connexion").find('input[id$="TextBoxNoCompte"]').focus();$(this).isgPopin("open");return false})}function TestCookie2(){var a="JmbTestCookie";EcrireCookie2(a,"test");if(!IsValideCookie2(a)){document.location.href="/Views/Errors/ErrorCookie.aspx";return false}else{EffaceCookie2(a);return true}}function EcrireCookie2(e,h){var b=EcrireCookie2.arguments;var a=EcrireCookie2.arguments.length;var d=(a>2)?b[2]:null;var f=(a>3)?b[3]:null;var c=(a>4)?b[4]:null;var g=(a>5)?b[5]:false;document.cookie=e+"="+escape(h)+((d==null)?"":("; expires="+d.toGMTString()))+((f==null)?"":("; path="+f))+((c==null)?"":("; domain="+c))+((g==true)?"; secure":"")}function IsValideCookie2(f){var b=f+"=";var a=b.length;var c=document.cookie.length;var d=0;while(d<c){var e=d+a;if(document.cookie.substring(d,e)==b){return true}d=document.cookie.indexOf(" ",d)+1;if(d==0){break}}return false}function EffaceCookie2(a){date=new Date;date.setFullYear(date.getFullYear()-1);EcrireCookie2(a,null,date)}function MonCompteOver(){$("div.btMonCompte").mouseenter(function(){$("div.btMonCompte div.moncompteover").show();$("div.btMonCompte a.moncompteleave").hide()}).mouseleave(function(){$("div.btMonCompte div.moncompteover").hide();$("div.btMonCompte a.moncompteleave").show()})}function UpdateShortCart(){$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/WebService/CartUserWebService.asmx/GetShortCartInformation",dataType:"json",success:function(b){var a=b.d;if(a.Success){DrawShortCart(a.Quantite,a.Total)}},error:function(b,c,a){alert(c+" : \n"+a)}})}function DrawShortCart(a,b){$("#cartQuantity").html(a);$("#cartTotal").html(b)};
