function args(n){var t={},i=/^jQuery\d+$/;return $.each(n.attributes,function(n,r){r.specified&&!i.test(r.name)&&(t[r.name]=r.value)}),t}function clearPlaceholder(n,t){var r=this,i=$(this);if(r.value===i.attr(debugMode?"placeholder-x":"placeholder")&&i.hasClass(settings.customClass))if(r.value="",i.removeClass(settings.customClass),i.data("placeholder-password")){if(i=i.hide().nextAll('input[type="password"]:first').show().attr("id",i.removeAttr("id").data("placeholder-id")),n===!0)return i[0].value=t,t;i.focus()}else r==safeActiveElement()&&r.select()}function setPlaceholder(n){var i,r=this,t=$(this),f=r.id,u;if(!n||n.type!=="blur"||!t.hasClass(settings.customClass))if(r.value===""){if(r.type==="password"){if(!t.data("placeholder-textinput")){try{i=t.clone().prop({type:"text"})}catch(e){i=$("<input>").attr($.extend(args(this),{type:"text"}))}i.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":t,"placeholder-id":f}).bind("focus.placeholder",clearPlaceholder);t.data({"placeholder-textinput":i,"placeholder-id":f}).before(i)}r.value="";t=t.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",t.data("placeholder-id")).show()}else u=t.data("placeholder-password"),u&&(u[0].value="",t.attr("id",t.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"));t.addClass(settings.customClass);t[0].value=t.attr(debugMode?"placeholder-x":"placeholder")}else t.removeClass(settings.customClass)}function safeActiveElement(){try{return document.activeElement}catch(n){}}function funRemoveSpecialChar(n){return n.replace("&#38;","&").replace("&#232;","è").replace("&#233;","é")}function updateDropdownWidth(){var n=$(".dropdown").width()-180;$(".subcats").css({width:n+"px"})}function selectCategory(n){if(n.indexOf("#")>-1){var t=n.split("#")[1];$('.tabs-cont-desktop li a[data-category="'+t+'"]').length&&(showFilterItems(t),$(".tabs-cont li").removeClass(),$('.tabs-cont-desktop li a[data-category="'+t+'"]').parent().addClass("active"))}}function showFilterItems(n){var n=n;$(".recipe-box-gallery-cont").removeClass("show");$('.recipe-box-gallery-cont[data-category="'+n+'"]').addClass("show")}var debugMode=!1,isOperaMini=Object.prototype.toString.call(window.operamini)==="[object OperaMini]",isInputSupported="placeholder"in document.createElement("input")&&!isOperaMini&&!debugMode,isTextareaSupported="placeholder"in document.createElement("textarea")&&!isOperaMini&&!debugMode,valHooks=$.valHooks,propHooks=$.propHooks,hooks,placeholder,settings={};isInputSupported&&isTextareaSupported?(placeholder=$.fn.placeholder=function(){return this},placeholder.input=!0,placeholder.textarea=!0):(placeholder=$.fn.placeholder=function(n){return settings=$.extend({},{customClass:"placeholder"},n),this.filter((isInputSupported?"textarea":":input")+"["+(debugMode?"placeholder-x":"placeholder")+"]").not("."+settings.customClass).not(":radio, :checkbox, :hidden").bind({"focus.placeholder":clearPlaceholder,"blur.placeholder":setPlaceholder}).data("placeholder-enabled",!0).trigger("blur.placeholder")},placeholder.input=isInputSupported,placeholder.textarea=isTextareaSupported,hooks={get:function(n){var t=$(n),i=t.data("placeholder-password");return i?i[0].value:t.data("placeholder-enabled")&&t.hasClass(settings.customClass)?"":n.value},set:function(n,t){var i=$(n),r,u;return(t!==""&&(r=i.data("placeholder-textinput"),u=i.data("placeholder-password"),r?(clearPlaceholder.call(r[0],!0,t)||(n.value=t),r[0].value=t):u&&(clearPlaceholder.call(n,!0,t)||(u[0].value=t),n.value=t)),!i.data("placeholder-enabled"))?(n.value=t,i):(t===""?(n.value=t,n!=safeActiveElement()&&setPlaceholder.call(n)):(i.hasClass(settings.customClass)&&clearPlaceholder.call(n),n.value=t),i)}},isInputSupported||(valHooks.input=hooks,propHooks.value=hooks),isTextareaSupported||(valHooks.textarea=hooks,propHooks.value=hooks),$(window).bind("beforeunload.placeholder",function(){var n=!0;try{document.activeElement.toString()==="javascript:void(0)"&&(n=!1)}catch(t){}n&&$("."+settings.customClass).each(function(){this.value=""})})),function(n){n(document).on("ready",function(){function e(){var n=acSearch==="undefined"?"undefined":JSON.stringify(acSearch);typeof Storage!="undefined"&&n==="undefined"&&(searchData=localStorage.getItem("searchac")?JSON.parse(localStorage.getItem("searchac")):null,searchData&&Date.now()>searchData.expires&&(searchData=null));searchData||n==="undefined"||(searchData=JSON.parse(n),searchData.expires=Date.now()+604800,typeof Storage!="undefined"&&localStorage.setItem("searchac",JSON.stringify(searchData)))}function i(){var t=n(".search-bar-cont .sep input").val();t&&(window.location="/search?qs="+encodeURIComponent(t))}var t;n(".popular_search_link").unbind();n(".popular_search_link").on("click",function(t){if(t.preventDefault(),t.stopPropagation(),typeof initiateDataLayerEvent=="function"){var i={event:"search",type:"click_popular_searches",search_term:n(this).text()};initiateDataLayerEvent(i)}window.location=n(this).attr("href")});Array.from||(Array.from=function(){var t=Object.prototype.toString,n=function(n){return typeof n=="function"||t.call(n)==="[object Function]"},i=function(n){var t=Number(n);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))},r=Math.pow(2,53)-1,u=function(n){var t=i(n);return Math.min(Math.max(t,0),r)};return function(t){var h=this,c=Object(t),i,o;if(t==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");if(i=arguments.length>1?arguments[1]:void undefined,typeof i!="undefined"){if(!n(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var f=u(c.length),s=n(h)?Object(new h(f)):new Array(f),r=0,e;r<f;)e=c[r],s[r]=i?typeof o=="undefined"?i(e,r):i.call(o,e,r):e,r+=1;return s.length=f,s}}());e();t=function(){n(".search-bar-cont .sep input").autocomplete({source:function(t,i){var e=searchData[2]?n.ui.autocomplete.filter(searchData[2].Value,t.term):"",o=searchData[3]?n.ui.autocomplete.filter(searchData[3].Value,t.term):"",s=searchData[1]?n.ui.autocomplete.filter(searchData[1].Value,t.term):"",h=searchData[0]?n.ui.autocomplete.filter(searchData[0].Value,t.term):"",f,c,r,u;for(e=e.slice(0,e.length>=6?6:e.length),s=s.slice(0,s.length>=6?6:s.length),o=o.slice(0,o.length>=6?6:o.length),h=h.slice(0,h.length>=6?6:h.length),f=[],c=[],r=0;r<e.length;r++)u={name:e[r],label:e[r],value:funRemoveSpecialChar(e[r]),type:searchData[2].Key},f.push(u);for(r=0;r<o.length;r++)u={name:o[r],label:o[r],value:funRemoveSpecialChar(o[r]),type:searchData[3].Key},f.push(u);for(r=0;r<s.length;r++)u={name:s[r],label:s[r],value:funRemoveSpecialChar(s[r]),type:searchData[1].Key},f.push(u);for(r=0;r<h.length;r++)u={name:h[r],label:h[r],value:funRemoveSpecialChar(h[r]),type:searchData[0].Key},f.push(u);for(f=n.unique(f),r=0;r<6;r++)u=f[Math.floor(Math.random()*f.length)],c.push(u);i(n.unique(c))},select:function(t,i){n(".search-field").val(i.item.name);n("#searchClick").click()}}).data("autocomplete")._renderItem=function(t,i){return n("<li>").data("item.autocomplete",i).append("<a><table><tr><td class='search-item-name'>"+i.name+"<\/td><td class='search-item-type'>"+i.type+"<\/td><\/tr><\/table><\/a>").appendTo(t)}};n(".ui-autocomplete-input").on("focus",function(){searchData&&t();n(this).attr("placeholder")=="Rechercher"&&n(this).attr("placeholder","")}).on("blur",function(){n(this).attr("placeholder")==""&&n(this).attr("placeholder","Rechercher")}).on("keypress",function(t){t.which==13&&(t.preventDefault(),n("#searchClick").click())});n(".search-bar .mkc-header-search").on("click",function(n){n.preventDefault();i()});n(".search-bar-cont .sep input").on("keypress",function(n){(n.keyCode===13||n.charCode===13||n.which===13)&&i()});var o=Array.from(document.querySelectorAll(".master-header .bottom .links li div.dropdown ul li ul")),s=Array.from(document.querySelectorAll(".master-header .bottom .links > li")),r=function(n,t){var i=new Image(222,125);i.src=t;i.onload=function(){n.setAttribute("src",t);n.removeAttribute("data-src")}},u=function(){Array.from(this.querySelectorAll("img")).forEach(function(n){var t=n.getAttribute("data-src");t!=null&&r(n,t)});this.removeEventListener("mouseover",u)},f=function(){var n=Array.from(this.querySelectorAll("div.dropdown ul li:first-child .subcats img"));n.forEach(function(n){var t=n.getAttribute("data-src");t!=null&&r(n,t)});this.removeEventListener("mouseover",f)};o.forEach(function(n){n.parentElement.addEventListener("mouseover",u,!1)});s.forEach(function(n){n.addEventListener("mouseover",f,!1)})})}(jQuery);$(window).resize(updateDropdownWidth);$(document).on("ready",updateDropdownWidth);$(document).ready(function(){$(".has-child").click(function(){$(this).parent().find(".second-level").css("right",0)});$(".has-sublink").click(function(){$(".second-level").removeAttr("style");$(".master-header").removeClass("show-aside");$("body").removeClass("show-menu-overlay");$("body").removeAttr("style");selectCategory($(this).attr("href"));$(".select-btn strong").text($('.tabs-cont-mobile li a[data-category="'+$(this).attr("href").split("#")[1]+'"]').text());$(".is-mobile").removeClass("show")});$(".backto-prev").click(function(){$(".second-level").removeAttr("style")})})