var com = window.com || {}; if(!window.com){ window.com = com; }; try{ }catch(e){debugger;} var adtechAdConfig = { "canvasId": 426043, "liveStatsEnabled": false, "servicesUrl": "", "dynamic": false, "productFamilyId": 0, "formatId": 16, "servicesHosts": { "http": "", "https": "", "post": "" }, "adServerVars": { "uid": "1591192749620", "id": "426043", "bannerId": "_ADBNID_", "bannerUid": "_ADBNUID_", "networkId": "_ADNETID_", "subNetworkId": "_ADSUBNETID_", "creativeId": "0", "pageId": "_ADFC_PAGEID_", "placementId": "_ADCUID_", "adSize": "_ADFC_ADSIZE_", "servingProto": "https", "servingHost": "localhost", "sequenceId32": "_ADREFSEQUENCEID32_", "sequenceId64": "_ADREFSEQUENCEID64_", "secureAssetHost": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/07e457a3f154b25e6d306686c68b1ada\/", "configBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/07e457a3f154b25e6d306686c68b1ada\/", "assetBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/07e457a3f154b25e6d306686c68b1ada\/", "baseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/07e457a3f154b25e6d306686c68b1ada\/", "viewCounter": "", "campaignId": "_ADMCID_", "publisherId": "_ADWEBSITEID_", "externalId": "" }, "geoData": { "area": "_ADAREATEXT_", "city": "Amsterdam", "country": "_ADCOUNTRYTEXT_", "state": "Noord-Holland", "zip": "_ADZIPTEXT_" }, "tagVars": [], "preview": true, "pubVars": { "clickPixel": "", "iframeBusterPath": "", "clickRedirect": "", "overflowFixLevel": "0", "viewCountUrl": "", "overrideX": "", "overrideY": "", "closeTimeout": "0" }, "regs": { "gdpr": { "applies": "_ADGDPR_", "consent": "_ADCONSENT_" }, "ccpa": { "privacy": "_ADUSPRIVACY_" } }, "DeliveryServerTag": { "source": "_ADDCP(tag.srvsrc)_", "lineId": "_ADDCP(tag.srvlid)_", "creativeId": "_ADDCP(tag.srvcid)_", "variables": "_ADDCP(tag.vars:{})_" }, "clickRedirect": "", "assetContainers": { "main": { "type": "inlineDiv", "width": 1, "height": 1, "contentWidth": 1, "contentHeight": 1, "contentWidthUnit": "px", "contentHeightUnit": "px", "xRel": "adSlotLeft", "yRel": "adSlotTop", "x": 0, "y": 0, "renderEvent": "serve", "content": "main.html", "contentType": "html", "zIndex": 27001, "wmode": "opaque", "pluginVersion": 0, "contractedY": 0, "contractedX": 0, "contractedWidth": 1, "contractedHeight": 1, "isExpandable": true, "isCustomResponsive": true, "startContracted": true, "stickyX": false, "stickyY": false, "pushesContent": false, "expandAnimationDuration": 0, "contractAnimationDuration": 0, "closeTimeout": 0, "modal": false, "sequence": 1, "iframeBuster": "", "langVersion": 0 }, "top": { "type": "floatingDiv", "width": 1, "height": 150, "contentWidth": 1, "contentHeight": 150, "contentWidthUnit": "px", "contentHeightUnit": "px", "xRel": "adSlotCenter", "yRel": "pageTop", "x": 0, "y": 0, "renderEvent": "serve", "content": "top.html", "contentType": "html", "zIndex": 27001, "wmode": "opaque", "pluginVersion": 0, "contractedY": 0, "contractedX": 0, "contractedWidth": 1, "contractedHeight": 1, "isExpandable": true, "startContracted": true, "stickyX": false, "stickyY": false, "pushesContent": false, "expandAnimationDuration": 0, "contractAnimationDuration": 0, "closeTimeout": 0, "modal": false, "sequence": 1, "iframeBuster": "", "langVersion": 0 }, "bottom": { "type": "floatingDiv", "width": 1, "height": 100, "contentWidth": 1, "contentHeight": 100, "contentWidthUnit": "px", "contentHeightUnit": "px", "xRel": "adSlotCenter", "yRel": "pageTop", "x": 0, "y": 0, "renderEvent": "", "content": "bottom.html", "contentType": "html", "zIndex": 27001, "wmode": "opaque", "pluginVersion": 0, "contractedY": 0, "contractedX": 0, "contractedWidth": 1, "contractedHeight": 1, "isExpandable": true, "startContracted": false, "stickyX": false, "stickyY": false, "pushesContent": false, "expandAnimationDuration": 0, "contractAnimationDuration": 0, "closeTimeout": 0, "modal": false, "sequence": 1, "iframeBuster": "", "langVersion": 0 } }, "clickthroughs": { "default": { "id": 2579, "plid": "19820fb2c1c5cecacd4528a5bad3aa93", "dest": "https:\/\/www.adsolutions.com\/rich-media-gallery\/", "target": "_blank", "features": "" }, "backupImageClickthrough": { "id": 7703, "plid": "4d2c2cef5973417f3f03adc213a06d6d", "dest": "https:\/\/www.adsolutions.com\/rich-media-gallery\/", "target": "_blank", "features": "" }, "main": { "id": 16547, "plid": "37f1f67addb076058db521478e783928", "dest": "https:\/\/www.adsolutions.com\/rich-media-gallery\/", "target": "_blank", "features": "" } }, "contentVariables": { "Backup Alt Text": "Sunweb advertisement" }, "contentProperties": { "slotHeight": "", "initiallyStatic": false }, "adrConfig": { "eventEndpoint": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}" }, "dataFeeds": [], "screenGrabs": [], "polls": [], "assets": [ { "id": "Backup image", "name": "1x1.gif", "url": "1x1.gif" }, { "id": "main", "name": "main.html", "url": "main.html" }, { "id": "top", "name": "top.html", "url": "top.html" }, { "id": "bottom", "name": "bottom.html", "url": "bottom.html" }, { "id": null, "name": "customAd.js", "url": "customAd.js" }, { "id": null, "name": "style.css", "url": "style.css" }, { "id": null, "name": "code.js", "url": "code.js" }, { "id": null, "name": "top.png", "url": "top.png" }, { "id": null, "name": "bottom.png", "url": "bottom.png" }, { "id": null, "name": "middle.png", "url": "middle.png" }, { "id": "main", "name": "index2.html", "url": "index2.html" } ], "events": [ { "id": 0, "plid": "850415b95f929ae311dc1d1d3f7f2bec", "name": "engagement", "cumulative": false, "interaction": true, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "c35dcf63748b2faf210d23745a8726b4", "name": "interactiveImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "c9f6fe2c78d93485fb24a1ef9bf6c7ef", "name": "viewableImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "49fcf58513758b38fec25dcf95efa15d", "name": "indeterminableViewability", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "7f0b290802215582ce37ccee46549ad7", "name": "expand", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "96875f3fdd120a3a4d8905fc30b4649e", "name": "autoExpand", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "a61ed805bc03915a171c015f73358756", "name": "contract", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "c10258071c4eeb2cfe7888cdddf2c3e7", "name": "close", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "8d950c792a94bcfbb7bc6d9005b32410", "name": "show", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "0f29323080961ce49eed7c51eb377464", "name": "hide", "cumulative": true, "interaction": false, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "86085c297e6923af029c92bd378e157f", "name": "reload", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "a0ec400fd7bfbb0234529c78e0d88f13", "name": "backupView", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "8afd9cf75017beeb04259947c2f58b45", "name": "backupViewableImpression", "cumulative": false, "interaction": false, "custom": false, "video": false, "isLoggable": true }, { "id": 0, "plid": "3259edcfc16006f28dc895ed8336d54e", "name": "allMostInScrollPosition", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "60e9b6005ed9c13420635a17533fbb68", "name": "inScrollPosition", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "212c5144d6f1d8401e6429f940a1a1c8", "name": "scrolling", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "ec86cc7ed30fe8aae01b3f933ed8a809", "name": "outOffScrollPosition", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "186f9f929481f4f7b7e4ea9440eda05f", "name": "partlyInView", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "cb973f7e98a664cc835a2caf5fbd2877", "name": "notPlaceraHomePage", "cumulative": true, "interaction": true, "custom": true, "video": false, "isLoggable": true }, { "id": 0, "plid": "ae171a84675cdec5a7665ad78e9d2bdc", "name": "Video Play", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "22357481e5ab6f595a45b2b3e09183de", "name": "Video Start", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "e37ebe31df0629b9a236f0e9afa79d4a", "name": "Video First Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "16e9d5692317063bf4c8e9402c3c33f2", "name": "Video Midpoint", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "4b88378395c59cc127a13334a70d2b73", "name": "Video Third Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "abbfcf5a93bf41904ee7e46fb2c0d63a", "name": "Video Complete", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "8e6c8d2a2646d235bd49f5095c421454", "name": "Video Mute", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "be7afffaeffa31d5b163bfa245aa07f1", "name": "Video Unmute", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "2a9b204a26b5344ef9ebc7ec28724862", "name": "Video Pause", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "4d8b80a0f72b4316b8731fef925039e4", "name": "Video Replay", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "55bacb8f73f0768cfa8e2f35bc06c03c", "name": "Video Resume", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "062137e9ab26e01d31cb00d5d1c34a04", "name": "Video Seek", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "77e17c385c650d4b0ad578dbca2249ba", "name": "Video Fullscreen", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "45f9a02bde766ff8663e807645dfbd32", "name": "video Video Play", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "3020138859ad4c4333a0ce450c345bc0", "name": "video Video Start", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "23ea196326ad66f00a4696ac703f3c3f", "name": "video Video First Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "f3d8e60353be353f1a715ec697b2f509", "name": "video Video Midpoint", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "90606e14b746c69959743ecd0380e91b", "name": "video Video Third Quartile", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "e5ae6ce1191a4db039062f5f697367bb", "name": "video Video Complete", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "cfa51a77e230968992f33eb3f1fff7d5", "name": "video Video Mute", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "776976d3947dd34377fe3cc9d50c5808", "name": "video Video Unmute", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "985905f76d31cab761d149fe3db12450", "name": "video Video Pause", "cumulative": true, "interaction": false, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "ad00269e626b4d193c8044d12546fdae", "name": "video Video Replay", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "c9aa024134ad3150fde9ae211c10b080", "name": "video Video Resume", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "9cbb5ecd80629e609204664d8f4de9a2", "name": "video Video Seek", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true }, { "id": 0, "plid": "7cce5afc5e8f46fd582e9c8c51ef6dc2", "name": "video Video Fullscreen", "cumulative": true, "interaction": true, "custom": true, "video": true, "isLoggable": true } ], "timers": [ { "id": 0, "plid": "9e2cc5168834ac4024fd04d15301dd7d", "name": "displayTimer" }, { "id": 0, "plid": "a292c5fb89ef5b03a9fcdb861d430814", "name": "viewTimer" }, { "id": 0, "plid": "4156b82ad1b06efe75b026c5b9c8c361", "name": "engagementTimer" }, { "id": 0, "plid": "ac893edcdd42b26a64ce4d4ef9967b16", "name": "interactionTimer" }, { "id": 0, "plid": "d7139e97c72768cfa75eb921f3dedc32", "name": "Video View" }, { "id": 0, "plid": "5b535ee2e57496bac08f66e75451e7b7", "name": "video Video View" } ], "eventHandlers": [ { "name": "close", "target": "floating", "source": "*", "action": "close" }, { "name": "show", "target": "floating", "source": "*", "action": "show" }, { "name": "contract", "target": "floating", "source": "*", "action": "contract" }, { "name": "hide", "target": "floating", "source": "*", "action": "hide" }, { "name": "reload", "target": "floating", "source": "*", "action": "reload" }, { "name": "expand", "target": "main", "source": "*", "action": "expand" }, { "name": "autoExpand", "target": "main", "source": "*", "action": "expand" }, { "name": "contract", "target": "main", "source": "*", "action": "contract" } ], "thirdPartyTracking": [ { "id": 1, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=19820fb2c1c5cecacd4528a5bad3aa93", "onEvent": "SPECIFIC_CLICK", "eventName": "default" }, { "id": 2, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=4d2c2cef5973417f3f03adc213a06d6d", "onEvent": "SPECIFIC_CLICK", "eventName": "backupImageClickthrough" }, { "id": 3, "type": "1_PIXEL", "url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=37f1f67addb076058db521478e783928", "onEvent": "SPECIFIC_CLICK", "eventName": "main" }, { "id": 4, "type": "1_PIXEL", "url": "", "secureUrl": "", "onEvent": "SPECIFIC_EVENT", "eventName": "viewableImpression" } ], "contentHubConfig": { "mapping": [], "assets": [] }, "fallback": "1x1.gif", "defaultClick": "default" }; if(typeof(adtechAdConfig) == 'object'){window.adtechAdConfig = adtechAdConfig}; window.adtechAdConfig = window.adtechAdConfig || {}; window.adtechAdConfig.overrides = window.adtechAdConfig.overrides || {}; window.adtechAdConfig.overrides.displayWindowTarget=self; /*debugger;*/ if(window.adtechAdConfig){ if(window.adtechAdConfig.clickthroughs && window.adtechAdConfig.clickthroughs["default"] && window.adtechAdConfig.clickthroughs["default"].dest && window.adtechAdConfig.clickthroughs["default"].dest.length>0){ for(var i in window.adtechAdConfig.clickthroughs){ if(i == "default"){ continue; } if(window.adtechAdConfig.clickthroughs[i].dest.length == ""){ window.adtechAdConfig.clickthroughs[i].dest = window.adtechAdConfig.clickthroughs["default"].dest; } } } } ; /** * Boilerplate code required to hook into the ADTECH rich media library. * * For API documentation, please contact canvas-help@adtech.com */ if(false){ ADTECH.event('allMostInScrollPosition'); ADTECH.event('inScrollPosition'); ADTECH.event('scrolling'); ADTECH.event('outOffScrollPosition'); ADTECH.event('partlyInView'); ADTECH.event('close'); ADTECH.event('notPlaceraHomePage'); ADTECH.getContent('initiallyStatic',false); ADTECH.getContent('slotHeight','0'); //ADTECH.click('main'); } adtechAdConfig.assetContainers.main.isExpandable = true;//to bust iframe //adtechAdConfig.adServerVars.campFCInfo = "0"; //adtechAdConfig.adServerVars.campFCInfo = 1; adtechAdConfig.adServerVars.campFCInfo = "0"; if(adtechAdConfig.assetContainers.floating){ adtechAdConfig.assetContainers.floating.renderEvent = ""; } (function(adConfig) { var requiresBreakout = false; if (!adConfig.overrides || adConfig.overrides.displayWindowTarget != self) { for (var id in adConfig.assetContainers) { if (adConfig.assetContainers.hasOwnProperty(id)) { var container = adConfig.assetContainers[id]; if (container.type != 'inlineDiv' || container.isExpandable) { requiresBreakout = true; break; } } } } if (adConfig.overrides && adConfig.overrides.displayWindowTarget) { var displayWindowTarget = adConfig.overrides.displayWindowTarget; displayWindowTarget = (typeof adtechIframeHashArray != 'undefined' && self != top) ? displayWindowTarget.parent : displayWindowTarget; } else { var calculatedTarget = null; var currentWindow = parent; while (currentWindow != undefined) { try { var targetDoc = currentWindow.document; if (targetDoc) { calculatedTarget = currentWindow; } } catch(e) {} currentWindow = (currentWindow == top) ? null : currentWindow.parent; } var displayWindowTarget = calculatedTarget || top; } var targetIsFriendly = false; try { var targetDoc = displayWindowTarget.document; if (targetDoc) { targetIsFriendly = true; } } catch(e) {} var targetWindow = (requiresBreakout && (self != top && targetIsFriendly)) ? displayWindowTarget : self; targetWindow.com = targetWindow.com || {}; targetWindow.com.adtech = targetWindow.com.adtech || {}; targetWindow.com.adtech.AdtechCustomAd$AD_ID$ = function() { // Custom code class constructor. }; var win = targetWindow; var doc = win.document; var animSF = (win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.msRequestAnimationFrame || function(cb){setTimeout(cb,16);}); !(function(){ var tmoId = setTimeout(function(){ animSF=function(cb){setTimeout(cb,16);}; },50); animSF(function(){ clearTimeout(tmoId); }); })(); var isS = function(v){ if(typeof(v) != 'undefined' && v != null) return true; return false; } var getComputedStyle = function(el, cssprop,doc){ try{ if (document.defaultView && document.defaultView.getComputedStyle) return document.defaultView.getComputedStyle(el, "")[cssprop] else if (el.currentStyle) //IE return el.currentStyle[cssprop] }catch(e){ } return el.style[cssprop] } function Policies(){ this.policies = []; this.cachePolicy = null; this.defaultPolicy = {}; } !function(){ var pt = Policies.prototype; pt.addPolicy = function(pol){ pol.$owner = this; this.policies.push(pol); } pt.resolvePolicy = function(domain,prop){ if(arguments.length == 1 && isS(this.cachePolicy)){ return this.cachePolicy; } if(arguments.length == 1 || !prop) prop = 'domain'; for(var i=0;i0){ params+= ';'; } params+= 'ckey'+(i+1)+'='+keys[i]; if(i=0){ params += 'expiresSession=1'; }else{ var ex = parseInt(expire,10); if(!isNaN(ex)){ if(expire.indexOf('d')>=0){ params += 'expiresDays='+ex; }else if(expire.indexOf('s')>=0){ params += 'expiresSecs='+ex; } } } }else{ params += 'expiresDays='+expire; } } bindReq.src = doc.location.protocol+"//adserver.adtech.de/bind?"+params+";adct=204;misc="+(Math.round(Math.random()*0xFFFFFFFF)); } var policies = new Policies(); policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(ath)\d+.*)+|(athinorama\.gr))/i, onUnloadHandler:function(advrt) { var main = doc.getElementById('main'); if(isS(main)){ main.removeAttribute('style'); }; }, init:function (advrt) { !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var ifrm = self.frameElement; var main = doc.getElementById('main'); var nav = doc.getElementsByTagName('header')[0]; if(((self != top && !ifrm) || !main || !nav || !advrt.top.div) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } main.style.marginTop = advrt.top.contentHeight+'px'; advrt.top.div.style.top = nav.clientHeight + 'px'; /*if(ifrm && !(ifrm.id=='createIframe' || ifrm.src.indexOf('proxy.php?url=')!==-1)){ ifrm.style.width = advrt.container.div.clientWidth+'px'; ifrm.style.height = advrt.container.div.clientHeight+'px'; ifrm.style.position = 'absolute'; ifrm.style.display = 'inline-block'; ifrm.style.left = '50%'; ifrm.style.transform = 'translateX(-50%)'; }*/ advrt.top.div.style.zIndex = 120; advrt.top.div.style.margin = 'initial'; var header = doc.querySelector('header'); var halfpage; var dummyElm = null; var timoId, isSticky=false; var getStickyTop = function(){ return (header.clientHeight); } var calcFixedPos = function(){ if(!dummyElm){ dummyElm = advrt.top.div.parentNode.insertBefore(advrt.top.div.ownerDocument.createElement('div'), advrt.top.div); dummyElm.style.height = advrt.top.div.style.height; }else{ dummyElm.style.display = 'block'; } advrt.top.div.style.position = 'fixed'; advrt.advert.assetContainers.top.stickyY = true; ////console.log("header",header.clientHeight); advrt.top.div.style.top = getStickyTop()+'px'; advrt.top.div.style.left = 0; if(header.clientHeight>50){ clearTimeout(timoId); timoId = setTimeout(checkSticky,40); } } var checkSticky = function(){ var scrl = advrt.utils.getPageOffsets(); var hpPos = null; if(!halfpage){ halfpage = advrt.container.div;//doc.querySelector('.dfp-space--sky'); } if(halfpage){ hpPos = halfpage.getBoundingClientRect(); } var advrtPosBot = getStickyTop()+advrt.top.div.clientHeight; //debugger; if(scrl.y>0 && (!hpPos || hpPos.top - 10 > advrtPosBot)){ calcFixedPos(); }else{ clearTimeout(timoId); advrt.top.div.style.position = 'absolute'; advrt.advert.assetContainers.top.stickyY = false; advrt.top.div.style.top = nav.clientHeight + 'px'; advrt.top.div.style.left = ""; if(dummyElm){ dummyElm.style.display = 'none'; } } } win.addEventListener("scroll", function(){ checkSticky(); }); win.addEventListener("resize", function(){ checkSticky(); }); checkSticky(); },0); }(); }, /*init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var main = doc.getElementById('main'); var nav = doc.getElementsByTagName('header')[0]; if((!main || !nav || !advrt.top.div) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } main.style.marginTop = advrt.top.contentHeight+'px'; advrt.top.div.style.top = nav.clientHeight + 'px'; },0); }(); },*/ pageScroll:function(advrt){ }, pageResize:function(advrt){ //dirty fix to get put under navigation; todo, make definite solution var sdims = advrt.utils.getViewportDims(); advrt.container.content.contentObject.style.maxHeight = (sdims.h - 120)+'px'; advrt.container.content.contentObject.style.marginTop = '120px'; } });policies.addPolicy({ domain:/.*((adsolutions\.(nl|com))\/(.*url=(ad)\d+.*)+|(adsolutions\.com))/i, onUnloadHandler:function(advrt) { var main = doc.getElementById('page-main-content'); if(isS(main)){ main.removeAttribute('style'); }; }, init:function (advrt) { !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var ifrm = self.frameElement; var subNav = doc.querySelector('.primary-nav__list'); var main = doc.getElementById('page-main-content'); var nav = doc.querySelector('.page-header'); if((!main || !nav || !subNav || !advrt.top.div) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } if(isS(subNav)){ subNav.style.overflowX = 'hidden'; } advrt.top.div.style.zIndex = 120; advrt.top.div.style.margin = 'initial'; var halfpage; var dummyElm = null; var timoId, isSticky=false; var getStickyTop = function(){ return 0;//(nav.clientHeight); } var calcFixedPos = function(){ advrt.top.div.style.position = 'fixed'; advrt.advert.assetContainers.top.stickyY = true; main.style.paddingTop = (advrt.top.contentHeight + nav.clientHeight) +'px'; nav.style.top = advrt.top.contentHeight + 'px'; advrt.top.div.style.top = getStickyTop()+'px'; advrt.top.div.style.left = 0; } var checkSticky = function(){ var scrl = advrt.utils.getPageOffsets(); var pos = advrt.container.div;//doc.querySelector('.dfp-space--sky'); if(pos){ hpPos = pos.getBoundingClientRect(); } var advrtPosBot = getStickyTop()+advrt.top.div.clientHeight; if((!hpPos || hpPos.top - 10 > advrtPosBot)){ calcFixedPos(); }else{ clearTimeout(timoId); advrt.top.div.style.position = 'absolute'; advrt.advert.assetContainers.top.stickyY = false; advrt.top.div.style.top = 0; //nav.clientHeight + 'px'; nav.style.top = 0; advrt.top.div.style.left = ""; if(dummyElm){ dummyElm.style.display = 'none'; } } } win.addEventListener("scroll", function(){ checkSticky(); }); win.addEventListener("resize", function(){ checkSticky(); }); calcFixedPos(); },0); }(); }, /*init:function(advrt){ !function(){ var counter = 0; var rty = 0; setTimeout(function(){ var main = doc.getElementById('main'); var nav = doc.getElementsByTagName('header')[0]; if((!main || !nav || !advrt.top.div) && rty < 1500){ setTimeout(arguments.callee,10); rty++; return; } main.style.marginTop = advrt.top.contentHeight+'px'; advrt.top.div.style.top = nav.clientHeight + 'px'; },0); }(); },*/ pageScroll:function(advrt){ }, pageResize:function(advrt){ } }); var pol = policies.resolvePolicy(doc.location.href); if (isS(pol) && isS(pol.initConfig)) { pol.initConfig(adConfig); } targetWindow.com.adtech.AdtechCustomAd$AD_ID$.prototype = { /** * Entry point methods. * * Automatically invoked by the rich media library when the library API is * available to use, and the Advert instance has been instantiated. */ preInit: function() { window.com = com || {}; com.adtech = targetWindow.com.adtech; var origRenderCont = com.adtech.HtmlContent_3_3_0.prototype.renderContent; com.adtech.HtmlContent_3_3_0.prototype.renderContent = function(){ this.origContainerObject = this.containerObject; this.containerObject = this.origContainerObject.appendChild(doc.createElement("div")); this.containerObject2 = this.containerObject; this.containerObject = this.containerObject2.appendChild(doc.createElement("div")); origRenderCont.apply(this, arguments); } com.adtech.HtmlContent_3_3_0.prototype.renderContent.origRenderCont = origRenderCont; }, init: function(advert) { this.container = advert.getAssetContainer('main'); this.bottom = advert.getAssetContainer('bottom'); if(advert.getAssetContainer('floating')){ this.layer = advert.getAssetContainer('floating'); this.layer.render = function(){ var holderDiv = this.div = this.content.containerObject = this.anchorDiv.appendChild(this.anchorDiv.ownerDocument.createElement('div')); this.div.style.width = '100%'; this.div.style.height = '100%'; this.div.style.position = 'absolute'; var origRenderCont = com.adtech.HtmlContent_3_3_0.prototype.renderContent.origRenderCont; this.content.renderContent = function(){ this.containerObject = holderDiv; origRenderCont.apply(this, arguments); this.contentObject.style.width = '100%'; this.contentObject.style.height = '100%'; }; this.content.render(); this.addMouseListeners(); } } if(advert.getAssetContainer('top')){ this.top = advert.getAssetContainer('top'); /*this.top.render = function(){ }*/ } this.slotHeight = advert.getContent('slotHeight','0'); !function(){ var s = this.bottom.show; var h = this.bottom.hide; var t=this; this.bottom.show = function(){ ////console.log("SHOWING LAYER"); s.apply(this, arguments); if(this.div){ this.div.style.display = 'block'; } } this.bottom.hide = function(){ ////console.log("HIDING LAYER"); h.apply(this, arguments) if(this.div){ this.div.style.display = 'none'; } } }.call(this); if(adConfig.assetContainers.main.disabled){ advert.reportEvent('notPlaceraHomePage'); if(this.container && this.container.anchorDiv){ this.container.anchorDiv.style.display = 'none'; } return; } if (!advert.richView) { // The backup client can not render the rich version of the advert. return; } // A few useful things to help you get started. Please delete as necessary! this.advert = advert; this.utils = com.adtech.Utils_3_3_0; this.globalEventBus = targetWindow.adtechAdManager_3_3_0.globalEventBus; this.richMediaEvent = com.adtech.RichMediaEvent_3_3_0; this.policy = pol; this.policies = [pol]; this.closed = false; /* * This is how you listen for your custom events. * ADTECH.close() is actually just an alias of ADTECH.event('close'). */ advert.eventBus.addEventListener('close', this.utils.createClosure(this, this.closeHandler)); if (this.container.rendered) { this.renderEventHandler(); }else{ this.container.addEventListener('render', this.renderEventHandler, this); } /* * Want to wait until the DOM or the page has loaded? No problem! */ if (this.globalEventBus.pageLoaded) { this.pageLoadHandler(); } else { this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_LOAD, this.utils.createClosure(this, this.pageLoadHandler)); } //MRAID DEBUGGER if(win.mraid){ var t=this; var initMraid = function(){ var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); setTimeout(function(){ var curPos = mraid.getCurrentPosition(); var maxSize = mraid.getMaxSize(); var screenSize = mraid.getScreenSize(); t.container.div.style.position = 'absolute'; t.container.anchorDiv.style.width = '320px'; //maxSize.width+'px'; t.container.anchorDiv.style.height = '600px'; //maxSize.height+'px'; t.pageResizeHandler(); },1000); //mraid.setResizeProperties({offsetX:0,offsetY:0,width:320,height:0}); //mraid.resize(); setInterval(function(){ var curPos2 = mraid.getCurrentPosition(); // t.updateDBG(maxSize.height ); t.container.div.firstChild.style.top = -curPos2.y+'px'; },16); } if (mraid.getState() === 'loading') { mraid.addEventListener('ready', initMraid); } else { initMraid(); } }else{ this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_RESIZE,this.pageResizeHandler,this); this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_SCROLL,this.pageScrollHandler,this); this.globalEventBus.addEventListener(this.richMediaEvent.ORIENTATION_CHANGE,this.pageResizeHandler,this); } this.callPolicies('init'); var isShowing = false; this.isShowing = isShowing; }, setInAppDimensions:function(){ }, getViewportDims:function(){ var ret = {val:null}; if(this.callPolicies('getViewportDims', null, ret)){ return ret.val || this.utils.getViewportDims(); } return this.utils.getViewportDims(); }, getPageOffsets:function(){ var ret = {val:null}; if(this.callPolicies('getPageOffsets', null, ret)){ return ret.val || this.utils.getPageOffsets(); } return this.utils.getPageOffsets(); }, getYOffset:function(){ var ldims = this.getViewportDims(); var sdims = this.utils.getViewportDims(); return sdims.h - ldims.h; }, callPolicies: function (meth, args, ret) { if (!isS(args) || arguments.length == 1) args = [this]; var handled = false; for (var i = 0; i < this.policies.length; i++) { if (isS(this.policies[i])) { if (isS(this.policies[i][meth])) { var r = this.policies[i][meth].apply(this.policies[i], args); if(ret){ ret.val = r; } handled = true; } } } return handled; }, /********************************************************* * * Create your instance methods below. * * Please remember not to add a trailing comma to you last * method - IE will not like that! * *********************************************************/ renderEventHandler:function(){ this.header = this.container.div.appendChild(doc.createElement('div')); this.header.style.position = 'absolute'; this.header.style.left = '0px'; this.header.style.top = '0px'; this.header.style.width = '100%'; this.header.style.height = '14px'; this.header.style.lineHeight = '18px'; this.header.style.color = 'white'; this.header.style.textAlign = 'center'; this.header.style.backgroundColor = 'rgba(0,0,0,1)'; this.header.style.fontSize = '9.8px'; this.header.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.header.style.verticalAlign = 'middle'; this.header.style.opacity=1; this.header.innerHTML = "ADVERTISEMENT"; var t = this; this.footer = this.container.div.appendChild(doc.createElement('div')); this.footer.style.position = 'absolute'; this.footer.style.left = '0px'; this.footer.style.bottom = '0px'; this.footer.style.width = '100%'; this.footer.style.height = '13px'; this.footer.style.backgroundColor = 'rgba(0,0,0,1)'; this.footer.style.fontFamily = 'Helvetica, Arial, sans-serif'; this.footer.style.verticalAlign = 'middle'; this.footer.style.textAlign = 'center'; this.footer.style.fontSize = '9.5px'; this.footer.style.lineHeight = '13px'; this.footer.style.color = 'white'; this.footer.style.opacity=1; this.footer.innerHTML = "End of advertisement"; if(this.layer){ this.layer.render(); } /*if(this.top){ this.top.render(); } if(this.bottom){ this.bottom.render(); }*/ if(this.advert.getContent('initiallyStatic')){ this.container.content.containerObject2.style.position = 'absolute'; } var del = this.utils.createClosure(this,function(){this.pageResizeHandler();}); del(); setTimeout(del,25); setTimeout(del,50); setTimeout(del,100); setTimeout(function(){del();animSF(del)},35); setTimeout(function(){del();animSF(del)},150); animSF(del); this.lastOff = this.off = this.getPageOffsets(); this.pageScrollHandler(); this.callPolicies('render'); this.stoppedScrolling(); setTimeout(function(){t.stoppedScrolling()},100); setTimeout(function(){t.stoppedScrolling()},250); }, closeHandler: function() { /* * This will get invoked when the close event has been dispatched by any one * of your ad units. */ if(this.closed) return; this.closed = true; this.footer.style.opacity = 0; this.header.style.opacity = 0; var sp = 30,t=this; t.callPolicies('close'); window.requestAnimationFrame(function(){ //console.log('ANIM 1'); }); animSF(function(){ //console.log('ANIM 2'); var h = t.container.anchorDiv.clientHeight; if(this.slotHeight != 0){ h = this.slotHeight; } h = Math.max(0,(h-sp)); sp*=1.03; t.container.anchorDiv.style.height = h+'px'; t.container.anchorDiv.style.minHeight = h+'px'; t.container.div.style.height = h+'px'; t.container.div.style.clip = 'rect(auto, auto, auto, auto)'; t.callPolicies('closing',[t,h]); if(h>0) animSF(arguments.callee); }); }, pageLoadHandler: function() { // The page has now loaded. Feel free to display an awesome advert. }, pageResizeHandler:function(){ if(this.closed) return; if(win.mraid){ var screenSize = mraid.getScreenSize(); var dims = { w:this.container.anchorDiv.clientWidth, h:this.container.anchorDiv.clientHeight } var dims2 = {}; for(var i in dims){ dims2[i] = dims[i]; } if(this.slotHeight != 0){ dims.h = this.slotHeight; } var pos; if(this.container.anchorDiv.getBoundingClientRect){ var tmpPos = this.container.anchorDiv.getBoundingClientRect(); var off = this.getPageOffsets(); pos = {x:tmpPos.left+off.x,y:tmpPos.top+off.y}; }else{ pos = this.utils.calculateAbsolutePosition(this.container.anchorDiv); } /*var par = this.container.anchorDiv.parentNode; while(par){ if(par.style){ var pad = parseFloat(getComputedStyle(par,'paddingLeft')); var mar = parseFloat(getComputedStyle(par,'marginLeft')); if(!isNaN(mar)){ pad += mar; } if(!isNaN(pad)){ pos.x += pad; } } par = par.parentNode; }*/ //need policies //pos.x -= 15; this.callPolicies('processDims', [this,pos, dims]); this.abs = pos; this.abs.y -= this.getYOffset(); var changed = (!this.dims) ? true : false; for(var i in this.dims){ if(this.dims[i] != dims[i]){ changed = true; break; } } this.dims = dims; this.container.div.style.width = dims.w+'px'; this.container.div.style.height = dims.h+'px'; this.container.div.style.left = (-pos.x)+'px'; this.container.div.style.right = 'auto'; this.container.div.style.top = '0px'; this.container.anchorDiv.style.zIndex = 0xFFFFFF; if(this.container.content.contentObject.clientWidth>0){ if(this.header) this.header.style.minWidth = this.container.content.contentObject.clientWidth+'px'; if(this.footer) this.footer.style.minWidth = this.container.content.contentObject.clientWidth+'px'; } this.container.div.style.position = 'absolute'; this.container.div.style.overflow = 'hidden'; this.container.div.style.transfrom = 'translateZ(0)'; this.container.div.style.clipPath = 'inset(0px)'; this.container.div.style.clip = 'rect(0px, '+(dims.w)+'px'+', '+(screenSize.height)+'px'+', '+(-pos.x)+'px'+')'; var absPos = this.utils.calculateAbsolutePosition(this.container.div); this.container.content.containerObject2.style.width = dims.w+'px'; this.container.content.containerObject2.style.height = screenSize.height+'px'; this.container.content.containerObject2.style.position = 'fixed'; //this.container.content.contentObject.style.position = 'absolute'; this.container.content.containerObject2.style.top = '1px'; //this.container.content.containerObject2.style.left = absPos.x+'px'; //this.container.content.contentObject.style.zIndex = 1; this.container.content.containerObject2.style.transfrom = 'translateZ(0)'; //this.container.content.contentObject.style.display = 'none'; this.container.content.containerObject.style.position = 'absolute'; this.container.content.containerObject.style.left = '0px'; this.container.content.containerObject.style.right = '0px'; this.container.content.containerObject.style.top = '0px'; this.container.content.containerObject.style.bottom = '0px'; this.container.content.containerObject.style.overflow = 'hidden'; this.container.content.containerObject2.style.webkitTransform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.transform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.msTransform = 'translate3d(0,0,0)'; this.container.content.contentObject.style.width = dims.w+'px'; this.container.content.contentObject.style.height = screenSize.height+'px'; if(this.layer && this.layer.div){ this.layer.div.style.width = dims2.w+'px'; var t = this; var x = 0; !function(){ if(t.footer.clientHeight == 0 && x <= 25){ setTimeout(arguments.callee,100); x += 1; }else{ t.layer.div.style.height = (dims.h - (t.footer.clientHeight + t.header.clientHeight))+'px'; t.layer.div.style.top = t.header.clientHeight+'px'; t.layer.div.style.left = -pos.x+'px'; } }(); } //console.log("changed dims"); }else{ var dims = this.getViewportDims(); var dims2 = {}; for(var i in dims){ dims2[i] = dims[i]; } if(this.slotHeight != 0){ dims.h = this.slotHeight; } this.container.anchorDiv.style.minWidth = dims.w+'px'; this.container.anchorDiv.style.height = dims.h+'px'; this.container.anchorDiv.style.minHeight = dims.h+'px'; var pos; if(this.container.anchorDiv.getBoundingClientRect){ var tmpPos = this.container.anchorDiv.getBoundingClientRect(); var off = this.getPageOffsets(); pos = {x:tmpPos.left+off.x,y:tmpPos.top+off.y}; }else{ pos = this.utils.calculateAbsolutePosition(this.container.anchorDiv); } this.callPolicies('processDims', [this,pos, dims]); this.abs = pos; this.abs.y -= this.getYOffset(); var changed = (!this.dims) ? true : false; for(var i in this.dims){ if(this.dims[i] != dims[i]){ changed = true; break; } } if(changed){ this.dims = dims; this.container.div.style.width = dims.w+'px'; this.container.div.style.height = dims.h+'px'; this.container.div.style.left = (-pos.x)+'px'; this.container.div.style.right = 'auto'; this.container.div.style.top = '0px'; //this.container.anchorDiv.style.zIndex = 0xFFFFFF; if(this.container.content.contentObject.clientWidth>0){ if(this.header) this.header.style.minWidth = this.container.content.contentObject.clientWidth+'px'; if(this.footer) this.footer.style.minWidth = this.container.content.contentObject.clientWidth+'px'; } this.container.div.style.position = 'absolute'; this.container.div.style.overflow = 'hidden'; this.container.div.style.transfrom = 'translateZ(0)'; this.container.div.style.clipPath = 'inset(0px)'; this.container.div.style.clip = 'rect(0px, '+(dims.w)+'px'+', '+(dims.h)+'px'+', '+(-pos.x)+'px'+')'; var absPos = this.utils.calculateAbsolutePosition(this.container.div); this.container.content.containerObject2.style.width = dims2.w+'px'; this.container.content.containerObject2.style.height = (dims2.h+2)+'px'; this.container.content.containerObject2.style.position = 'fixed'; this.container.content.containerObject2.style.top = '1px'; this.container.content.containerObject2.style.transfrom = 'translateZ(0)'; this.container.content.containerObject.style.position = 'absolute'; this.container.content.containerObject.style.left = '0px'; this.container.content.containerObject.style.right = '0px'; this.container.content.containerObject.style.top = '0px'; this.container.content.containerObject.style.bottom = '0px'; this.container.content.containerObject.style.overflow = 'hidden'; this.container.content.containerObject2.style.webkitTransform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.transform = 'translate3d(0,0,0)'; this.container.content.containerObject2.style.msTransform = 'translate3d(0,0,0)'; this.container.content.contentObject.style.width = dims2.w+'px'; this.container.content.contentObject.style.height = (dims2.h+2)+'px'; if(this.layer && this.layer.div){ this.layer.div.style.width = dims2.w+'px'; var t = this; var x = 0; !function(){ if(t.footer.clientHeight == 0 && x <= 25){ setTimeout(arguments.callee,100); x += 1; }else{ t.layer.div.style.height = (dims.h - (t.footer.clientHeight + t.header.clientHeight))+'px'; t.layer.div.style.top = t.header.clientHeight+'px'; t.layer.div.style.left = -pos.x+'px'; } }(); } if(this.top && this.bottom){ var t = this; var x = 0; !function(){ if(!t.top.div && x <= 25){ setTimeout(arguments.callee,100); x += 1; }else if(t.top.div != 0 && t.bottom.div !=0){ t.top.div.style.width = '100%'; t.top.div.style.position = 'absolute'; t.top.div.style.clip = 'auto'; t.top.div.style.top = '0px' t.top.div.style.left = dims.x+'px'; t.top.div.style.zIndex = 1; t.top.content.contentObject.style.height = '100%'; t.top.content.contentObject.style.width = '100%'; }else{ //console.log('not ready yet') } }(); } } } this.callPolicies('pageResize'); }, pageScrollHandler:function(){ if(this.closed) return; if(this.cancelHandle){ this.cancelHandle = false; return; } this.isScrolling = true; /*if(!this.isAutoScrolling && this.isUnLocked){ //this.clearAni(); }*/ var sdim = this.getViewportDims(); var off = this.getPageOffsets(); this.lastOff = this.off; this.off = off; var relOff = off.y-this.abs.y; var relOffA = Math.abs(relOff); var elmTop = this.abs.y; var elmBottom = this.abs.y+this.container.div.clientHeight; var windowTop = off.y; var windowBottom = windowTop+sdim.h; var totalHeight = Math.max(elmBottom, windowBottom) - Math.min(elmTop, windowTop); var wComp = totalHeight - sdim.h; var elementPx = this.container.div.clientHeight - wComp; var elementPercentage = Math.min(Math.max(0,((elementPx)/this.container.div.clientHeight)*100),100) if(elementPercentage < 1){ if(this.isShowing == false){ this.isShowing = true; this.outHandler(); } }else{ if(this.isShowing == true){ this.isShowing = false; this.inHandler(); } } this.advert.eventBus.dispatchEvent(new this.richMediaEvent('updatePercentage').property('perc', elementPercentage)); if(this.container.content.containerObject2.style.position != 'fixed') this.container.content.containerObject2.style.position = 'fixed'; clearTimeout(this.stopScrlTmo); this.stopScrlTmo = setTimeout(this.utils.createClosure(this,function(){ this.pageResizeHandler(); this.stoppedScrolling(); }),230); this.pageResizeHandler(); if(relOffA<260){ /*if(off.y>this.abs.y && this.off.y>this.lastOff.y){ this.container.div.style.top = (relOff)+'px'; this.container.div.style.height = (this.dims.h+(relOffA))+'px'; }else if(off.ythis.abs.y+relOffA+this.dims.h){ ////console.log("reset"); //this.container.div.style.top = '0px'; //this.container.div.style.height = (this.dims.h)+'px'; } this.callPolicies('pageScroll'); var browser = window.navigator.userAgent; var msie = browser.indexOf('MSIE '); var trident = browser.indexOf('Trident/'); var edge = browser.indexOf('Edge/'); var t=this; if(msie > 0 || trident > 0 || edge > 0){ t.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' t.container.content.containerObject.offsetHeight t.container.content.containerObject.style.cssText += ';transform:none' this.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' this.container.content.containerObject.offsetHeight this.container.content.containerObject.style.cssText += ';transform:none' setTimeout(function(){ t.container.content.containerObject.style.cssText += ';transform:rotateZ(0deg)' t.container.content.containerObject.offsetHeight t.container.content.containerObject.style.cssText += ';transform:none' }(),4000) } }, stoppedScrolling:function(){ if(this.closed) return; this.isScrolling = false; var off = this.getPageOffsets(); var sdim = this.getViewportDims(); var relOff = off.y-this.abs.y; ////console.log(relOff+' '+off.y+' '+this.abs.y); var relOffA = Math.abs(relOff); if(relOffA<150){ this.advert.eventBus.dispatchEvent('allMostInScrollPosition'); clearTimeout(this.scrollAniTmo); if(((this.abs.y<150 && off.y>150) || this.abs.y>=150)){ this.scrollSpeed = relOffA*.13; this.isAutoScrolling = true; this.scrollAniTmo = setTimeout(this.utils.createClosure(this,function(){this.handleScrollAni()}),20); this.isInScrollPosition = true; clearTimeout(this.inScrollTmo); }else{ if((sdim.h-relOffA)/sdim.h>.99){ this.advert.eventBus.dispatchEvent('inScrollPosition'); this.beenInScrollPosition = true; if(this.advert.getContent('initiallyStatic')){ this.container.content.containerObject2.style.position = 'fixed'; } } } }else if(relOffA/2<=sdim.h*.6){ this.advert.eventBus.dispatchEvent(new this.richMediaEvent('partlyInView').property('perc',(sdim.h-relOffA)/sdim.h).property("fromTop",relOff<0)); this.inScrollTmo = setTimeout(this.utils.createClosure(this,function(){this.isInScrollPosition = false;}),15); }else{ this.advert.eventBus.dispatchEvent('outOffScrollPosition'); this.inScrollTmo = setTimeout(this.utils.createClosure(this,function(){this.isInScrollPosition = false;}),15); } this.callPolicies('stoppedScrolling'); }, handleScrollAni:function(){ var off = this.getPageOffsets(); var spd = Math.max(2.5,this.scrollSpeed); var relOff = off.y-this.abs.y; if(relOff>0){ spd*=-1; } var relOffA = Math.abs(relOff); if(relOffA>150){ return; } var res = off.y+spd; if(relOffA<=2){ res = this.abs.y; } if(relOff>0 && resthis.abs.y){ res = this.abs.y; } var del = this.utils.createClosure(this,function(){if(!this.callPolicies('updateScroll',[this, res])){win.scrollTo(0,res);}}); if(res != this.abs.y){ clearTimeout(this.scrollAniTmo); this.container.content.containerObject2.style.position = 'fixed'; this.scrollAniTmo = setTimeout(this.utils.createClosure(this,function(){this.handleScrollAni()}),20); }else{ this.advert.eventBus.dispatchEvent('inScrollPosition'); this.isInScrollPosition = true; this.beenInScrollPosition = true; //this.container.content.contentObject.style.position = 'absolute'; setTimeout(function(){del();animSF(del)},5); this.isAutoScrolling = false; } del(); this.scrollSpeed*=.95; this.callPolicies('handleScrollAni'); }, inHandler: function () { this.bottom.hide(); this.isOut = false; }, outHandler: function () { this.isOut = true; this.showLayer(); var t=this; var del = function(){ if(!t.bottom.div){ setTimeout(del,5); return; } t.bottom.div.style.opacity=0; t.bottom.div.style.transitionDelay = '1s'; t.bottom.div.style.webkitTransitionDelay = '1s'; t.bottom.div.style.msTransitionDelay= '1s'; t.bottom.div.style.oTransitionDelay= '1s'; t.bottom.div.style.mozTransitionDelay = '1s'; t.bottom.div.style.transitionDuration = '.3s'; t.bottom.div.style.webkitTransitionDuration = '.3s'; t.bottom.div.style.msTransitionDuration = '.3s'; t.bottom.div.style.oTransitionDuration = '.3s'; t.bottom.div.style.mozTransitionDuration = '.3s'; t.bottom.div.style.transitionProperty = 'opacity'; t.bottom.div.style.webkitTransitionProperty = 'opacity'; t.bottom.div.style.msTransitionProperty = 'opacity'; t.bottom.div.style.oTransitionProperty = 'opacity'; t.bottom.div.style.mozTransitionProperty = 'opacity'; t.bottom.div.style.width = dims.w+'px'; t.bottom.div.style.height = '100px'; t.bottom.div.style.position = 'fixed'; t.bottom.div.style.bottom = '0' t.bottom.div.style.top = 'initial'; t.bottom.div.style.left = '0px' t.bottom.div.style.zIndex = 0xFFFFFFF; t.bottom.div.style.clip = 'auto'; t.bottom.content.contentObject.style.height = '100px'; t.bottom.content.contentObject.style.width = '100%'; setTimeout(function(){ t.bottom.div.style.opacity=1; },35); } del(); }, showLayer:function(){ var dims = this.container.div.getBoundingClientRect(); if(dims.top < 0){ if(this.isOut){ this.bottom.show(); }else{ this.bottom.hide(); } }else{ if(this.isOut){ this.bottom.hide(); } } }, }; targetWindow.adtechCallbackInstances = targetWindow.adtechCallbackInstances || []; var instanceIndex = targetWindow.adtechCallbackInstances.length; targetWindow.adtechCallbackInstances[instanceIndex] = new targetWindow.com.adtech.AdtechCustomAd$AD_ID$(); targetWindow.adtechAdCallbacks = targetWindow.adtechAdCallbacks || {}; targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid] = targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid] || []; targetWindow.adtechAdCallbacks[adConfig.adServerVars.uid].push( targetWindow.adtechCallbackInstances[instanceIndex]); })(adtechAdConfig); (function (D) { if (!D.initOverride) { var B = "https://richmedia.cdnservices.net/adtech/lib/"; var H = (D.mraidCompatible) ? "MRAID" : ""; var F = B + "adtechRichMediaLib" + H + "_3_3_0.js"; D.rmLibUrl = F; if (!window.adtechAdManager_3_3_0) { adtechAdQueue = window.adtechAdQueue || []; adtechAdQueue.push(D); if (!window.adtechAdManagerReqs || !window.adtechAdManagerReqs["3_3_0"]) { adtechAdManagerReqs = window.adtechAdManagerReqs || {}; adtechAdManagerReqs["3_3_0"] = true; var A = "scr"; document.write("<" + A + 'ipt type="text/javascript" src="' + F + '">"); } } else { adtechAdManager_3_3_0.registerAd(D); } } })(adtechAdConfig);