(function(n){function t(){function n(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function t(t){return parseInt(n(t))}return{url:{getParam:n,getParamInt:t}}}n.saputo=n.saputo||{};n.saputo.helpers=t()})(window),function(n){function t(){function u(n){n=n||{ready:!1,recipe:""};t(n.ready,"interaction recipe","recipe","use autocomplete search",n.recipe)}function f(){jq("[data-saputo-gtm]").each(function(){var t=jq(this),r=k(t,"saputo-gtm");for(var n in r)n==="click"?t.click(function(){p(r[n])}):i!=="prod"&&console.log("GoogleTagManager, bindEvents unknown",n)})}function e(n){n=n||{country:"",ready:!1};t(n.ready,"career","conversion","career opportunities",n.country)}function o(i){i=i||{ready:!1,url:""};i.url===""&&(i.url=n.location.href);t(i.ready,"interaction","click on carrousel link",i.url)}function s(n){n=n||{country:"",ready:!1};t(n.ready,"contact","conversion","contact us by phone",n.country)}function h(n){n=n||{ready:!1,subject:""};t(n.ready,"form","conversion","contact form submitted",n.subject)}function c(n){n=n||{name:"",ready:!1};t(n.ready,"form","conversion","contest form submitted",n.name)}function l(i){i=i||{ready:!1};t(i.ready,"coupon","conversion","coupon viewed",n.location.href)}function a(n){n=n||{ready:!1,type:"",title:""};t(n.ready,"download","download documentation",n.type,n.title)}function v(n){n=n||{ready:!1,type:"",name:""};t(n.ready,"download","download documentation",n.type,n.name)}function y(n){n=n||{ready:!1};t(n.ready,"share","conversion","share by email")}function p(n){var t,u,i;for(t in n)(u=n[t],i=r[t],typeof i=="function")&&i(u)}function w(n){n=n||{question:"",ready:!1};t(n.ready,"faq","other interaction","faq",n.question)}function b(n){n=n||{ready:!1,recipe:""};t(n.ready,"interaction product","product","featured recipes viewed on the product list page",n.recipe)}function k($element,dataKey){var trigger=$element.data(dataKey),triggerObject;i==="prod"&&$element.removeAttr(dataKey);triggerObject=null;try{triggerObject=eval("({"+trigger+"})")}catch(err){i!=="prod"&&console.log("GoogleTagManager, getTriggers error",err)}return triggerObject}function d(n){n=n||{ready:!1,recipe:""};t(n.ready,"interaction recipe","recipe","view of main recipes from the homepage",n.recipe)}function g(n){n=n||{ready:!1};t(n.ready,"newsletter","conversion","newsletter form submitted","referrer: "+document.referrer)}function nt(n){n=n||{ready:!1,keyword:""};t(n.ready,"interaction recipe","recipe","autocomplete search result not found",n.keyword)}function tt(n){n=n||{keyword:"",ready:!1};t(n.ready,"search result","no matches for this research",n.keyword)}function it(n){n=n||{product:"",ready:!1};t(n.ready,"interaction product","product","nutritional information",n.product)}function rt(n){n=n||{ready:!1,recipe:""};n.recipe===""&&(n.recipe=document.title);t(n.ready,"print","conversion","print",n.recipe)}function ut(n){n=n||{product:"",ready:!1};t(n.ready,"interaction product","product","see a product",n.product)}function ft(n){n=n||{product:"",ready:!1};t(n.ready,"interaction recipe","recipe","products viewed in the recipe",n.product)}function et(n){n=n||{filter:"",ready:!1};t(n.ready,"filter","click on search filter",n.filter)}function ot(n){n=n||{ready:!1};t(n.ready,"newsletter","other interaction","sign up to our newsletter")}function st(n){n=n||{ready:!1,socialMedia:""};t(n.ready,"share","conversion","share on social media","share on "+n.socialMedia)}function t(t,r,u,f,e){function o(n){return n!==undefined&&n!==null?n.replace(/''/g,'"').toLowerCase():n}function s(){n.dataLayer=n.dataLayer||[];var t={event:o(r),eventCategory:o(u),eventAction:o(f),eventLabel:o(e)};(i==="test"||i==="dev")&&console.log("GoogleTagManager, dataLayer.push",t);i!=="dev"&&dataLayer.push(t)}if(t){jq(document).ready(s);return}s()}function ht(n){n=n||{ready:!1,typeRecipe:""};t(n.ready,"interaction recipe","recipe","type of recipe from the toolbar",n.typeRecipe)}function ct(n){n=n||{ready:!1,recipe:""};t(n.ready,"interaction recipe","recipe","you may also like these recipes",n.recipe)}var i=n.saputo.environment,r={autocompleteSearch:u,career:e,carouselTracking:o,contactByPhone:s,contactForm:h,contestSubscription:c,couponTracking:l,download:a,downloadProductAndSellSheet:v,emailTracking:y,faq:w,featuredRecipes:b,mainRecipesInTheHomePage:d,newsletterSubscription:g,noAutocompleteSearchResult:nt,noSearchResult:tt,nutritionInformation:it,printARecipe:rt,productClick:ut,productsInTheRecipes:ft,searchFilterTracking:et,signupToOurNewsletter:ot,socialMediaTracking:st,typeOfRecipe:ht,youMayAlsoLikeTheseRecipes:ct};return jq(document).ready(f),r}n.saputo=n.saputo||{};n.saputo.gtm=t()}(window),function(n){function t(){function t(t){jq(n).on("popstate",function(){t(history.state)})}function i(t,i){history!==null&&history.pushState!==null&&history.pushState(t,document.title,n.location.protocol+"//"+n.location.host+n.location.pathname+i)}function r(t){history!==null&&history.replaceState!==null&&history.replaceState(t,document.title,n.location.href)}return{pop:t,push:i,replace:r}}n.saputo=n.saputo||{};n.saputo.location=t()}(window)