setTimeout('epoq_wvt()',250); function epoq_wvt() { if (typeof jQuery == 'undefined') { setTimeout('epoq_wvt()',250); } else { jQuery(document).ready(function() { var epoq_recwidgettop= -1; var epoq_recwidgetheight = -1; //var epoq_widgetseen=false; var epoq_didScroll = true; jQuery(window).scroll(function () { epoq_didScroll = true; }); jQuery(window).mousemove(function () { epoq_didScroll = true; }); if(typeof jQuery(window).on == 'undefined') { jQuery(window).load(function(){epoq_didScroll = true;}); } else { jQuery(window).on('load', function() { epoq_didScroll = true; }); }; setInterval(function(){ epoq_didScroll = true },500); setInterval(function() { if(epoq_didScroll) { epoq_didScroll = false; if(typeof epoq_recSelector2 == "undefined" || epoq_recSelector2==null) { epoq_recSelector2 = { "1": { "rules": "alternative", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/productdetail/alt"][data-type="alt"]'); }, "visibility": 0.5 }, "2": { "rules": "alternativeTwo", "selector": function() { return document.querySelector('[itemprop="availability"][href="https://schema.org/OutOfStock"]') && document.querySelector('[data-econda-marker$="/reco/productdetail/alt"][data-type="product"]'); }, "visibility": 0.0 }, "3": { "rules": "babymarktcartlayer", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/basketlayer"] [data-product-id]'); }, "visibility": 0.5 }, "4": { "rules": "babymarktcartpage", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/basket/top"]'); }, "visibility": 0.5 }, "5": { "rules": "babymarktcartpageFavorites", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/basket/bottom"]'); }, "visibility": 0.0 }, "6": { "rules": "babymarktentrypage", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/home"]'); }, "visibility": 0.5 }, "7": { "rules": "blogProduct", "selector": function() { return jQuery(".blog__recommendation .js-recommendations"); }, "visibility": 0.5 }, "8": { "rules": "bmmnohitpage", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/zerohits"]'); }, "visibility": 0.5 }, "9": { "rules": "productPage,default", "selector": function() { return !document.querySelector('[itemprop="availability"][href="https://schema.org/OutOfStock"]') && document.querySelector('[data-econda-marker$="/reco/productdetail/alt"][data-type="product"]'); }, "visibility": 0.5 }, "10": { "rules": "productPageXsell", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/productdetail/xsell"]'); }, "visibility": 0.5 }, "11": { "rules": "seriesPDP", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/productdetail/series"]'); }, "visibility": 0.5 }, "12": { "rules": "wishlist", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/wishlist"]'); }, "visibility": 0.0 }, "13": { "rules": "wishlistOften", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/wishlistOften"]'); }, "visibility": 0.0 }, "14": { "rules": "wishlistlayer", "selector": function() { return document.querySelector('[data-econda-marker$="/reco/wishlistlayer"]'); }, "visibility": 0.0 } } } if (typeof epoq_recSelector2 == 'undefined') return; for (var key in epoq_recSelector2) { if (epoq_recSelector2.hasOwnProperty(key)) { if(typeof epoq_recSelector2[key].widgetseen == 'undefined')epoq_recSelector2[key].widgetseen=false; epoq_recSelector = epoq_recSelector2[key].selector; if(typeof(epoq_recSelector)=='function')epoq_recSelector=epoq_recSelector(); var epoq_rules = epoq_recSelector2[key].rules; if(epoq_recSelector!=null && epoq_recSelector.length > 0) { epoq_recwidgettop = epoq_recSelector.offset().top; epoq_recwidgetheight = epoq_recSelector.height() * epoq_recSelector2[key].visibility; } else { epoq_recwidgettop= -1; epoq_recwidgetheight = -1; } if (!epoq_recSelector2[key].widgetseen && epoq_recwidgettop>-1 && epoq_recwidgetheight>-1 && (jQuery(window).height() + jQuery(window).scrollTop() >= epoq_recwidgettop + epoq_recwidgetheight)) { epoq_recSelector2[key].widgetseen = true; if(typeof epoq_viewEventId == 'undefined')epoq_viewEventId='__NOT_SET__'; if(typeof epoq_productId == 'undefined')epoq_productId='__NOT_SET__'; if(typeof getEpoq_sessionId == 'undefined')sessionId='__NOT_SET__'; else sessionId = getEpoq_sessionId() jQuery.getJSON(epoq_host+'event?wv='+epoq_viewEventId + '&tenantId='+ epoq_tenantId + '&sessionId='+ epoq_sessionId + '&productId='+ epoq_productId + '&rules='+ epoq_rules + '&jsoncallback=?', function(data){}); } } } } }, 250); }); } }