Tagging = function(context) {
  this.site = 'cafeblog';
  this.zone = 'validated';
  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\": \"Gemius Traffic\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\">    var properGemId = (\'${gemius_trackid}\' != \'\' ? \'${gemius_trackid}\' : \'bQc7_csFeM6byaiCuBj42IYgDtXdbCboNiZ7dNGKfFv.o7\');        if(typeof _ceDeviceDetect.getDeviceType() !== \'undefined\' && _ceDeviceDetect.getDeviceType() != \'desktop\' && \'dwM1vUOxHaDAsuW1It1oUZPZnF86BEwG5dcCeQSZB2D.Q7\' != \'\') {        properGemId = \'dwM1vUOxHaDAsuW1It1oUZPZnF86BEwG5dcCeQSZB2D.Q7\';    }       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\": \"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\": \"Sanoma\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//segment.p24.hu/cerment.min.js\\" async></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\": \"Criteo\", \"weight\": null, \"source\": \"<script async=\\"async\\" type=\\"text/javascript\\" src=\\"https://static.criteo.net/js/ld/publishertag.js\\"></script><script>    window.Criteo = window.Criteo || {};    window.Criteo.events = window.Criteo.events || [];</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\": \"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-DP23\\"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-DP23\');</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\": \"Social\", \"weight\": null, \"source\": \"<script>function dataLayerPush(eventNetwork, eventAction, targetUrl) {    dataLayer.push({        \'event\'        : \'socialEvent\',        \'socialNetwork\': eventNetwork,        \'socialAction\' : eventAction,        \'socialTarget\' : targetUrl,        \'eventValue\'   : 1    });}try {    FB.Event.subscribe(\'edge.create\', function(targetUrl) {        dataLayerPush(\'facebook\', \'like\', targetUrl);    });    FB.Event.subscribe(\'edge.remove\', function(targetUrl) {        dataLayerPush(\'facebook\', \'unlike\', targetUrl);    });    FB.Event.subscribe(\'message.send\', function(targetUrl) {        dataLayerPush(\'facebook\', \'send\', targetUrl);    });} catch(err) {}</script>\"}, {\"service_name\": \"Adverticum AdServer\", \"weight\": null, \"source\": \"<script type=\\"text/javascript\\" src=\\"//ad.adverticum.net/g3.js\\"></script>\"}, {\"service_name\": \"Strossle\", \"weight\": null, \"source\": \"<script>    (function () {        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        window.strossle = window.strossle || function () { (strossle.q = strossle.q || []).push(arguments) };        if (!isSubscribed && window._ceDisplayData != undefined && window._ceDisplayData.strossle != undefined && window._ceDisplayData.strossle.items != undefined) {            var strossleItems = window._ceDisplayData.strossle.items;            for (var i = 0; i < Object.keys(strossleItems).length; i++) {                var strossleElId = Object.keys(strossleItems)[i],                    strossleId = window._ceDisplayData.strossle.items[strossleElId].id;                strossle(strossleId, \'#\' + strossleElId);            }        }    })();</script><script async src=\\"//assets.strossle.com/strossle-widget-sdk/1/strossle-widget-sdk.js\\"></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 =  \'cafeblog.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\", \"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['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 = \'2687259\';                        dataAdsvName = \'box1\';                        break;                    case \'mobile\':                        zoneForDevice = \'${adv_zone_id_for_mobile}\';                        dataAdsvName = \'${adverticum_name_mobile}\';                        break;                    case \'tablet\':                        zoneForDevice = \'2687259\';                        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>\"}, {\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;${custom_css}\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470407,            height = 600,            width = 300,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}]';
  this.positions_weighted['right010'] = 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 = \'2720541\';                        dataAdsvName = \'roadblock\';                        break;                    case \'mobile\':                        zoneForDevice = \'3301117\';                        dataAdsvName = \'mobil_waterfall2\';                        break;                    case \'tablet\':                        zoneForDevice = \'2720541\';                        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>\"}, {\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;margin:0 auto; display:table;\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470408,            height = 250,            width = 300,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}]';
  this.positions_weighted['content010'] = false;
  
  this.positions['top'] = '[{\"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 = \'1825795\';                        break;                    case \'mobile\':                        zoneForDevice = \'3737192\';                        break;                    case \'tablet\':                        zoneForDevice = \'1825795\';                        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>\"}, {\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;${custom_css}\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470405,            height = 90,            width = 970,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}]';
  this.positions_weighted['top'] = false;
  
  this.positions['mobil-adsense-020'] = '[]';
  this.positions_weighted['mobil-adsense-020'] = false;
  
  this.positions['mobil-adsense-030'] = '[]';
  this.positions_weighted['mobil-adsense-030'] = false;
  
  this.positions['body-end-adv'] = '[{\"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 = \'2836003\';                        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['body-end-adv'] = false;
  
  this.positions['mobil-content010'] = '[]';
  this.positions_weighted['mobil-content010'] = false;
  
  this.positions['list-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 = \'${adv_zone_id_for_desktop}\';                        dataAdsvName = \'${adverticum_name}\';                        break;                    case \'mobile\':                        zoneForDevice = \'3301094\';                        dataAdsvName = \'mobil_waterfall1\';                        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['list-content010'] = false;
  
  this.positions['list-content020'] = '[{\"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 = \'3301117\';                        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>\"}]';
  this.positions_weighted['list-content020'] = false;
  
  this.positions['content020'] = '[{\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;text-align: center;\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470404,            height = 360,            width = 640,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}]';
  this.positions_weighted['content020'] = false;
  
  this.positions['content-top'] = '[]';
  this.positions_weighted['content-top'] = false;
  
  this.positions['content-recommender'] = '[]';
  this.positions_weighted['content-recommender'] = false;
  
  this.positions['right-bottom'] = '[]';
  this.positions_weighted['right-bottom'] = false;
  
  this.positions['content-link010'] = '[]';
  this.positions_weighted['content-link010'] = false;
  
  this.positions['content-recommender'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"cts_content_recomm\\" class=\\"ctsGadx\\" ctsStyle=\\"display:block;margin-top:30px;margin-bottom:30px;${custom_css}\\"    style=\\"display: none;\\"><script type=\\"text/javascript\\">        (function () {            var slotForDevice = {                desktop: \'6142240467\',                mobile: \'4563776875\',                tablet: \'4563776875\'            },                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\\"}\'                },                isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            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;                        break;                    case \'tablet\':                        slot = slotForDevice.mobile;                        parameter = googleUniqueParameters.mobile;                        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) {                }                recommDiv.appendChild(advParts.initScript);                recommDiv.appendChild(advParts.body);                if (recommDiv.getAttribute(\\"ctsStyle\\") != null) {                    recommDiv.style = recommDiv.getAttribute(\\"ctsStyle\\");                    recommDiv.removeAttribute(\\"ctsStyle\\");                } else {                    recommDiv.removeAttribute(\\"style\\");                }                (adsbygoogle = window.adsbygoogle || []).push({});                recommDiv.removeAttribute(\'id\');            } else {                recommDiv.parentNode.removeChild(recommDiv);            }        })();    </script></div>\"}]';
  this.positions_weighted['content-recommender'] = false;
  
  this.positions['content020'] = '[{\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;text-align: center;\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470404,            height = 360,            width = 640,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}]';
  this.positions_weighted['content020'] = false;
  
  this.positions['mobil-adsense-020'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div class=\\"ctsGadx\\" id=\\"ctsGadx\\" ctsStyle=\\"text-align: center;\\" style=\\"display: none;\\"><div style=\\"width: 300px; text-align: right; font-size: 8px; color: #C6C6C6;\\">HIRDET&#xC9;S</div><script type=\\"text/javascript\\">        var ctsTplEl = document.getElementById(\\"ctsGadx\\");        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false)) {            var gaAdxSlots = [                {                    source: \'(direct)\',                    slots: [                        { slot: \'${google_adx_slot_direct}\' }                    ]                },                {                    source: \'hirkereso.hu\',                    slots: [                        { slot: \'${google_adx_slot_hirkereso}\' }                    ]                },                {                    source: \'hirstart.hu\',                    slots: [                        { slot: \'${google_adx_slot_hirstart}\' }                    ]                },                {                    source: \'kapu.hu\',                    slots: [                        { slot: \'${google_adx_slot_kapu}\' }                    ]                },                {                    source: \'startlap\',                    slots: [                        { slot: \'${google_adx_slot_startlap}\' }                    ]                },                {                    source: \'adbox\',                    slots: [                        { slot: \'${google_adx_slot_adbox}\' }                    ]                },                {                    source: \'hirek.oldal.info\',                    slots: [                        { slot: \'${google_adx_slot_hirekoldalinfo}\' }                    ]                },                {                    source: \'newsletter\',                    slots: [                        { slot: \'${google_adx_slot_newsletter}\' }                    ]                },                {                    source: \'tombola.hu\',                    slots: [                        { slot: \'${google_adx_slot_tombola}\' }                    ]                },                {                    source: \'facebook\',                    slots: [                        { slot: \'${google_adx_slot_facebook_organic}\' },                        { slot: \'${google_adx_slot_facebook_cpc}\' }                    ]                },                {                    source: \'google\',                    slots: [                        { slot: \'${google_adx_slot_google_organic}\' },                        { slot: \'${google_adx_slot_google_cpc}\' }                    ]                }            ];            var gaAdxSlotIdentifier = \'6968471000/8445178880\';            if (typeof ga == \'function\') {                var gaReferrer = ga.getAll()[0].get(\'referrer\');                if (typeof gaReferrer != \'undefined\' && gaReferrer != undefined) {                    for (var x = 0; x < gaAdxSlots.length; x++) {                        if (gaReferrer.indexOf(gaAdxSlots[x].source) != -1) {                            switch (gaAdxSlots[x].source) {                                default:                                    gaAdxSlotIdentifier = gaAdxSlots[x].slots[0].slot;                                    break;                            }                            break;                        }                    }                }            } else {                function readAsCookie(cname) {                    var name = cname + \\"=\\";                    var ca = document.cookie.split(\';\');                    for (var i = 0; i < ca.length; i++) {                        var c = ca[i].trim();                        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);                    }                    return \\"\\";                }                var utmz = readAsCookie(\'__utmz\');                var utmzVals = (function () {                    var pairs = utmz.split(\'.\').slice(4).join(\'.\').split(\'|\');                    var ga = {};                    for (var i = 0; i < pairs.length; i++) {                        var temp = pairs[i].split(\'=\');                        ga[temp[0]] = temp[1];                    }                    return ga;                })();                if (typeof utmzVals.utmccn == \'undefined\') utmzVals.utmccn = \'undefined\';                if (typeof utmzVals.utmcsr == \'undefined\') utmzVals.utmcsr = \'undefined\';                if (typeof utmzVals.utmcmd == \'undefined\') utmzVals.utmcmd = \'undefined\';                for (var x = 0; x < gaAdxSlots.length; x++) {                    if (utmzVals.utmccn.indexOf(gaAdxSlots[x].source) != -1 || utmzVals.utmcsr.indexOf(gaAdxSlots[x].source) != -1) {                        switch (gaAdxSlots[x].source) {                            case \'google\':                            case \'facebook\':                                if (utmzVals.utmcmd == \'cpc\') {                                    gaAdxSlotIdentifier = gaAdxSlots[x].slots[1].slot;                                } else if (utmzVals.utmcmd == \'organic\') {                                    gaAdxSlotIdentifier = gaAdxSlots[x].slots[0].slot;                                }                                break;                            default:                                gaAdxSlotIdentifier = gaAdxSlots[x].slots[0].slot;                                break;                        }                        break;                    }                }            }            if (gaAdxSlotIdentifier == \'\') gaAdxSlotIdentifier = \'6968471000/8445178880\';            gaAdxSlotIdentifier = \'5491763120/\' + gaAdxSlotIdentifier;            google_ad_client = \\"ca-pub-1984646123858990\\";            google_ad_slot = gaAdxSlotIdentifier;            google_ad_width = parseInt(300);            google_ad_height = parseInt(250);            google_max_num_ads = parseInt(${google_max_num_ads});            if (ctsTplEl.getAttribute(\\"ctsStyle\\") != null) {                ctsTplEl.style = ctsTplEl.getAttribute(\\"ctsStyle\\");                ctsTplEl.removeAttribute(\\"ctsStyle\\");            } else {                ctsTplEl.removeAttribute(\\"style\\");            }        } else {            var elements = document.getElementsByClassName(\\"ctsGadx\\");            while (elements.length > 0) {                elements[0].parentNode.removeChild(elements[0]);            }        }    </script><script type=\\"text/javascript\\" src=\\"//pagead2.googlesyndication.com/pagead/show_ads.js\\"></script></div>\"}]';
  this.positions_weighted['mobil-adsense-020'] = 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 = \'1897756\';                        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['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 = \'1897753\';                        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['right-bottom'] = '[{\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<div id=\\"ctsGadxTemp\\" ctsStyle=\\"margin: 0 auto; display: table;\\" style=\\"display: none;\\"><ins class=\\"adsbygoogle\\" style=\\"display:inline-block;width:300px;height:250px;\\"        data-ad-client=\\"ca-pub-8962558862962174\\" data-ad-slot=\\"2453744063\\"        data-max-num-ads=1></ins><script type=\\"text/javascript\\">\t\t(function () {\t\t\tvar adxElement = document.getElementById(\'ctsGadxTemp\');\t\t\tvar adsByGoogleScript = document.createElement(\\"script\\");\t\t\tvar isSubscribed = false;\t\t\tadsByGoogleScript.src = \\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\\";\t\t\tadxElement.removeAttribute(\'id\');\t\t\tif (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {\t\t\t\tisSubscribed = true;\t\t\t}\t\t\tif (!isSubscribed && (typeof noADX == \'undefined\' || noADX === false)) {\t\t\t\tif (adxElement.getAttribute(\\"ctsStyle\\") != null) {\t\t\t\t\tadxElement.style = adxElement.getAttribute(\\"ctsStyle\\");\t\t\t\t\tadxElement.removeAttribute(\\"ctsStyle\\");\t\t\t\t} else {\t\t\t\t\tadxElement.removeAttribute(\\"style\\");\t\t\t\t}\t\t\t\tadxElement.appendChild(adsByGoogleScript);\t\t\t\t(adsbygoogle = window.adsbygoogle || []).push({});\t\t\t} else {\t\t\t\tadxElement.parentNode.removeChild(adxElement);\t\t\t}\t\t})();\t</script></div>\"}]';
  this.positions_weighted['right-bottom'] = false;
  
  this.positions['content-top'] = '[{\"service_name\": \"Rubicon\", \"weight\": null, \"source\": \"<div id=\\"RubiconAdTemp\\" class=\\"rubAd\\" ctsStyle=\\"width: 100%;text-align: center;${custom_css}\\" style=\\"display: none;\\"><script language=\\"JavaScript\\" type=\\"text/javascript\\">\t(function () {        var rubiconZoneSize = \'\';        var rubiconSite = \'65898\';        var rubiconSiteMobile = \'90756\';        var rubiconAdType = \'${rubicon_ad_type}\';        var tplElement = document.getElementById(\\"RubiconAdTemp\\");        var advParts = {};        var insertedGoogle = false;        var isSubscribed = false;        if (rubiconAdType == \'\') {            rubiconAdType = \'js\';        }        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    rubiconZoneSize = \'588060-198\';                    break;                case \'mobile\':                    rubiconZoneSize = \'588060-198\';                    rubiconZoneSize = rubiconZoneSize.split(\'-\')[0] + \'-15\';                    break;                case \'tablet\':                    rubiconZoneSize = \'${rubicon_ad_zone_tablet}\';                    if (rubiconZoneSize == \'\') {                        rubiconZoneSize = \'588060-198\';                    }                    break;            }            if (_ceDeviceDetect.getDeviceType() != \'desktop\' && rubiconSiteMobile != undefined && rubiconSiteMobile != \'\' && rubiconSiteMobile != \'undefined\') {                rubiconSite = rubiconSiteMobile;            }            if (navigator.userAgent.toLowerCase().indexOf(\\"ipad\\") !== -1 && navigator.userAgent.toLowerCase().indexOf(\\"iphone\\") === -1) {                if (!isSubscribed) {                    insertedGoogle = true;                    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:inline-block;min-width:320px;max-width:1200px;width:100%;height:200px\\";                    advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');                    advParts.body.setAttribute(\'data-ad-slot\', \'5920657040\');                    if (tplElement.getAttribute(\\"ctsStyle\\") != null) {                        tplElement.style = tplElement.getAttribute(\\"ctsStyle\\");                        tplElement.removeAttribute(\\"ctsStyle\\");                    } else {                        tplElement.removeAttribute(\\"style\\");                    }                    tplElement.appendChild(advParts.initScript);                    tplElement.appendChild(advParts.body);                    (adsbygoogle = window.adsbygoogle || []).push({});                    tplElement.removeAttribute(\'id\');                }            }        }        if (!insertedGoogle) {            if (!isSubscribed && (typeof noRUBICON == \'undefined\' || noRUBICON === false) && rubiconZoneSize.split(\'-\')[0] != \'\') {                rp_account = \'13818\';                rp_site = rubiconSite;                rp_zonesize = rubiconZoneSize;                rp_adtype = rubiconAdType;                tplElement.removeAttribute(\'id\');                if (tplElement.getAttribute(\\"ctsStyle\\") != null) {                    tplElement.style = tplElement.getAttribute(\\"ctsStyle\\");                    tplElement.removeAttribute(\\"ctsStyle\\");                } else {                    tplElement.removeAttribute(\\"style\\");                }            } else {                tplElement.remove();            }        }    })();\t</script><script type=\\"text/javascript\\" src=\\"//ads.rubiconproject.com/ad/13818.js\\"></script></div>\"}]';
  this.positions_weighted['content-top'] = false;
  
  this.positions['content010'] = '[{\"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 = \'2720541\';                        break;                    case \'mobile\':                        zoneForDevice = \'3301117\';                        break;                    case \'tablet\':                        zoneForDevice = \'2720541\';                        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>\"}, {\"service_name\": \"Rubicon\", \"weight\": null, \"source\": \"<div id=\\"RubiconAdTemp\\" class=\\"rubAd\\" ctsStyle=\\"width: 100%;text-align: center;margin:0 auto; display:table;\\" style=\\"display: none;\\"><script language=\\"JavaScript\\" type=\\"text/javascript\\">\t(function () {        var rubiconZoneSize = \'\';        var rubiconSite = \'65898\';        var rubiconSiteMobile = \'90756\';        var rubiconAdType = \'${rubicon_ad_type}\';        var tplElement = document.getElementById(\\"RubiconAdTemp\\");        var advParts = {};        var insertedGoogle = false;        var isSubscribed = false;        if (rubiconAdType == \'\') {            rubiconAdType = \'js\';        }        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (typeof _ceDeviceDetect.getDeviceType() !== \'undefined\') {            switch (_ceDeviceDetect.getDeviceType()) {                case \'desktop\':                    rubiconZoneSize = \'1203002-198\';                    break;                case \'mobile\':                    rubiconZoneSize = \'773034-15\';                    rubiconZoneSize = rubiconZoneSize.split(\'-\')[0] + \'-15\';                    break;                case \'tablet\':                    rubiconZoneSize = \'${rubicon_ad_zone_tablet}\';                    if (rubiconZoneSize == \'\') {                        rubiconZoneSize = \'1203002-198\';                    }                    break;            }            if (_ceDeviceDetect.getDeviceType() != \'desktop\' && rubiconSiteMobile != undefined && rubiconSiteMobile != \'\' && rubiconSiteMobile != \'undefined\') {                rubiconSite = rubiconSiteMobile;            }            if (navigator.userAgent.toLowerCase().indexOf(\\"ipad\\") !== -1 && navigator.userAgent.toLowerCase().indexOf(\\"iphone\\") === -1) {                if (!isSubscribed) {                    insertedGoogle = true;                    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:inline-block;min-width:320px;max-width:1200px;width:100%;height:200px\\";                    advParts.body.setAttribute(\'data-ad-client\', \'ca-pub-8962558862962174\');                    advParts.body.setAttribute(\'data-ad-slot\', \'5920657040\');                    if (tplElement.getAttribute(\\"ctsStyle\\") != null) {                        tplElement.style = tplElement.getAttribute(\\"ctsStyle\\");                        tplElement.removeAttribute(\\"ctsStyle\\");                    } else {                        tplElement.removeAttribute(\\"style\\");                    }                    tplElement.appendChild(advParts.initScript);                    tplElement.appendChild(advParts.body);                    (adsbygoogle = window.adsbygoogle || []).push({});                    tplElement.removeAttribute(\'id\');                }            }        }        if (!insertedGoogle) {            if (!isSubscribed && (typeof noRUBICON == \'undefined\' || noRUBICON === false) && rubiconZoneSize.split(\'-\')[0] != \'\') {                rp_account = \'13818\';                rp_site = rubiconSite;                rp_zonesize = rubiconZoneSize;                rp_adtype = rubiconAdType;                tplElement.removeAttribute(\'id\');                if (tplElement.getAttribute(\\"ctsStyle\\") != null) {                    tplElement.style = tplElement.getAttribute(\\"ctsStyle\\");                    tplElement.removeAttribute(\\"ctsStyle\\");                } else {                    tplElement.removeAttribute(\\"style\\");                }            } else {                tplElement.remove();            }        }    })();\t</script><script type=\\"text/javascript\\" src=\\"//ads.rubiconproject.com/ad/13818.js\\"></script></div>\"}, {\"service_name\": \"Criteo\", \"weight\": null, \"source\": \"<div id=\\"criteoTPL\\" ctsStyle=\\"width:0px;height:0px;margin:0 auto;overflow:hidden;margin:0 auto; display:table;\\" style=\\"display: none;\\"></div><script type=\\"text/javascript\\">    (function () {        var zoneid = 1470408,            height = 250,            width = 300,            criteoEl = document.getElementById(\\"criteoTPL\\"),            domReady = \\"${criteo_dom_ready}\\",            mutationTimeout = 5000,            mutationConf = { attributes: true, childList: true, subtree: true },            isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        var insertCriteoBanner = function () {            if (!isSubscribed) {                criteoEl.id += Math.floor(Math.random() * 1000000);                if (criteoEl.getAttribute(\\"ctsStyle\\") != null) {                    criteoEl.style = criteoEl.getAttribute(\\"ctsStyle\\");                    criteoEl.removeAttribute(\\"ctsStyle\\");                } else {                    criteoEl.removeAttribute(\\"style\\");                }                var observer = new MutationObserver(function (mutations) {                    mutations.forEach(function () {                        criteoEl.style.width = width + \\"px\\";                        criteoEl.style.height = height + \\"px\\";                        criteoEl.style.marginTop = \\"10px\\";                        criteoEl.style.marginBottom = \\"10px\\";                        observer.disconnect();                    });                });                observer.observe(criteoEl, mutationConf);                setTimeout(function () { observer.disconnect(); }, mutationTimeout);                Criteo.events.push(function () {                    Criteo.DisplayAcceptableAdIfAdblocked({                        \\"zoneid\\": zoneid,                        \\"containerid\\": criteoEl.id,                        \\"overrideZoneFloor\\": true                    });                });            } else {                criteoEl.parentNode.removeChild(criteoEl);            }        };        if (domReady != undefined && domReady != \'\' && domReady) {            if (typeof document.addEventListener !== \'undefined\') {                document.addEventListener(\\"DOMContentLoaded\\", insertCriteoBanner);            } else {                window.attachEvent(\\"onload\\", insertCriteoBanner);            }        } else {            insertCriteoBanner();        }    })();</script>\"}, {\"service_name\": \"Strossle\", \"weight\": null, \"source\": \"<div id=\\"strossleTPL\\" ctsStyle=\\"${strossle_style}\\" style=\\"display: none;\\"><script>        (function () {            var strossleTPLElement = document.getElementById(\\"strossleTPL\\"),                strossleID = \\"ea5d710d-fedc-40db-979c-e36de94c7dc9\\";            var isSubscribed = false;            if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {                isSubscribed = true;            }            window._ceDisplayData = window._ceDisplayData || {};            if (!isSubscribed && strossleID != undefined && strossleID != \\"\\" && typeof localStorage.A42A6Cblck != \'undefined\' && JSON.parse(localStorage.A42A6Cblck).bl == 1) {                strossleTPLElement.id += Math.floor(Math.random() * 10000000);                window._ceDisplayData.strossle = window._ceDisplayData.strossle || { items: {} };                window._ceDisplayData.strossle.items[strossleTPLElement.id] = {};                window._ceDisplayData.strossle.items[strossleTPLElement.id].id = strossleID;                if (strossleTPLElement.getAttribute(\\"ctsStyle\\") != null) {                    strossleTPLElement.style = strossleTPLElement.getAttribute(\\"ctsStyle\\");                    strossleTPLElement.removeAttribute(\\"ctsStyle\\");                } else {                    strossleTPLElement.removeAttribute(\\"style\\");                }            } else {                strossleTPLElement.remove();            }        })();    </script></div>\"}]';
  this.positions_weighted['content010'] = false;
  
  this.positions['body-end-adv'] = '[{\"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 = \'2836003\';                        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>\"}, {\"service_name\": \"Google Adverts\", \"weight\": null, \"source\": \"<script async src=\\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\\"></script><script>    (function () {        var isSubscribed = false;        if (typeof _ceSubscriptionDetect != \'undefined\' && _ceSubscriptionDetect.getSubscriptionData() != undefined && _ceSubscriptionDetect.getSubscriptionData().isSubscribed) {            isSubscribed = true;        }        if (!isSubscribed) {            if (typeof _ceDeviceDetect !== \'undefined\' && typeof _ceDeviceDetect.getDeviceType === \'function\' && _ceDeviceDetect.getDeviceType() === \'mobile\') {                (adsbygoogle = window.adsbygoogle || []).push({                    google_ad_client: \\"ca-pub-8962558862962174\\",                    enable_page_level_ads: true                });            }        }    })();</script>\"}]';
  this.positions_weighted['body-end-adv'] = 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;
}



