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": "cartlayer", "selector": function() { return jQuery('.epoqrecommendation-basket-flyout').parent(); }, "visibility": 0.5 }, "2": { "rules": "pdp", "selector": function() { return jQuery('.epoqrecommendation-details').parent(); }, "visibility": 0.5 } } } 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); }); } }