var com = window.com || {};
if(!window.com){
window.com = com;
};
try{
}catch(e){debugger;}
var adtechAdConfig = {
"canvasId": 424941,
"liveStatsEnabled": false,
"servicesUrl": "",
"dynamic": false,
"templateId": 422665,
"productFamilyId": 0,
"formatId": 4,
"servicesHosts": {
"http": "",
"https": "",
"post": ""
},
"adServerVars": {
"uid": "1587390904426",
"id": "424941",
"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\/3366c4ba4c5d9b491879176d7db0def0\/",
"configBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/3366c4ba4c5d9b491879176d7db0def0\/",
"assetBaseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/3366c4ba4c5d9b491879176d7db0def0\/",
"baseURL": "https:\/\/richmedia.cdnservices.net\/adtech\/assets\/3366c4ba4c5d9b491879176d7db0def0\/",
"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": "floatingDiv",
"width": 1,
"height": 1,
"contentWidth": 1,
"contentHeight": 1,
"contentWidthUnit": "px",
"contentHeightUnit": "px",
"xRel": "pageLeft",
"yRel": "pageTop",
"x": 200,
"y": 100,
"renderEvent": "serve",
"content": "index.html",
"contentType": "html",
"zIndex": 26001,
"wmode": "transparent",
"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.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"backupImageClickthrough": {
"id": 7703,
"plid": "4d2c2cef5973417f3f03adc213a06d6d",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"gallery1": {
"id": 0,
"plid": "5cf15bfa5dca33db849912742279024f",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"gallery2": {
"id": 0,
"plid": "79247751851b4aea125ffa2a966780d2",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"gallery3": {
"id": 0,
"plid": "f777956013129a1703e41fcd7332ce05",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"shop1": {
"id": 0,
"plid": "8ed5f0600c61dc6189bf0f41a14b60ba",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"shop2": {
"id": 0,
"plid": "bbbf3c4532824edd343e5b5bec07bada",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"shop3": {
"id": 0,
"plid": "687f433c1981fe00b1cfbd5b8f8e3a64",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"social": {
"id": 0,
"plid": "f9d4b5784aa1426a4ef3ef5bf234ca67",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
},
"main": {
"id": 1,
"plid": "37f1f67addb076058db521478e783928",
"dest": "https:\/\/www.rai.it\/raicinema\/",
"target": "_blank",
"features": ""
}
},
"contentVariables": {
"QRUrl": ""
},
"contentProperties": [],
"adrConfig": {
"eventEndpoint": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}"
},
"dataFeeds": [],
"screenGrabs": [],
"polls": [],
"assets": [
{
"id": null,
"name": "code.js",
"url": "code.js"
},
{
"id": null,
"name": "close_btn.png",
"url": "close_btn.png"
},
{
"id": null,
"name": "customAd.js",
"url": "customAd.js"
},
{
"id": null,
"name": "1x1.gif",
"url": "1x1.gif"
},
{
"id": null,
"name": "style.css",
"url": "style.css"
},
{
"id": null,
"name": "facebook.png",
"url": "facebook.png"
},
{
"id": null,
"name": "gallery.png",
"url": "gallery.png"
},
{
"id": null,
"name": "pause.png",
"url": "pause.png"
},
{
"id": null,
"name": "play.png",
"url": "play.png"
},
{
"id": null,
"name": "chiudi.jpg",
"url": "chiudi.jpg"
},
{
"id": null,
"name": "dragdealer.css",
"url": "dragdealer.css"
},
{
"id": null,
"name": "dragdealer.js",
"url": "dragdealer.js"
},
{
"id": null,
"name": "action.png",
"url": "action.png"
},
{
"id": null,
"name": "gallery.html",
"url": "gallery.html"
},
{
"id": null,
"name": "shop.html",
"url": "shop.html"
},
{
"id": null,
"name": "productsheet.html",
"url": "productsheet.html"
},
{
"id": null,
"name": "trailer.png",
"url": "trailer.png"
},
{
"id": null,
"name": "product_image1.jpg",
"url": "product_image1.jpg"
},
{
"id": null,
"name": "product_image2.jpg",
"url": "product_image2.jpg"
},
{
"id": null,
"name": "product_image3.jpg",
"url": "product_image3.jpg"
},
{
"id": null,
"name": "panel_gallery_shop.jpg",
"url": "panel_gallery_shop.jpg"
},
{
"id": null,
"name": "panel_gallery_product.jpg",
"url": "panel_gallery_product.jpg"
},
{
"id": null,
"name": "panel_gallery.jpg",
"url": "panel_gallery.jpg"
},
{
"id": null,
"name": "gallery_image1.jpg",
"url": "gallery_image1.jpg"
},
{
"id": null,
"name": "gallery_image2.jpg",
"url": "gallery_image2.jpg"
},
{
"id": null,
"name": "gallery_image3.jpg",
"url": "gallery_image3.jpg"
},
{
"id": null,
"name": "startscreen.jpg",
"url": "startscreen.jpg"
},
{
"id": null,
"name": "actionscreen.png",
"url": "actionscreen.png"
},
{
"id": null,
"name": "ArrowLeft_hover.png",
"url": "ArrowLeft_hover.png"
},
{
"id": null,
"name": "ArrowLeft.png",
"url": "ArrowLeft.png"
},
{
"id": null,
"name": "ArrowRight_hover.png",
"url": "ArrowRight_hover.png"
},
{
"id": null,
"name": "ArrowRight.png",
"url": "ArrowRight.png"
},
{
"id": null,
"name": "shop.png",
"url": "shop.png"
},
{
"id": null,
"name": "video.mp4",
"url": "video.mp4"
},
{
"id": null,
"name": "mute.png",
"url": "mute.png"
},
{
"id": null,
"name": "unmute.png",
"url": "unmute.png"
},
{
"id": "main",
"name": "index.html",
"url": "index.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": "c10258071c4eeb2cfe7888cdddf2c3e7",
"name": "close",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "7f0b290802215582ce37ccee46549ad7",
"name": "expand",
"cumulative": true,
"interaction": false,
"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": "ae171a84675cdec5a7665ad78e9d2bdc",
"name": "Video Play",
"cumulative": true,
"interaction": false,
"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": true,
"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": true,
"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": false,
"custom": true,
"video": true,
"isLoggable": true
},
{
"id": 0,
"plid": "77e17c385c650d4b0ad578dbca2249ba",
"name": "Video Fullscreen",
"cumulative": true,
"interaction": false,
"custom": true,
"video": true,
"isLoggable": true
},
{
"id": 0,
"plid": "3957203146c5904a87a161e7c9b4ec06",
"name": "Show top panel",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "21ba7923ddf7426d0b574c6ce3191e50",
"name": "Show right panel",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "810b9e3f7336b6fa7cccb0e587206f7e",
"name": "Right chiudi",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "e6f434bba1ebe656017766c19b3dfa70",
"name": "Left chiudi",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "775825f5b6cede7da0468e838fdd7900",
"name": "Top chiudi",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "23b28402953854c38c7870264d29eb5e",
"name": "toppanel: Previous image",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "652d0674a9dd4f7e383cd55ad4c38db2",
"name": "toppanel: Next image",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "df03f4d52d350632df4cd86552218b4c",
"name": "leftpanel: Previous Product Sheet",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "35314089c198ce12495a6e0983e3d2e2",
"name": "leftpanel: Next Product Sheet",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "e3e1b3c95d537ae3bc92bf94e10f38a5",
"name": "toppanel: Previous Product",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "79324ff1c4fe33d4d4c6dd0e0fca536c",
"name": "rightpanel: Next Product",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 0,
"plid": "fc25c7d76f8379632ee17a507f1f0907",
"name": "autoClose",
"cumulative": true,
"interaction": false,
"custom": true,
"video": false,
"isLoggable": true
},
{
"id": 1,
"plid": "58aca193545b7b63956a7162fbef3df9",
"name": "userPressedPlay",
"cumulative": false,
"interaction": true,
"custom": true,
"video": false,
"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"
}
],
"eventHandlers": [
{
"name": "expand",
"target": "main",
"source": "main",
"action": "expand"
},
{
"name": "autoExpand",
"target": "main",
"source": "*",
"action": "expand"
},
{
"name": "contract",
"target": "main",
"source": "main",
"action": "contract"
},
{
"name": "close",
"target": "main",
"source": "main",
"action": "close"
}
],
"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=5cf15bfa5dca33db849912742279024f",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=5cf15bfa5dca33db849912742279024f",
"onEvent": "SPECIFIC_CLICK",
"eventName": "gallery1"
},
{
"id": 4,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=79247751851b4aea125ffa2a966780d2",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=79247751851b4aea125ffa2a966780d2",
"onEvent": "SPECIFIC_CLICK",
"eventName": "gallery2"
},
{
"id": 5,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=f777956013129a1703e41fcd7332ce05",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=f777956013129a1703e41fcd7332ce05",
"onEvent": "SPECIFIC_CLICK",
"eventName": "gallery3"
},
{
"id": 6,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=8ed5f0600c61dc6189bf0f41a14b60ba",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=8ed5f0600c61dc6189bf0f41a14b60ba",
"onEvent": "SPECIFIC_CLICK",
"eventName": "shop1"
},
{
"id": 7,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=bbbf3c4532824edd343e5b5bec07bada",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=bbbf3c4532824edd343e5b5bec07bada",
"onEvent": "SPECIFIC_CLICK",
"eventName": "shop2"
},
{
"id": 8,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=687f433c1981fe00b1cfbd5b8f8e3a64",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=687f433c1981fe00b1cfbd5b8f8e3a64",
"onEvent": "SPECIFIC_CLICK",
"eventName": "shop3"
},
{
"id": 9,
"type": "1_PIXEL",
"url": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=f9d4b5784aa1426a4ef3ef5bf234ca67",
"secureUrl": "https:\/\/delivery.adnuntius.com\/u?rt={{{rt}}}&customType=f9d4b5784aa1426a4ef3ef5bf234ca67",
"onEvent": "SPECIFIC_CLICK",
"eventName": "social"
},
{
"id": 10,
"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": 11,
"type": "1_PIXEL",
"url": "",
"secureUrl": "",
"onEvent": "SPECIFIC_EVENT",
"eventName": "viewableImpression"
}
],
"contentHubConfig": {
"mapping": [],
"assets": []
},
"defaultClick": "backupImageClickthrough"
};
/*debugger;*/
if(window.adtechAdConfig){
if(window.adtechAdConfig.clickthroughs && window.adtechAdConfig.clickthroughs["backupImageClickthrough"] && window.adtechAdConfig.clickthroughs["backupImageClickthrough"].dest && window.adtechAdConfig.clickthroughs["backupImageClickthrough"].dest.length>0){
for(var i in window.adtechAdConfig.clickthroughs){
if(i == "backupImageClickthrough"){
continue;
}
if(window.adtechAdConfig.clickthroughs[i].dest.length == ""){
window.adtechAdConfig.clickthroughs[i].dest = window.adtechAdConfig.clickthroughs["backupImageClickthrough"].dest;
}
}
}
}
;
/**
* Boilerplate code required to hook into the ADTECH rich media library.
*
* For API documentation, please contact canvas-help@adtech.com
*/
adtechAdConfig.assetContainers.main.isExpandable = true;
(function(adConfig) {
var requiresBreakout = false;
var targetIsFriendly = false;
if(adConfig.pubVars && adConfig.pubVars.clickRedirect){
//adConfig.pubVars.clickRedirect = unescape(adConfig.pubVars.clickRedirect);
}
if(adConfig.pubVars.clickRedirect && adConfig.pubVars.clickRedirect.length>0 && adConfig.clickthroughs.main && adConfig.clickthroughs.main.dest){
var adnxClkTests = [/https:\/\/console\.appnexus\.com\/creative\/click-redir\/\+d\?click=/,/https%3A%2F%2Fconsole\.appnexus\.com%2Fcreative%2Fclick-redir%2F\d+%3Fclick%3D/];
var shouldAddExtraEncode = false;
for(var i=0;i";
xDebug = mess;
this.dbg.innerHTML = xDebug;
};
this.updateDBG.bind(this);
this.updateDBG(self.location.href);*/
// Attempt to break out only in a non-MRAID environment.
if (!window.mraid) {
// Check for global property to set the target display window creative override.
// This is used by the CRAFT Preview Service.
if (typeof window.adtechDisplayWindowTarget === 'object') {
adConfig.overrides = adConfig.overrides || {};
adConfig.overrides.displayWindowTarget = window.adtechDisplayWindowTarget;
}
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;
}
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 || {};
var win = targetWindow, doc=win.document;
targetWindow.com.adtech.AdtechCustomAd$AD_ID$ = function() {
// Custom code class constructor.
};
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;
},
init: function(advert) {
if (!advert.richView) {
advert.dispatchEvent('close');
// 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.container = this.advert.getAssetContainer("main");
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.advert.eventBus.addEventListener("close2", this.utils.createClosure(this, this.closeHandler));
this.advert.eventBus.addEventListener("close3", this.utils.createClosure(this, this.closeHandler));
/*
* 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));
advert.eventBus.addEventListener('autoClose',
this.utils.createClosure(this, this.closeHandler));
if (this.container.rendered) {
this.renderHandler();
} else {
this.container.addEventListener('render', this.utils.createClosure(this, this.renderHandler));
}
/*
* 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));
}
this.globalEventBus.addEventListener(this.richMediaEvent.PAGE_RESIZE,
this.utils.createClosure(this, this.handleResize));
},
/*********************************************************
*
* Create your instance methods below.
*
* Please remember not to add a trailing comma to you last
* method - IE will not like that!
*
*********************************************************/
closeHandler: function() {
var Q = d = doc;
var O = Q.documentElement;
var M = d.body;
//var R = M.appendChild(Q.createElement("span"));
//R.style.color = "red";
try {
// R.innerHTML = "close1 " + window.mraid.getState()
}
catch (P) {}
if(!!window.mraid){
try {
mraid.close()
}
catch (P) {}
var N = setInterval(function() {
try {
//R = M.appendChild(Q.createElement("span"));
//R.style.color = "red";
//M.innerHTML = "close2 " + window.mraid.getState() + " " + mraid.close + "
";
if (!(window.mraid.getState() == "default" || window.mraid.getState() == "expanded" || window.mraid.getState() == "resized")) {
clearInterval(N); }
else {
mraid.close()
}
}
catch (S) {}
},
50);
}
this.advert.close();
this.container.close();
/*O.style.display = "none";
M.style.display = "none";
O.style.backgroundColor = "transparent";
M.style.backgroundColor = "transparent";*/
O.style.overflow = "auto";
M.style.overflow = "auto";
if(this.container.anchorDiv && this.container.anchorDiv.parentNode){
this.container.anchorDiv.parentNode.removeChild(this.container.anchorDiv);
}
},
renderHandler: function() {
var t = this;
var d = doc;
var b = d.body;
var h = d.documentElement;
if(adConfig.mraidCompatible){
b.style.width = '100%';
b.style.height = '100%';
h.style.width = '100%';
h.style.height = '100%';
this.advert.reportEvent('mraidIsVisible');
}else{
this.handleResize();
}
var del = function(){
t.container.anchorDiv.style.display = 'inline-block';
/*t.container.anchorDiv.style.right = '0px';
t.container.anchorDiv.style.bottom = '0px';*/
t.container.anchorDiv.style.width = '100%';
t.container.anchorDiv.style.height = '100%';
t.container.anchorDiv.style.zIndex = 1;
//t.container.anchorDiv.style.minWidth = '1024px';
//t.container.anchorDiv.style.minHeight = '768px';
t.container.anchorDiv.style.left = '0px';
t.container.anchorDiv.style.top = '0px';
t.container.div.style.width = '100%';
t.container.div.style.top = '0px';
t.container.div.style.left = '0px';
t.container.div.style.position = 'fixed';
t.container.div.style.zIndex = 0xFFFFFFF;
t.container.div.style.clip = 'unset';
t.container.div.style.minWidth = '100%';
t.container.div.style.minHeight = '100%';
t.container.div.style.height = '100%';
t.container.content.contentObject.width = '100%';
t.container.content.contentObject.height = '100%';
t.container.content.contentObject.style.width = '100%';
t.container.content.contentObject.style.height = '100%';
if(!adConfig.mraidCompatible){
t.container.anchorDiv.style.zIndex = 1;
if(t.utils.canUseFixedPositioning())
t.container.anchorDiv.style.position = 'fixed';
win.scrollTo(0,0);
b.style.overflow = 'hidden';
h.style.overflow = 'hidden';
t.handleResize();
var xdel = function(){
t.handleResize();;
}
/* xdel();
for(var i=0;i<1200;i+=3){
setTimeout(xdel,i+10);
}
setTimeout(xdel,25);
setTimeout(xdel,50);
setTimeout(xdel,100);
setTimeout(xdel,150);
setTimeout(xdel,250);
setTimeout(xdel,1000);*/
}
};
del();
//setTimeout(del,50);
//setTimeout(del,150);
},
pageLoadHandler: function() {
// The page has now loaded. Feel free to display an awesome advert.
},
handleResize:function(){
}
};
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 + '">' + A + "ipt>");
}
} else {
adtechAdManager_3_3_0.registerAd(D);
}
}
})(adtechAdConfig);