function hideAdSlot(slotId) { var slot = document.getElementById(slotId); if(slot === null){ return; } slot.style.display = "none"; } var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var slots_default = {}; googletag.cmd.push(function () { var width = top.innerWidth || document.documentElement.clientWidth; if (width >= 768) { slots_default['div-gpt-ad-1543589751568-0'] = googletag.defineSlot('/1003244/Leaderboard', [728,90], 'div-gpt-ad-1543589751568-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1458671257194-0'] = googletag.defineSlot('/1003244/MediumRectangle', [[300,250], [300,600]], 'div-gpt-ad-1458671257194-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1543611524799-0'] = googletag.defineSlot('/1003244/WideskyscraperLeft', [160,600], 'div-gpt-ad-1543611524799-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1543611617896-0'] = googletag.defineSlot('/1003244/WideskyscraperRight2', [160,600], 'div-gpt-ad-1543611617896-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1540557322719-0'] = googletag.defineSlot('/1003244/GPT-Billboard', [[970,10], [970,250]], 'div-gpt-ad-1540557322719-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1537919785632-0'] = googletag.defineSlot('/1003244/ContentWell', [630,300], 'div-gpt-ad-1537919785632-0').setTargeting('ntvPlacement', '1093490').addService(googletag.pubads()); slots_default['div-gpt-ad-1419267094495-0'] = googletag.defineSlot('/1003244/1X1Background', [1,1], 'div-gpt-ad-1419267094495-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1543611442538-0'] = googletag.defineSlot('/1003244/BottomRail', [[300,250], [300,600]], 'div-gpt-ad-1543611442538-0').addService(googletag.pubads()); googletag.display('div-gpt-ad-1543589751568-0'); googletag.display('div-gpt-ad-1458671257194-0'); googletag.display('div-gpt-ad-1543611524799-0'); googletag.display('div-gpt-ad-1543611617896-0'); googletag.display('div-gpt-ad-1540557322719-0'); googletag.display('div-gpt-ad-1537919785632-0'); googletag.display('div-gpt-ad-1419267094495-0'); googletag.display('div-gpt-ad-1543611442538-0'); } else if ((width >= 300) && (width < 768)) { slots_default['div-gpt-ad-1517098912088-0'] = googletag.defineSlot('/1003244/MobileMedRec3', [300,250], 'div-gpt-ad-1517098912088-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1517138782277-0'] = googletag.defineSlot('/1003244/MobileMedRecMid', [[300,250], [300,600]], 'div-gpt-ad-1517138782277-0').addService(googletag.pubads()); slots_default['div-gpt-ad-1538017037191-0'] = googletag.defineSlot('/1003244/MobileLeaderboardTop', [320,50], 'div-gpt-ad-1538017037191-0').addService(googletag.pubads()); googletag.display('div-gpt-ad-1517098912088-0'); googletag.display('div-gpt-ad-1517138782277-0'); googletag.display('div-gpt-ad-1538017037191-0'); } /* googletag.companionAds().setRefreshUnfilledSlots(true); googletag.pubads().set("page_url", 'https://' + window.location.hostname); googletag.pubads().enableAsyncRendering(); googletag.pubads().collapseEmptyDivs(); googletag.pubads().disableInitialLoad(); googletag.enableServices(); */ googletag.pubads().disableInitialLoad(); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); window.onload = function() { var width = top.innerWidth || document.documentElement.clientWidth; if (width >= 768) { hideAdSlot("div-gpt-ad-1517098912088-0"); hideAdSlot("div-gpt-ad-1517138782277-0"); hideAdSlot("div-gpt-ad-1538017037191-0"); } else if ((width >= 300) && (width < 768)) { hideAdSlot("div-gpt-ad-1543589751568-0"); hideAdSlot("div-gpt-ad-1458671257194-0"); hideAdSlot("div-gpt-ad-1543611524799-0"); hideAdSlot("div-gpt-ad-1543611617896-0"); hideAdSlot("div-gpt-ad-1540557322719-0"); hideAdSlot("div-gpt-ad-1537919785632-0"); hideAdSlot("div-gpt-ad-1419267094495-0"); hideAdSlot("div-gpt-ad-1543611442538-0"); } } !function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function(){q("i",arguments)},fetchBids:function(){q("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)}("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js"); // initialize apstag and have apstag set bids on the googletag slots when they are returned to the page apstag.init({ pubID: '0533cdda-c21a-4258-b901-6bef203b7488', adServer: 'googletag', simplerGPT: true }); // request the bids for the four googletag slots googletag.cmd.push(function(){ apstag.fetchBids({ timeout: 2000 }, function(bids) { apstag.setDisplayBids(); googletag.pubads().refresh(); }); });