Tagging = function(context) {
  this.site = '24hu-sokszinuvidek';
  this.zone = 'default';
  this.protocol = window.location.protocol;
  this.autodetect_url = this.protocol + '//cts.p24.hu/service/detect/';
  this.context = context;
  this.positions = {};
  this.positions_weighted = {};

  this.positions['head'] = '[{\"service_name\": \"Sanoma\", \"weight\": null, \"source\": \"<script src=\\"//stat.p24.hu/mobile_detect/mobile_detect.js\\"></script>\"}, {\"service_name\": \"Sanoma\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//ad-blacklist.p24.hu/adx_blacklist.js\\"></script><script type=\\"text/javascript\\" src=\\"//ad-blacklist.p24.hu/rubicon_blacklist.js\\"></script><script type=\\"text/javascript\\">    (function(){        var blacklistsToCheck = [\'ADX\', \'RUBICON\'];        for (var i=0; i<blacklistsToCheck.length; i++) {            var typeName = blacklistsToCheck[i].charAt(0) + blacklistsToCheck[i].substr(1).toLowerCase();            window[\'no\' + blacklistsToCheck[i]] = false;            if (                typeof window[\'blck\' + typeName] != \'undefined\' &&                typeof window[\'blck\' + typeName][window.location.hostname] != \'undefined\' &&                window[\'blck\' + typeName][window.location.hostname].indexOf(location.pathname) >= 0            ) {                window[\'no\' + blacklistsToCheck[i]] = true;            }        }    })();</script>\"}, {\"service_name\": \"CMP\", \"weight\": null, \"source\": \"<!-- Quantcast Choice. Consent Manager Tag v2.0 (for TCF 2.0) --><script type=\\"text/javascript\\" async=true>(function() {  var host =  \'24.hu\' || window.location.hostname;  var element = document.createElement(\'script\');  var firstScript = document.getElementsByTagName(\'script\')[0];  var url = \'https://quantcast.mgr.consensu.org\'    .concat(\'/choice/\', \'ZWemmHq85Y1fR\', \'/\', host, \'/choice.js\');  var uspTries = 0;  var uspTriesLimit = 3;  element.async = true;  element.type = \'text/javascript\';  element.src = url;  firstScript.parentNode.insertBefore(element, firstScript);  function makeStub() {    var TCF_LOCATOR_NAME = \'__tcfapiLocator\';    var queue = [];    var win = window;    var cmpFrame;    function addFrame() {      var doc = win.document;      var otherCMP = !!(win.frames[TCF_LOCATOR_NAME]);      if (!otherCMP) {        if (doc.body) {          var iframe = doc.createElement(\'iframe\');          iframe.style.cssText = \'display:none\';          iframe.name = TCF_LOCATOR_NAME;          doc.body.appendChild(iframe);        } else {          setTimeout(addFrame, 5);        }      }      return !otherCMP;    }    function tcfAPIHandler() {      var gdprApplies;      var args = arguments;      if (!args.length) {        return queue;      } else if (args[0] === \'setGdprApplies\') {        if (          args.length > 3 &&          args[2] === 2 &&          typeof args[3] === \'boolean\'        ) {          gdprApplies = args[3];          if (typeof args[2] === \'function\') {            args[2](\'set\', true);          }        }      } else if (args[0] === \'ping\') {        var retr = {          gdprApplies: gdprApplies,          cmpLoaded: false,          cmpStatus: \'stub\'        };        if (typeof args[2] === \'function\') {          args[2](retr);        }      } else {        queue.push(args);      }    }    function postMessageEventHandler(event) {      var msgIsString = typeof event.data === \'string\';      var json = {};      try {        if (msgIsString) {          json = JSON.parse(event.data);        } else {          json = event.data;        }      } catch (ignore) {}      var payload = json.__tcfapiCall;      if (payload) {        window.__tcfapi(          payload.command,          payload.version,          function(retValue, success) {            var returnMsg = {              __tcfapiReturn: {                returnValue: retValue,                success: success,                callId: payload.callId              }            };            if (msgIsString) {              returnMsg = JSON.stringify(returnMsg);            }            event.source.postMessage(returnMsg, \'*\');          },          payload.parameter        );      }    }    while (win) {      try {        if (win.frames[TCF_LOCATOR_NAME]) {          cmpFrame = win;          break;        }      } catch (ignore) {}      if (win === window.top) {        break;      }      win = win.parent;    }    if (!cmpFrame) {      addFrame();      win.__tcfapi = tcfAPIHandler;      win.addEventListener(\'message\', postMessageEventHandler, false);    }  };  makeStub();  var uspStubFunction = function() {    var arg = arguments;    if (typeof window.__uspapi !== uspStubFunction) {      setTimeout(function() {        if (typeof window.__uspapi !== \'undefined\') {          window.__uspapi.apply(window.__uspapi, arg);        }      }, 500);    }  };  var checkIfUspIsReady = function() {    uspTries++;    if (window.__uspapi === uspStubFunction && uspTries < uspTriesLimit) {      console.warn(\'USP is not accessible\');    } else {      clearInterval(uspInterval);    }  };  if (typeof window.__uspapi === \'undefined\') {    window.__uspapi = uspStubFunction;    var uspInterval = setInterval(checkIfUspIsReady, 6000);  }})();</script><!-- End Quantcast Choice. Consent Manager Tag v2.0 (for TCF 2.0) -->\"}, {\"service_name\": \"Gemius Traffic\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\">    var properGemId = (\'${gemius_trackid}\' != \'\' ? \'${gemius_trackid}\' : \'d1A1jw8aFZgY3VH3GOZuz7e_XfywBEcIHyVyJ0Bgr0b.s7\');        if(typeof _ceDeviceDetect.getDeviceType() !== \'undefined\' && _ceDeviceDetect.getDeviceType() != \'desktop\' && \'0ifq_KrFGx1vd4VAA7NkkKbk7MngUmvn7FD4pTzYvf..W7\' != \'\') {        properGemId = \'0ifq_KrFGx1vd4VAA7NkkKbk7MngUmvn7FD4pTzYvf..W7\';    }       var pp_gemius_identifier = properGemId;    function gemius_pending(i) { window[i] = window[i] || function() {var x = window[i+\'_pdata\'] = window[i+\'_pdata\'] || []; x[x.length]=arguments;};};    gemius_pending(\'gemius_hit\'); gemius_pending(\'gemius_event\'); gemius_pending(\'pp_gemius_hit\'); gemius_pending(\'pp_gemius_event\');    (function(d,t) {try {var gt=d.createElement(t),s=d.getElementsByTagName(t)[0],l=\'http\'+((location.protocol==\'https:\')?\'s\':\'\'); gt.setAttribute(\'async\',\'async\');    gt.setAttribute(\'defer\',\'defer\'); gt.src=l+\'://gahu.hit.gemius.pl/xgemius.js\'; s.parentNode.insertBefore(gt,s);} catch (e) {}})(document,\'script\');</script>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<script>    if (typeof _ceDeviceDetect != \'undefined\' && typeof _ceDeviceDetect.getDeviceType == \'function\') {        var _ceDisplayData = _ceDisplayData || {},            googletag,            loader = function (multipleAds) {                _ceDisplayData.gpt = _ceDisplayData.gpt || { items: [], defContName: \'div-gpt-ad\' };                (function () {                    var scriptInserter = document.createElement(\'script\');                    scriptInserter.src = \'https://www.googletagservices.com/tag/js/gpt.js\';                    scriptInserter.async = true;                    /*document.head.appendChild(scriptInserter);*/                    document.head.insertBefore(scriptInserter, document.head.firstChild);                })();                if (multipleAds) {                    googletag = {};                    googletag.cmd = [];                } else {                    googletag = googletag || {};                    googletag.cmd = googletag.cmd || [];                }                googletag.cmd.push(function () {                    googletag.pubads().enableSingleRequest();                    googletag.pubads().collapseEmptyDivs();                    googletag.enableServices();                });            };        loader();        window.addEventListener(\'_ceDisplayDataLoadHeader\', loader);    }</script>\"}, {\"service_name\": \"Sanoma/Hir24\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//stat.p24.hu/CTS/measuring-codes/24.main.min.js?t=20210616\\"></script>\"}, {\"service_name\": \"Sanoma\", \"weight\": null, \"source\": \"<script src=\\"//stat.p24.hu/CTS/helper-scripts/subscriptionDetect/subscriptionDetect.min.js\\"></script><script>    var _ceSubscriptionDetect = new subscriptionDetect(\'${subscription_config}\');</script>\"}, {\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<script>(function () {    var userdbId = \\"${adveritcum_customtarget_userdbId}\\" || 74,        confObj = {\'hasRightCol\':\'jobbhasab\',\'campaignParam\':\'campaignParam\',\'darkMode\':\'darkMode\'} || {},        replaceAccents = function(str) {            var rExps=[                {re:/\\u00f6/g, ch:\'o\'},                {re:/\\u00fc/g, ch:\'u\'},                {re:/\\u00f3/g, ch:\'o\'},                {re:/\\u0151/g, ch:\'o\'},                {re:/\\u00fa/g, ch:\'u\'},                {re:/\\u00e9/g, ch:\'e\'},                {re:/\\u00e1/g, ch:\'a\'},                {re:/\\u0171/g, ch:\'u\'},                {re:/\\u00ed/g, ch:\'i\'}            ];            for(var i=0, len=rExps.length; i<len; i++)                str=str.replace(rExps[i].re, rExps[i].ch);            return str;        };    if (typeof atob != \'undefined\' && typeof _ceCTSData != \'undefined\' && confObj != {}) {        var origMeta = \'\',            newContent = \'\',            userDbStr = \'userdb_id\',            adverticumMeta;        for (var key in confObj) {            if (confObj.hasOwnProperty(key) && _ceCTSData.hasOwnProperty(key)) {                newContent += confObj[key] + \'=\' + _ceCTSData[key] + \'&\';            }        }        newContent = replaceAccents(newContent);        if (newContent != \\"\\") {            if (document.getElementsByName(\'customtarget\').length != 0) {                adverticumMeta = document.getElementsByName(\'customtarget\')[0];                origMeta = atob(adverticumMeta.content);            } else {                adverticumMeta = document.createElement(\'meta\');                adverticumMeta.name = \'customtarget\';                document.getElementsByTagName(\'head\')[0].appendChild(adverticumMeta);            }            if (origMeta != \\"\\") {                if (origMeta.indexOf(userDbStr + \\"=\\" + userdbId) != -1) {                    var newMeta = userDbStr + \\"=\\" + userdbId + \'&\' + newContent.replace(/&$/g, \'\');                    origMeta = origMeta.replace(userDbStr + \\"=\\" + userdbId, newMeta);                    adverticumMeta.content = btoa(origMeta);                } else {                    adverticumMeta.content = btoa(userDbStr + \'=\' + userdbId + \'&\' + newContent.replace(/&$/g, \'\'));                }            } else {                adverticumMeta.content = btoa(userDbStr + \'=\' + userdbId + \'&\' + newContent.replace(/&$/g, \'\'));            }        }    }})();</script>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<script>    (function () {        if (window.Element && !Element.prototype.closest) {            Element.prototype.closest = function (s) {                var matches = (this.document || this.ownerDocument).querySelectorAll(s),                    i,                    el = this;                do {                    i = matches.length;                    while (--i >= 0 && matches.item(i) !== el) { };                } while ((i < 0) && (el = el.parentElement));                return el;            };        }        window.googletag = window.googletag || { cmd: [] };        googletag.cmd.push(function () {            window.googletag.pubads().addEventListener(\'slotRenderEnded\', function (event) {                if (event.isEmpty) {                    var slotEl = document.getElementById(event.slot.getSlotId().getDomId());                    try {                        var advEl = slotEl.closest(\\".goAdverticum\\");                        if (advEl != undefined && advEl != null && advEl.contains(slotEl)) {                            slotEl = advEl;                        }                    } catch (e) { }                    slotEl.style.display = \'none\';                }            });        });    })();</script>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<script>    (function () {        (adsbygoogle = window.adsbygoogle || []).pauseAdRequests = 1;        (adsbygoogle = window.adsbygoogle || []).requestNonPersonalizedAds = 1;        window.googletag = window.googletag || { cmd: [] };        googletag.cmd.push(function () {            googletag.pubads().disableInitialLoad();            googletag.pubads().setRequestNonPersonalizedAds(1);            window.googletag.pubads().addEventListener(\'slotRenderEnded\', function (event) {                if (event.isEmpty) {                    var slotEl = document.getElementById(event.slot.getSlotId().getDomId());                    if (window.Element && !Element.prototype.closest) {                        Element.prototype.closest = function (s) {                            var matches = (this.document || this.ownerDocument).querySelectorAll(s),                                i,                                el = this;                            do {                                i = matches.length;                                while (--i >= 0 && matches.item(i) !== el) { };                            } while ((i < 0) && (el = el.parentElement));                            return el;                        };                    }                    try {                        var adverticum = slotEl.closest(\\".goAdverticum\\");                        if (adverticum != undefined && adverticum.contains(slotEl)) {                            slotEl = adverticum;                        }                    } catch (e) { }                    slotEl.style.display = \'none\';                }            });        });        function callGoogleTag(doNotPersonalise) {            doNotPersonalise = doNotPersonalise ? 1 : 0; /* 0 = enable, 1 = disable*/            (adsbygoogle = window.adsbygoogle || []).requestNonPersonalizedAds = doNotPersonalise;            (adsbygoogle = window.adsbygoogle || []).pauseAdRequests = 0;            console.log(\\"dnPa: \\"+ doNotPersonalise);            window.googletag = window.googletag || { cmd: [] };            googletag.cmd.push(function () {                googletag.pubads().setRequestNonPersonalizedAds(doNotPersonalise);                if (googletag.pubads().isInitialLoadDisabled()) {                    googletag.pubads().refresh();                }            });        }        window.addEventListener(\'DOMContentLoaded\', (event) => {            var doNotPersonalise = true;            if (typeof window[\'__tcfapi\'] === \'function\') {                window.__tcfapi(\'addEventListener\', 2, function (tcData, success) {                    if (success && (tcData.eventStatus === \'tcloaded\' || tcData.eventStatus === \'useractioncomplete\')) {                        /*Check for Google Advertising Products (vendor ID 755)*/                        if (tcData.vendor.consents[755]) {                            doNotPersonalise = false;                        }                        callGoogleTag(doNotPersonalise);                        window.__tcfapi(\'removeEventListener\', 2, function (success) { }, tcData.listenerId);                    }                });            } else {                callGoogleTag(doNotPersonalise);            }        });    })();</script>\"}, {\"service_name\": \"Gemius\", \"weight\": null, \"source\": \"<script src=\\"//spl.hit.gemius.pl/gplayer.js\\" type=\\"text/javascript\\"></script>\"}, {\"service_name\": \"Gemius\", \"weight\": null, \"source\": \"<script src=\\"//spl.hit.gemius.pl/gplayer.js\\" type=\\"text/javascript\\"></script>\"}]';
  this.positions_weighted['head'] = false;
  
  this.positions['body-start'] = '[{\"service_name\": \"Google Tag Manager\", \"weight\": null, \"source\": \"<noscript><iframe src=\\"//www.googletagmanager.com/ns.html?id=GTM-WQHFXL\\"height=\\"0\\" width=\\"0\\" style=\\"display:none;visibility:hidden\\"></iframe></noscript><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src=\'//www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})(window,document,\'script\',\'dataLayer\',\'GTM-WQHFXL\');</script>\"}, {\"service_name\": \"A42A6Cblck\", \"weight\": null, \"source\": \"<script src=\\"//adfree-stat.p3g.hu/detect/detect.min.js\\"></script>\"}]';
  this.positions_weighted['body-start'] = false;
  
  this.positions['body-end'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//stat.p24.hu/CTS/helper-scripts/waterfall_empty/closer.min.js\\"></script>\"}, {\"service_name\": \"Sanoma\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//segment.p24.hu/cerment.min.js\\"></script>\"}, {\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//ad.adverticum.net/g3.js\\"></script>\"}, {\"service_name\": \"JW player\", \"weight\": null, \"source\": \"<script>    (function () {        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (isSubscribed && CentralJwPlayer != undefined && CentralJwPlayer.enableAdFree != undefined) {            CentralJwPlayer.enableAdFree();        }    })();</script>\"}, {\"service_name\": \"A42A6Cblck\", \"weight\": null, \"source\": \"<script>    (function () {        var evtName = \\"_ceAblfinish\\";        var prepareData = function () {            var cssName = \\"24hu\\";            var queryStrTimestamp = \\"?t=20201126\\";            var replaceMe = {                from: \\"##hostName##\\",                to: document.location.hostname.replace(/\\\\./g, \'\')            };            var insertElements = {                link: [{                    href: (cssName == undefined || cssName == \'\') ? \\"//adfree-stat.p3g.hu/layer/css/out/##hostName##.css\\" + queryStrTimestamp : \\"//adfree-stat.p3g.hu/layer/css/out/\\" + cssName + \\".css\\" + queryStrTimestamp,                    rel: \\"stylesheet\\",                    type: \\"text/css\\"                }],                script: [{                    src: \\"//adfree-stat.p3g.hu/layer/layer.min.js\\" + queryStrTimestamp,                    type: \\"text/javascript\\",                    onload: function () {                        if (typeof a2blckLayer != \\"undefined\\" && a2blckLayer.show != undefined && getA42A6CblckStatus() == 1) {                            a2blckLayer.show();                            var dataLayer = window.dataLayer || [];                            dataLayer.push({ \'event\': \'layer\', \'layerName\': \'prohibitad\' });                        }                    }                }]            };            var eltype = Object.keys(insertElements);            var isSubscribed = (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) ? true : false;            var subscribedDataExists = (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().dataExists) ? true : false;            var getA42A6CblckStatus = function () {                var blckEd = 0;                if (typeof window.A42A6Cblck != \\"undefined\\" && window.A42A6Cblck.status != undefined) {                    blckEd = window.A42A6Cblck.status;                }                return blckEd;            };            if (getA42A6CblckStatus() == 1 && subscribedDataExists && !isSubscribed && typeof _ceCTSData != \\"undefined\\" && _ceCTSData.a2blckLayer != undefined) {                for (var i = 0; i < eltype.length; i++) {                    for (var j = 0; j < Object.keys(insertElements[eltype[i]]).length; j++) {                        var needElements = Object.keys(insertElements[eltype[i]])[j];                        var newEl = document.createElement(eltype[i]);                        for (var k = 0; k < needElements.length; k++) {                            var needElementAttr = Object.keys(insertElements[eltype[i]][needElements[k]]);                            for (var l = 0; l < Object.keys(needElementAttr).length; l++) {                                var needElementAttrVal = insertElements[eltype[i]][needElements[k]][needElementAttr[l]];                                if (needElementAttrVal != undefined && typeof needElementAttrVal == \'string\') {                                    needElementAttrVal = needElementAttrVal.replace(replaceMe.from, replaceMe.to);                                }                                newEl[needElementAttr[l]] = needElementAttrVal;                            }                        }                        document.head.appendChild(newEl);                    }                }            }        };        var init = function () {            var loadLayer = false;            if (typeof _ceCTSData != undefined && _ceCTSData.a2blckLayer != undefined) {                loadLayer = true;                if (_ceCTSData.a2blckLayer.displayed) {                    loadLayer = false;                }            }            if (loadLayer) {                prepareData();            }        };        document.addEventListener(evtName, init);        window.addEventListener(\'load\', init);    })();</script>\"}, {\"service_name\": \"Gemius\", \"weight\": null, \"source\": \"<script src=\\"//stat.p24.hu/CTS/measuring-codes/gem_stream.min.js?t=202010121\\" type=\\"text/javascript\\"></script>\"}]';
  this.positions_weighted['body-end'] = false;
  
  this.positions['body-end-adv'] = '[]';
  this.positions_weighted['body-end-adv'] = false;
  
  this.positions['bottom'] = '[]';
  this.positions_weighted['bottom'] = false;
  
  this.positions['content030'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'6395864\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'2147744\';                        dataAdsvName = \'mobil_waterfall2\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}, {\"service_name\": \"Sanoma/Hir24\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\">        var ADXBannerWidthDefault = 640,        pageType = typeof ctsPageType !== \'undefined\' ? ctsPageType : \'notSet\';            switch (pageType) {        case \'category\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.category-component-box.hir24-rovat.list-category\').css(\'width\');            break;        case \'other\':            if (location.pathname.indexOf(\'/tag/\') != -1){                ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.hir24-rovat.list-category > div.row > div.article.col-sm-8\').css(\'width\'); }            break;        case \'tag\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.hir24-rovat.list-category > div.row > div.article.col-sm-8\').css(\'width\');            break;        case \'article\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.col-md-8.hir24-post\').css(\'width\');            break;        default:            ADXBannerWidth = ADXBannerWidthDefault;    }    ADXBannerWidth = parseInt(ADXBannerWidth);    if (window.innerWidth < 670) ADXBannerWidth-=15;    if (isNaN(ADXBannerWidth) || ADXBannerWidth <= 0 || ADXBannerWidthDefault < ADXBannerWidth){        ADXBannerWidth = ADXBannerWidthDefault;    }</script>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"margin-top: 40px;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t\t(function () {\t\t\tvar slotForDevice = \'\';\t\t\tvar gadxErr = false;\t\t\tvar dimensionForDevice = {\t\t\t\twidth: parseInt(750),\t\t\t\theight: parseInt(200)\t\t\t};\t\t\tvar isSubscribed = false;\t\t\tif (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {\t\t\t\tisSubscribed = true;\t\t\t}\t\t\tif (typeof ADXBannerWidth !== \'undefined\') {\t\t\t\tdimensionForDevice.width = ADXBannerWidth;\t\t\t}\t\t\tif (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {\t\t\t\tswitch (_ceDeviceDetect.getDeviceType()) {\t\t\t\t\tcase \'desktop\':\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_desktop}\';\t\t\t\t\t\tbreak;\t\t\t\t\tcase \'mobile\':\t\t\t\t\t\tslotForDevice = \'5845617267\';\t\t\t\t\t\tdimensionForDevice.width = 300;\t\t\t\t\t\tdimensionForDevice.height = 250;\t\t\t\t\t\tbreak;\t\t\t\t\tcase \'tablet\':\t\t\t\t\t\tif (\'${google_adx_slot_default_for_tablet}\' != \'\') {\t\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_tablet}\';\t\t\t\t\t\t} else {\t\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_desktop}\';\t\t\t\t\t\t}\t\t\t\t\t\tbreak;\t\t\t\t}\t\t\t}\t\t\tif (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {\t\t\t\tvar advParts = {};\t\t\t\tvar gadxDiv = document.getElementById(\'ctsGadxTemp\');\t\t\t\tadvParts.initScript = document.createElement(\'script\');\t\t\t\tadvParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';\t\t\t\tadvParts.initScript.async = \'true\';\t\t\t\tadvParts.body = document.createElement(\'ins\');\t\t\t\tadvParts.body.className = \'adsbygoogle\';\t\t\t\tadvParts.body.style.display = \'table\';\t\t\t\tadvParts.body.style.margin = \'0 auto\';\t\t\t\tadvParts.body.style.width = dimensionForDevice.width + \'px\';\t\t\t\tadvParts.body.style.height = dimensionForDevice.height + \'px\';\t\t\t\tadvParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');\t\t\t\tadvParts.body.setAttribute(\'data-ad-slot\', slotForDevice);\t\t\t\tadvParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));\t\t\t\tif (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {\t\t\t\t\tadvParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');\t\t\t\t}\t\t\t\tgadxDiv.appendChild(advParts.initScript);\t\t\t\tgadxDiv.appendChild(advParts.body);\t\t\t\tif (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {\t\t\t\t\tgadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");\t\t\t\t\tgadxDiv.removeAttribute(\\"ctsStyle\\");\t\t\t\t} else {\t\t\t\t\tgadxDiv.removeAttribute(\\"style\\");\t\t\t\t}\t\t\t\t(adsbygoogle = window.adsbygoogle || []).push({});\t\t\t\tgadxDiv.removeAttribute(\'id\');\t\t\t} else {\t\t\t\tvar adxElement = document.getElementById(\'ctsGadxTemp\');\t\t\t\tadxElement.parentNode.removeChild(adxElement);\t\t\t}\t\t\t})();    </script></div>\"}]';
  this.positions_weighted['content030'] = false;
  
  this.positions['content060'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\"    ctsStyle=\\"width:100%;text-align: center;margin-top:15px;display:inline-block;${custom_css}\\" style=\\"display: none;\\"><script>\t\t(function () {\t\t\tvar slotForDevice = \'\';\t\t\tvar gadxErr = false;\t\t\tvar dimensionForDevice = {\t\t\t\twidth: parseInt(750),\t\t\t\tmobileWidth: parseInt(360),\t\t\t\tminWidth: parseInt(300),\t\t\t\theight: parseInt(200),\t\t\t\tmobileHeight: parseInt(266)\t\t\t};\t\t\tvar isSubscribed = false;\t\t\tif (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {\t\t\t\tisSubscribed = true;\t\t\t}\t\t\tif (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {\t\t\t\tswitch (_ceDeviceDetect.getDeviceType()) {\t\t\t\t\tcase \'desktop\':\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_desktop}\';\t\t\t\t\t\tbreak;\t\t\t\t\tcase \'mobile\':\t\t\t\t\t\tslotForDevice = \'6023354316\';\t\t\t\t\t\tdimensionForDevice.width = 300;\t\t\t\t\t\tdimensionForDevice.minWidth = 300;\t\t\t\t\t\tdimensionForDevice.height = 250;\t\t\t\t\t\tif (!isNaN(dimensionForDevice.mobileWidth)) {\t\t\t\t\t\t\tdimensionForDevice.width = dimensionForDevice.mobileWidth;\t\t\t\t\t\t}\t\t\t\t\t\tif (!isNaN(dimensionForDevice.mobileHeight)) {\t\t\t\t\t\t\tdimensionForDevice.height = dimensionForDevice.mobileHeight;\t\t\t\t\t\t}\t\t\t\t\t\tbreak;\t\t\t\t\tcase \'tablet\':\t\t\t\t\t\tif (\'${google_adx_slot_default_for_tablet}\' != \'\') {\t\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_tablet}\';\t\t\t\t\t\t} else {\t\t\t\t\t\t\tslotForDevice = \'${google_adx_slot_default_for_desktop}\';\t\t\t\t\t\t}\t\t\t\t\t\tbreak;\t\t\t\t}\t\t\t}\t\t\tif (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {\t\t\t\tvar advParts = {};\t\t\t\tvar gadxDiv = document.getElementById(\'ctsGadxTemp\');\t\t\t\tadvParts.initScript = document.createElement(\'script\');\t\t\t\tadvParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';\t\t\t\tadvParts.initScript.async = \'true\';\t\t\t\tadvParts.body = document.createElement(\'ins\');\t\t\t\tadvParts.body.className = \'adsbygoogle\';\t\t\t\tadvParts.body.style.display = \'inline-block\';\t\t\t\tadvParts.body.style.height = dimensionForDevice.height + \'px\';\t\t\t\tif (!isNaN(dimensionForDevice.minWidth) && !isNaN(dimensionForDevice.width)) {\t\t\t\t\tadvParts.body.style.maxWidth = dimensionForDevice.width + \'px\';\t\t\t\t\tadvParts.body.style.minWidth = dimensionForDevice.minWidth + \'px\';\t\t\t\t\tadvParts.body.style.width = \'100%\';\t\t\t\t} else {\t\t\t\t\tadvParts.body.style.width = dimensionForDevice.width + \'px\';\t\t\t\t}\t\t\t\tadvParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');\t\t\t\tadvParts.body.setAttribute(\'data-ad-slot\', slotForDevice);\t\t\t\tadvParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));\t\t\t\tif (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {\t\t\t\t\tadvParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');\t\t\t\t}\t\t\t\tif (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {\t\t\t\t\tgadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");\t\t\t\t\tgadxDiv.removeAttribute(\\"ctsStyle\\");\t\t\t\t} else {\t\t\t\t\tgadxDiv.removeAttribute(\\"style\\");\t\t\t\t}\t\t\t\tgadxDiv.appendChild(advParts.initScript);\t\t\t\tgadxDiv.appendChild(advParts.body);\t\t\t\t(adsbygoogle = window.adsbygoogle || []).push({});\t\t\t\tgadxDiv.removeAttribute(\'id\');\t\t\t} else {\t\t\t\tvar adxElement = document.getElementById(\'ctsGadxTemp\');\t\t\t\tadxElement.parentNode.removeChild(adxElement);\t\t\t}\t\t})();    </script></div>\"}]';
  this.positions_weighted['content060'] = false;
  
  this.positions['list-content020'] = '[{\"service_name\": \"Sanoma/Hir24\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\">        var ADXBannerWidthDefault = 640,        pageType = typeof ctsPageType !== \'undefined\' ? ctsPageType : \'notSet\';            switch (pageType) {        case \'category\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.category-component-box.hir24-rovat.list-category\').css(\'width\');            break;        case \'other\':            if (location.pathname.indexOf(\'/tag/\') != -1){                ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.hir24-rovat.list-category > div.row > div.article.col-sm-8\').css(\'width\'); }            break;        case \'tag\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.hir24-rovat.list-category > div.row > div.article.col-sm-8\').css(\'width\');            break;        case \'article\':            ADXBannerWidth = jQuery(\'div#page\').find(\'div#content\').find(\'div.col-md-8.hir24-post\').css(\'width\');            break;        default:            ADXBannerWidth = ADXBannerWidthDefault;    }    ADXBannerWidth = parseInt(ADXBannerWidth);    if (window.innerWidth < 670) ADXBannerWidth-=15;    if (isNaN(ADXBannerWidth) || ADXBannerWidth <= 0 || ADXBannerWidthDefault < ADXBannerWidth){        ADXBannerWidth = ADXBannerWidthDefault;    }</script>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var dimensionForDevice = {            width: parseInt(640),            height: parseInt(120)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof ADXBannerWidth !== \'undefined\') {            dimensionForDevice.width = ADXBannerWidth;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'8105101400/9581809280\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'8105101400/9581809280\';                    }                    break;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            var adSign = document.createElement(\'div\');            adSign.style.width = dimensionForDevice.width + \'px\';            adSign.style.textAlign = \'right\';            adSign.style.fontSize = \'8px\';            adSign.style.color = \'#C6C6C6\';            adSign.innerHTML = \'HIRDET&#xC9;S\';            gadxDiv.appendChild(adSign);            var gaAdxSlotIdentifier = \'5491763120/\' + slotForDevice;            google_ad_client = \'ca-pub-1984646123858990\';            google_ad_slot = gaAdxSlotIdentifier;            google_ad_width = dimensionForDevice.width;            google_ad_height = dimensionForDevice.height;            google_max_num_ads = parseInt(1);            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script><script type=\\"text/javascript\\" src=\\"//pagead2.googlesyndication.com/pagead/show_ads.js\\"></script></div>\"}]';
  this.positions_weighted['list-content020'] = false;
  
  this.positions['list-content030'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var dimensionForDevice = {            width: parseInt(640),            height: parseInt(120)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof ADXBannerWidth !== \'undefined\') {            dimensionForDevice.width = ADXBannerWidth;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'8105101400/3535225040\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'8105101400/3535225040\';                    }                    break;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            var adSign = document.createElement(\'div\');            adSign.style.width = dimensionForDevice.width + \'px\';            adSign.style.textAlign = \'right\';            adSign.style.fontSize = \'8px\';            adSign.style.color = \'#C6C6C6\';            adSign.innerHTML = \'HIRDET&#xC9;S\';            gadxDiv.appendChild(adSign);            var gaAdxSlotIdentifier = \'5491763120/\' + slotForDevice;            google_ad_client = \'ca-pub-1984646123858990\';            google_ad_slot = gaAdxSlotIdentifier;            google_ad_width = dimensionForDevice.width;            google_ad_height = dimensionForDevice.height;            google_max_num_ads = parseInt(1);            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script><script type=\\"text/javascript\\" src=\\"//pagead2.googlesyndication.com/pagead/show_ads.js\\"></script></div>\"}]';
  this.positions_weighted['list-content030'] = false;
  
  this.positions['content010'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'3831924\';                        dataAdsvName = \'roadblock\';                        break;                    case \'mobile\':                        zoneForDevice = \'2147746\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'roadblock\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['content010'] = false;
  
  this.positions['top'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'3831917\';                        dataAdsvName = \'top\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'top\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['top'] = false;
  
  this.positions['right010'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'3831920\';                        dataAdsvName = \'box1\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'box1\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['right010'] = false;
  
  this.positions['right020'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'4859296\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'4859296\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'4859296\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['right020'] = false;
  
  this.positions['right030'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'2239069\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['right030'] = false;
  
  this.positions['right040'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'4780126\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['right040'] = false;
  
  this.positions['right060'] = '[]';
  this.positions_weighted['right060'] = false;
  
  this.positions['content-top'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'${adv_zone_id_for_desktop}\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'3539239\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['content-top'] = false;
  
  this.positions['right-bottom'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'6395866\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['right-bottom'] = false;
  
  this.positions['content050'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"cts_content_recomm\\" class=\\"ctsGadx\\" ctsStyle=\\"display:block;margin-top:30px;margin-bottom:30px;margin-top:10px;\\"    style=\\"display: none;\\"><script type=\\"text/javascript\\">        (function () {            var slotForDevice = {                desktop: \'3794649010\',                mobile: \'6160887438\',                tablet: \'6160887438\'            },                slotForDeviceDark = {                    desktop: \'4922865488\',                    mobile: \'8251736408\',                    tablet: \'8251736408\'                },                recommDiv = document.getElementById(\'cts_content_recomm\'),                slot = \'\',                parameter = \'\',                googleUniqueParameters = {                    desktop: \'${google_recomm_unique_parameters}\',                    mobile: \'{\\"data-matched-content-rows-num\\": \\"12,6\\", \\"data-matched-content-columns-num\\": \\"1,2\\", \\"data-matched-content-ui-type\\": \\"image_sidebyside,image_sidebyside\\"}\',                    tablet: \'{\\"data-matched-content-rows-num\\": \\"12,6\\", \\"data-matched-content-columns-num\\": \\"1,2\\", \\"data-matched-content-ui-type\\": \\"image_sidebyside,image_sidebyside\\"}\'                };            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceCTSData != \'undefined\' && _ceCTSData.darkMode != undefined && _ceCTSData.darkMode) {                slotForDevice = slotForDeviceDark;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        slot = slotForDevice.desktop;                        parameter = googleUniqueParameters.desktop;                        break;                    case \'mobile\':                        slot = slotForDevice.mobile;                        parameter = googleUniqueParameters.mobile;                        if (slot == \'\') {                            slot = slotForDevice.desktop;                        }                        break;                    case \'tablet\':                        slot = slotForDevice.mobile;                        parameter = googleUniqueParameters.mobile;                        if (slot == \'\') {                            slot = slotForDevice.desktop;                        }                        break;                }            }            if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slot != \'\') {                var advParts = {};                advParts.initScript = document.createElement(\'script\');                advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';                advParts.initScript.async = \'true\';                advParts.body = document.createElement(\'ins\');                advParts.body.className = \'adsbygoogle\';                advParts.body.style.display = \'block\';                advParts.body.setAttribute(\'data-ad-format\', \'autorelaxed\');                advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');                advParts.body.setAttribute(\'data-ad-slot\', slot);                try {                    parameter = JSON.parse(parameter);                    for (var key in parameter) {                        if (parameter.hasOwnProperty(key)) {                            advParts.body.setAttribute(key, parameter[key]);                        }                    }                } catch (e) {                }                if (recommDiv.getAttribute(\\"ctsStyle\\") != null) {                    recommDiv.style = recommDiv.getAttribute(\\"ctsStyle\\");                    recommDiv.removeAttribute(\\"ctsStyle\\");                } else {                    recommDiv.removeAttribute(\\"style\\");                }                recommDiv.appendChild(advParts.initScript);                recommDiv.appendChild(advParts.body);                (adsbygoogle = window.adsbygoogle || []).push({});                recommDiv.removeAttribute(\'id\');            } else {                recommDiv.parentNode.removeChild(recommDiv);            }        })();    </script></div>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\"    ctsStyle=\\"width:100%;text-align: center;margin-top:15px;display:inline-block;margin-top:10px;\\" style=\\"display: none;\\"><script>        (function () {            var slotForDevice = \'\';            var gadxErr = false;            var dimensionForDevice = {                width: parseInt(300),                mobileWidth: parseInt(${google_ad_width_mobile}),                minWidth: parseInt(${google_ad_min_width}),                height: parseInt(250),                mobileHeight: parseInt(${google_ad_height_mobile})            };            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        slotForDevice = \'[4411265956,3724870242]\';                        break;                    case \'mobile\':                        slotForDevice = \'${google_adx_slot_default_for_mobile}\';                        dimensionForDevice.width = 300;                        dimensionForDevice.minWidth = 300;                        dimensionForDevice.height = 250;                        if (!isNaN(dimensionForDevice.mobileWidth)) {                            dimensionForDevice.width = dimensionForDevice.mobileWidth;                        }                        if (!isNaN(dimensionForDevice.mobileHeight)) {                            dimensionForDevice.height = dimensionForDevice.mobileHeight;                        }                        break;                    case \'tablet\':                        if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                            slotForDevice = \'${google_adx_slot_default_for_tablet}\';                        } else {                            slotForDevice = \'[4411265956,3724870242]\';                        }                        break;                }            }            if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {                var gadxDiv = document.getElementById(\'ctsGadxTemp\'),                    adNum = 1;                try {                    slotForDevice = JSON.parse(slotForDevice);                    if (slotForDevice.length > 0) {                        adNum = slotForDevice.length;                    }                } catch (e) { }                    if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                        gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                        gadxDiv.removeAttribute(\\"ctsStyle\\");                    } else {                        gadxDiv.removeAttribute(\\"style\\");                    }                var advParts = {};                advParts.initScript = document.createElement(\'script\');                advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';                advParts.initScript.async = \'true\';                gadxDiv.appendChild(advParts.initScript);                for (var i = 0; i < adNum; i++) {                    var slotNum = slotForDevice[i] != undefined ? slotForDevice[i] : slotForDevice;                    advParts.body = document.createElement(\'ins\');                    advParts.body.className = \'adsbygoogle\';                    advParts.body.style.display = \'inline-block\';                    advParts.body.style.height = dimensionForDevice.height + \'px\';                    if (adNum > 1) advParts.body.style.cssFloat = i == 0 ? \'left\' : \'right\';                    if (!isNaN(dimensionForDevice.minWidth) && !isNaN(dimensionForDevice.width)) {                        advParts.body.style.maxWidth = dimensionForDevice.width + \'px\';                        advParts.body.style.minWidth = dimensionForDevice.minWidth + \'px\';                        advParts.body.style.width = \'100%\';                    } else {                        advParts.body.style.width = dimensionForDevice.width + \'px\';                    }                    advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');                    advParts.body.setAttribute(\'data-ad-slot\', slotNum);                    advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));                    if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                        advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');                    }                    gadxDiv.appendChild(advParts.body);                    (adsbygoogle = window.adsbygoogle || []).push({});                }                gadxDiv.removeAttribute(\'id\');            } else {                var adxElement = document.getElementById(\'ctsGadxTemp\');                adxElement.parentNode.removeChild(adxElement);            }        })();    </script></div>\"}]';
  this.positions_weighted['content050'] = false;
  
  this.positions['toothbrush-handle'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'5247117\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['toothbrush-handle'] = false;
  
  this.positions['toothbrush-head'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'5247116\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['toothbrush-head'] = false;
  
  this.positions['gallery-content-top'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var gadxErr = false;        var dimensionForDevice = {            width: parseInt(727),            height: parseInt(90)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'4199050721\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'4199050721\';                    }                    break;            }            try {            } catch (err) {                gadxErr = true;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var advParts = {};            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            advParts.initScript = document.createElement(\'script\');            advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';            advParts.initScript.async = \'true\';            advParts.body = document.createElement(\'ins\');            advParts.body.className = \'adsbygoogle\';            advParts.body.style.display = \'table\';            advParts.body.style.margin = \'0 auto\';            advParts.body.style.width = dimensionForDevice.width + \'px\';            advParts.body.style.height = dimensionForDevice.height + \'px\';            advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');            advParts.body.setAttribute(\'data-ad-slot\', slotForDevice);            advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));            if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');            }            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.appendChild(advParts.initScript);            gadxDiv.appendChild(advParts.body);            (adsbygoogle = window.adsbygoogle || []).push({});            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script></div>\"}]';
  this.positions_weighted['gallery-content-top'] = false;
  
  this.positions['gallery-content010'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var gadxErr = false;        var dimensionForDevice = {            width: parseInt(570),            height: parseInt(318)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'6568039674\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'6568039674\';                    }                    break;            }            try {            } catch (err) {                gadxErr = true;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var advParts = {};            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            advParts.initScript = document.createElement(\'script\');            advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';            advParts.initScript.async = \'true\';            advParts.body = document.createElement(\'ins\');            advParts.body.className = \'adsbygoogle\';            advParts.body.style.display = \'table\';            advParts.body.style.margin = \'0 auto\';            advParts.body.style.width = dimensionForDevice.width + \'px\';            advParts.body.style.height = dimensionForDevice.height + \'px\';            advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');            advParts.body.setAttribute(\'data-ad-slot\', slotForDevice);            advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));            if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');            }            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.appendChild(advParts.initScript);            gadxDiv.appendChild(advParts.body);            (adsbygoogle = window.adsbygoogle || []).push({});            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script></div>\"}, {\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'5575283\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['gallery-content010'] = false;
  
  this.positions['gallery-left020'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var gadxErr = false;        var dimensionForDevice = {            width: parseInt(255),            height: parseInt(143)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'2341020050\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'2341020050\';                    }                    break;            }            try {            } catch (err) {                gadxErr = true;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var advParts = {};            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            advParts.initScript = document.createElement(\'script\');            advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';            advParts.initScript.async = \'true\';            advParts.body = document.createElement(\'ins\');            advParts.body.className = \'adsbygoogle\';            advParts.body.style.display = \'table\';            advParts.body.style.margin = \'0 auto\';            advParts.body.style.width = dimensionForDevice.width + \'px\';            advParts.body.style.height = dimensionForDevice.height + \'px\';            advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');            advParts.body.setAttribute(\'data-ad-slot\', slotForDevice);            advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));            if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');            }            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.appendChild(advParts.initScript);            gadxDiv.appendChild(advParts.body);            (adsbygoogle = window.adsbygoogle || []).push({});            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script></div>\"}]';
  this.positions_weighted['gallery-left020'] = false;
  
  this.positions['gallery-right010'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var gadxErr = false;        var dimensionForDevice = {            width: parseInt(350),            height: parseInt(198)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'6982972648\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'6982972648\';                    }                    break;            }            try {            } catch (err) {                gadxErr = true;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var advParts = {};            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            advParts.initScript = document.createElement(\'script\');            advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';            advParts.initScript.async = \'true\';            advParts.body = document.createElement(\'ins\');            advParts.body.className = \'adsbygoogle\';            advParts.body.style.display = \'table\';            advParts.body.style.margin = \'0 auto\';            advParts.body.style.width = dimensionForDevice.width + \'px\';            advParts.body.style.height = dimensionForDevice.height + \'px\';            advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');            advParts.body.setAttribute(\'data-ad-slot\', slotForDevice);            advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));            if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');            }            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.appendChild(advParts.initScript);            gadxDiv.appendChild(advParts.body);            (adsbygoogle = window.adsbygoogle || []).push({});            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script></div>\"}, {\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'5575278\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['gallery-right010'] = false;
  
  this.positions['gallery-right020'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" class=\\"ctsGadx\\" ctsStyle=\\"display:table;margin:0 auto;\\" style=\\"display: none;\\"><script type=\\"text/javascript\\">\t(function () {        var slotForDevice = \'\';        var gadxErr = false;        var dimensionForDevice = {            width: parseInt(350),            height: parseInt(198)        };        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    slotForDevice = \'6982972648\';                    break;                case \'mobile\':                    slotForDevice = \'${google_adx_slot_default_for_mobile}\';                    dimensionForDevice.width = 300;                    dimensionForDevice.height = 250;                    break;                case \'tablet\':                    if (\'${google_adx_slot_default_for_tablet}\' != \'\') {                        slotForDevice = \'${google_adx_slot_default_for_tablet}\';                    } else {                        slotForDevice = \'6982972648\';                    }                    break;            }            try {            } catch (err) {                gadxErr = true;            }        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false) && slotForDevice != \'\') {            var advParts = {};            var gadxDiv = document.getElementById(\'ctsGadxTemp\');            advParts.initScript = document.createElement(\'script\');            advParts.initScript.src = \'//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\';            advParts.initScript.async = \'true\';            advParts.body = document.createElement(\'ins\');            advParts.body.className = \'adsbygoogle\';            advParts.body.style.display = \'table\';            advParts.body.style.margin = \'0 auto\';            advParts.body.style.width = dimensionForDevice.width + \'px\';            advParts.body.style.height = dimensionForDevice.height + \'px\';            advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');            advParts.body.setAttribute(\'data-ad-slot\', slotForDevice);            advParts.body.setAttribute(\'data-max-num-ads\', parseInt(1));            if (typeof \'${google_ad_page_url}\' !== \'undefined\' && \'${google_ad_page_url}\' != \'\') {                advParts.body.setAttribute(\'data-page-url\', \'${google_ad_page_url}\');            }            if (gadxDiv.getAttribute(\\"ctsStyle\\") != null) {                gadxDiv.style = gadxDiv.getAttribute(\\"ctsStyle\\");                gadxDiv.removeAttribute(\\"ctsStyle\\");            } else {                gadxDiv.removeAttribute(\\"style\\");            }            gadxDiv.appendChild(advParts.initScript);            gadxDiv.appendChild(advParts.body);            (adsbygoogle = window.adsbygoogle || []).push({});            gadxDiv.removeAttribute(\'id\');        } else {            var adxElement = document.getElementById(\'ctsGadxTemp\');            adxElement.parentNode.removeChild(adxElement);        }    })();\t</script></div>\"}]';
  this.positions_weighted['gallery-right020'] = false;
  
  this.positions['content025'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'${adv_zone_id_for_desktop}\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'6262608\';                        dataAdsvName = \'mobil_waterfall3\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['content025'] = false;
  
  this.positions['content-social-left'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'6317428\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['content-social-left'] = false;
  
  this.positions['content-tag-top'] = '[{\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<div id=\\"ctstemp\\" class=\\"goAdverticum a8a263be\\" style=\\"display: none;\\"><script>        (function () {            var insertedElement = document.getElementById(\'ctstemp\');            var zoneForDevice = \'\';            var dataAdsvName = \'\';            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {                switch (_ceDeviceDetect.getDeviceType()) {                    case \'desktop\':                        zoneForDevice = \'6317469\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'${adv_zone_id_for_tablet}\';                        dataAdsvName = \'${adverticum_name_tablet}\';                        if (dataAdsvName == \\"\\") {                            dataAdsvName = \'${adverticum_name}\';                        }                        break;                }            }            if (zoneForDevice == \'\' || isSubscribed) {                insertedElement.parentNode.removeChild(insertedElement);            } else {                insertedElement.setAttribute(\'data-adsv-name\', dataAdsvName);                insertedElement.id = \'zone\' + zoneForDevice;                if (insertedElement.getAttribute(\\"ctsStyle\\") != null) {                    insertedElement.style = insertedElement.getAttribute(\\"ctsStyle\\");                    insertedElement.removeAttribute(\\"ctsStyle\\");                } else {                    insertedElement.removeAttribute(\\"style\\");                }            }        })();    </script></div>\"}]';
  this.positions_weighted['content-tag-top'] = false;
}

Tagging.prototype.get_json = function(text) {
  return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g, '')))
         && eval('(' + text + ')');
}

Tagging.prototype.random_tag = function(position) {
  var tags = [];
  var weighted_tags = [];

  for (index in position) {
    tag = position[index];
    tags[index] = tag.source;

    for (var i = 0; i < tag.weight; i++) {
      weighted_tags.push(index);
    }
  }

  // Pick a random tag from array based on weight
  var random_index = weighted_tags[Math.floor((Math.random() * weighted_tags.length))];
  return tags[random_index];
}

Tagging.prototype.all_tags = function(position) {
  var tags = [], index, tag;
  for (index in position) {
    tag = position[index];
    tags[index] = tag.source;
  }
  return tags.join("\n");
}

Tagging.prototype.render = function(slug, context) {
    document.write(this.get_source(slug, context));
}

Tagging.prototype.get_source = function(slug, context) {
  if (typeof this.positions[slug] == 'undefined') {
    // This position doesn't exist, call the autodetect
    this._detect(slug);
  } else {
    var position = this.get_json(this.positions[slug]);
    var tag_source = "";

    if (this.positions_weighted[slug]) {
      tag_source = this.random_tag(position)
    } else {
      tag_source = this.all_tags(position);
    }

    // Replace variables
    var variables = {};
    for (variable in this.context) {
      variables[variable] = this.context[variable];
    }
    for (variable in context) {
      variables[variable] = context[variable];
    }
    tag_source = this._replace_variables(tag_source, variables);

    // Remove unset variables and return result
    return tag_source.replace(/\$\w+/g, "").replace(/\${\w+}/g, "");
  }
  return '';
}

Tagging.prototype.log = function(err) {
  //this._load(error_endpoint);
}

Tagging.prototype._load = function(url) {
  var head = document.getElementsByTagName('head')[0] || document.documentElement,
      script = document.createElement('script');

  script.type = 'text/javascript';
  script.src = url;
  head.appendChild(script);
}

Tagging.prototype._detect = function(position) {
  this._load(this.autodetect_url + this.site +'/'+ this.zone +'/' + position + '/');
}

Tagging.prototype._replace_variables = function(content, variables) {
  var RE_VALID_IDENT = /^[a-zA-Z_]\w*$/;
  for (variable in variables) {
    if (RE_VALID_IDENT.test(variable)) {
      var regexes = [new RegExp('\\$' + variable, 'g'), new RegExp('\\${' + variable + '}', 'g')];

      for (re in regexes) {
        content = content.replace(regexes[re], variables[variable]);
      }
    } else {
      throw "'" + variable + "' is not a valid identifier.";
    }
  }
  return content;
}



