function defer(n){window.jQuery?n():setTimeout(function(){defer(n)},50)}var googleTagManagerContainer=document.querySelector("meta[name=google-tag-manager-container-id]").content||"",infotrust,options;(function(n,t,i,r,u){n[r]=n[r]||[];n[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var e=t.getElementsByTagName(i)[0],f=t.createElement(i),o=r!="dataLayer"?"&l="+r:"";f.async=!0;f.src="https://www.googletagmanager.com/gtm.js?id="+u+o;e.parentNode.insertBefore(f,e)})(window,document,"script","dataLayer",googleTagManagerContainer);window.impressionsOnScroll=window.impressionsOnScroll||{};window.googleAnalyticsProductClick=function(n){const t=impressionsOnScroll[n];t&&dataLayer.push({event:"product-click",ecommerce:{click:{actionField:{list:t.list},products:[t]}}})};window.googleAnalyticsImageClick=function(n){const t=impressionsOnScroll[n];t&&dataLayer.push({event:"promotion-click",ecommerce:{promoClick:{promotions:[t]}}})};window.googleAnalyticsRemoveFromCart=function(n){try{n&&dataLayer.push({event:"remove_from_cart",ecommerce:{remove:{products:[n]}}})}catch(t){}};window.googleAnalyticsAddToCartFromInterimModal=function(n,t){const i=impressionsOnScroll[n];i&&(i.quantity=t,delete i.position,delete i.list,dataLayer.push({event:"add_to_cart",ecommerce:{add:{products:[i]}}}))};infotrust=infotrust||{};infotrust.sendItems=infotrust.sendItems||[];infotrust.sentItems=infotrust.sentItems||[];infotrust.queuedItems=infotrust.queuedItems||[];infotrust.queuedIds=infotrust.queuedIds||[];infotrust.ScrollTrackingInitialized=!1;infotrust.scrollTrackingEnabled=infotrust.scrollTrackingEnabled||!0;options={selector:"[data-prodid]",productIdCallback:function(n){return n.data("prodid")},productImpressionList:"impressionsOnScroll",eventName:"productImpression",dataLayerName:"dataLayer",scrollDebug:!1};defer(function(){jQuery(document).ready(function(){function r(){var r,t,i,f,h;for(options.scrollDebug&&console.log("done scroll"),r=0;(infotrust.sendItems.length>0||infotrust.queuedItems.length>0)&&r<3;){for(options.debug&&console.log("Ids to be sent: "+infotrust.sendItems.join(",")),options.debug&&console.log("Ids already sent: "+infotrust.sentItems.join(",")),infotrust.queuedItems.length<10&&r++,t=0;t<infotrust.sendItems.length;t++)i=infotrust.sendItems[t],window[options.productImpressionList]&&window[options.productImpressionList][i]&&(f=window[options.productImpressionList][i],infotrust.queuedItems.push(f),infotrust.queuedIds.push(i),infotrust.sendItems.splice(infotrust.sendItems.indexOf(i),1),t--);var e=window[options.dataLayerName]||dataLayer,u=infotrust.queuedItems.splice(0,10),o={event:options.eventName||"sendProductImpression",ecommerce:{impressions:u.filter(function(n){return!n.isPromo})}},s={event:"promoView",ecommerce:{promoView:{promotions:u.filter(function(n){return n.isPromo}).map(function(n){return delete n.isPromo,n})}}};u.length>0&&(h=infotrust.queuedIds.splice(0,10),infotrust.sentItems=infotrust.sentItems.concat(h),o.ecommerce.impressions.length>0&&e.push(o),s.ecommerce.promoView.promotions.length>0&&e.push(s))}clearTimeout(n)}function i(){var r=jQuery(window).height(),i=jQuery(document).scrollTop(),n=i,t=i+r;jQuery(options.selector).each(function(){var r=jQuery(this).offset().top,f=r+jQuery(this).height(),i=jQuery(this),u;i.is(":visible")&&(i.data("checkslider")&&i.parents(".slick-active").length===0||i.data("checkcycleslider")&&i.parents(".cycle-slide-active").length===0||i.data("checkswiper")&&i.parents(".swiper-slide-visible").length===0||(u=options.productIdCallback(i),options.scrollDebug&&console.log("min: "+n+" max: "+t+" top: "+r),(r>=n&&r<t||f>=n&&f<t)&&infotrust.sentItems.indexOf(u)===-1&&infotrust.sendItems.indexOf(u)===-1&&infotrust.sendItems.push(u)))})}infotrust.scrollHandler=function(){infotrust.scrollTrackingEnabled&&t===!1&&(clearTimeout(n),i(),n=setTimeout(r,700))};var n,t=!0;if(infotrust.ScrollTrackingInitialized==!1)jQuery(document).on("scroll",infotrust.scrollHandler);t&&(t=!1,infotrust.ScrollTrackingInitialized=!0,options.debug&&console.log("done load"),i(),r());i();$(".rotating-banner-images").on("cycle-after",infotrust.scrollHandler)})})