Tagging=function(a){this.site='fashionchick-nl-fsc';this.zone='home';this.source_consent_cookie='site_consent';this.source_default_tracking=true;this.allowed_categories='atinternet,stats,stir';this.cookie_barviewcount='consentBarViewCount';this.protocol=window.location.protocol;this.autodetect_url=this.protocol+'//cts.snmmd.nl/service/detect/';this.context=a;this.positions={};this.positions_weighted={};this.is_site_without_cookiebar=false;this.positions.skyscraper='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');var GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[120, 600]], \'\\"+uid+\\"\').addService(googletag.pubads())\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted.skyscraper=false;this.positions['multiple-rectangle']='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');var GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[300, 250], [336, 280]], \'\\"+uid+\\"\').addService(googletag.pubads())\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted['multiple-rectangle']=false;this.positions['large-rectangle']='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');var GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[336, 280]], \'\\"+uid+\\"\').addService(googletag.pubads())\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted['large-rectangle']=false;this.positions.head='[{\"service_name\": \"Sanoma cookie opt-in\", \"source_non_tracking\": \"<script type=\\"text/javascript\\">    (function() {        function get_domain() {            var host = window.location.host;            var port = host.indexOf(\':\');            var domain = port>0?host.substr(0,port):host;            var parts = domain.split(\'.\');            return parts[parts.length-2]+\'.\'+parts[parts.length-1];        }        var url = window.location.protocol+\'//privacy.\'+get_domain()+\'/script/consent.js\';        var script = \'<scr\'+\'ipt type=\\"text/javascript\\" src=\\"\'+url+\'\\"></scr\'+\'ipt>\';        document.write(script);    })();</script>\", \"weight\": null, \"service_kind\": \"functional\", \"source_tracking\": \"<script type=\\"text/javascript\\">    (function() {        function get_domain() {            var host = window.location.host;            var port = host.indexOf(\':\');            var domain = port>0?host.substr(0,port):host;            var parts = domain.split(\'.\');            return parts[parts.length-2]+\'.\'+parts[parts.length-1];        }        var url = window.location.protocol+\'//privacy.\'+get_domain()+\'/script/consent.js\';        var script = \'<scr\'+\'ipt type=\\"text/javascript\\" src=\\"\'+url+\'\\"></scr\'+\'ipt>\';        document.write(script);    })();</script>\"}, {\"service_name\": \"Wunderloop\", \"source_non_tracking\": \"<script type=\\"text/javascript\\">var wlrcmd=\'\';function KruxDummy () {  this.user = \'\';  this.segments = \'\';}var Krux = new KruxDummy();</script>\", \"weight\": null, \"service_kind\": \"stats\", \"source_tracking\": \"<script type=\\"text/javascript\\">var wl_ord = new Date().getTime();if(typeof(wlrcmd)==\\"undefined\\"){var wlrcmd=\\"\\";}if (window.wlrcmd && typeof(Krux)!=\'undefined\' && Krux.dartKeyValues) { window.wlrcmd = window.wlrcmd + \';\' + Krux.dartKeyValues; }var WlProtocol = location.protocol.indexOf(\'https\')>-1?\'https:\':\'http:\';var WlUrl= WlProtocol + \'//rc.bt.ilsemedia.nl/Get/ilsemedia/JS/GetRcmd.js?ord=\' + wl_ord; document.write(\'<scr\' + \'ipt language=\\"JavaScript\\" src=\\"\' + WlUrl + \'\\"></sc\' + \'ript>\');</script>\"}, {\"service_name\": \"Krux Digital\", \"source_non_tracking\": \"<script type=\\"text/javascript\\">var Krux = function () {};Krux.user = \'\';Krux.segments = \'\';</script>\", \"weight\": null, \"service_kind\": \"interests\", \"source_tracking\": \"<script type=\\"text/javascript\\">window.Krux||((Krux=function(){Krux.q.push(arguments);}).q=[]);(function(){  function retrieve(n){    var m, k=\'kx\'+n;    if (window.localStorage) {        return window.localStorage[k] || \\"\\";    } else if (navigator.cookieEnabled) {        m = document.cookie.match(k+\'=([^;]*)\');        return (m && unescape(m[1])) || \\"\\";    } else {        return \'\';    }  }  var kvs = [];  Krux.user = retrieve(\'user\');  if (Krux.user) {    kvs.push(\'u=\' + Krux.user);  }  Krux.segments = retrieve(\'segs\') && retrieve(\'segs\').split(\',\') || [];  for (var i = 0; i < Krux.segments.length; i++ ) {    kvs.push(\'ksgmnt=\' + Krux.segments[i]);  }  Krux.dartKeyValues = kvs.length ? kvs.join(\';\') + \';\': \'\';  if (window.wlrcmd && Krux.dartKeyValues) {     window.wlrcmd = window.wlrcmd + \';\' + Krux.dartKeyValues;   }})();</script><script class=\\"kxct\\" data-id=\\"Hhv1gCBG\\" data-timing=\\"async\\" data-version=\\"1.9\\" type=\\"text/javascript\\">  window.Krux||((Krux=function(){Krux.q.push(arguments)}).q=[]);  (function(){    var k=document.createElement(\'script\');k.type=\'text/javascript\';k.async=true;    var m,src=(m=location.href.match(\'(?:[?&]+)kxsrc=([^&]+)\'))&&decodeURIComponent(m[1]);    k.src = new RegExp(\'^https?://((?:[a-z0-9_.]|-)+[.])?krxd[.]net(:[0-9]{1,5})?/\', \'i\').test(src) ? src : src === \\"disable\\" ? \\"\\" :    (location.protocol===\\"https:\\"?\\"https:\\":\\"http:\\")+\\"//cdn.krxd.net/controltag?confid=Hhv1gCBG\\";    var s=document.getElementsByTagName(\'script\')[0];s.parentNode.insertBefore(k,s);  }());  </script>\"}, {\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\'text/javascript\'>var googletag = googletag || {};googletag.cmd = googletag.cmd || [];(function() {var gads = document.createElement(\'script\');gads.async = true;gads.type = \'text/javascript\';var useSSL = \'https:\' == document.location.protocol;gads.src = (useSSL ? \'https:\' : \'http:\') + \'//www.googletagservices.com/tag/js/gpt.js\';var node = document.getElementsByTagName(\'script\')[0];node.parentNode.insertBefore(gads, node);})();function strToGPT(s){var h={};s=s.split(\\";\\");for(var i=0;i<s.length;i++){var p=s[i].split(\\"=\\",2),k=p[0],v=\\"\\";if(p.length==2)v=p[1];var m=v.split(\',\');for(var u=0;u<m.length;u++){if(k&&m[u])(typeof h[k]==\\"undefined\\")?h[k]=[m[u]]:h[k].push(m[u])}}return h}var _VMp = (Math.floor(Math.random()*100000000));function GPTrid() {if(typeof window.GPTrcmd==\\"undefined\\") {if (\'${dc_keywords}\'.length == 0) { kw=wlrcmd; } else { kw=\'${dc_keywords},\'+wlrcmd;}if (\'${dc_params}\'.length == 0) { params=\'\'; } else { params=\';${dc_params}\';}if(window.enr_initScan) { kw += \';VM=true\' }window.GPTrcmd = strToGPT(params+\';kw=\'+kw);}var _VMa = (Math.floor(Math.random()*100000000));return \'VMspot_\'+window._VMp+\'_\'+_VMa;}</script>\"}, {\"service_name\": \"SAC\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"stats\", \"source_tracking\": \"<script>v_sat = { eid: \'\', sit: tagging.site, cha: \'web\', cat: tagging.zone, cid:location.pathname, evt: \'con\'};(function () {if(typeof(Krux) != \'undefined\' && typeof(Krux.user) != \'undefined\') { window.v_sat.eid = Krux.user;}if(typeof(GPTrid) != \'undefined\') { window.v_sat[\'vmspot\'] = GPTrid().replace(\'VMspot_\',\'\'); }if(typeof(context) != \'undefined\' && typeof(context.article_id) != \'undefined\') {window.v_sat.cid = context.article_id;}var sat = document.createElement(\'script\');sat.type = \'text/javascript\';sat.async = true;sat.src = \'//sat.sanoma.fi/js/sat.js\';var s = document.getElementsByTagName(\'script\')[0];s.parentNode.insertBefore(sat, s);})();</script>\"}]';this.positions_weighted.head=false;this.positions.pixel='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');var GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[1, 1]], \'\\"+uid+\\"\').addService(googletag.pubads())\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted.pixel=false;this.positions.teaser='[]';this.positions_weighted.teaser=false;this.positions.footer='[{\"service_name\": \"Google Analytics\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"stats\", \"source_tracking\": \"<script type=\\"text/javascript\\">(function (d,f) { if (/^[0-9]+$/.test(f) == false) return; var s = d.createElement(\'script\'); s.type = \'text/javascript\'; s.async = true; s.src = (\'https:\' == d.location.protocol ? \'https:\' : \'http:\') + \'//www.feedo.nl/rc3/beta/cache/init.\'+f+\'.js\'; var x = d.getElementsByTagName(\'script\')[0]; x.parentNode.insertBefore(s, x);}(document,\'90\'));</script>\"}, {\"service_name\": \"STIR\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"stir\", \"source_tracking\": \"<script type=\\"text/javascript\\">String.prototype.capitalize=function(){return this.toLowerCase().replace(/\\\\b\\\\w/g,function(t){return t.toUpperCase()})};var nb_host = location.host.split(\\".\\").slice(-2);var nb_12 = nb_host.join(\\".\\");var nb_25 = nb_host[0].capitalize();var nb_26 = \\"\\";var nb_27 = \'home\';if(nb_27.length > 0){if(nb_27.indexOf(\'default\') > -1){nb_27 = \'overig\';}else{nb_27 = encodeURIComponent(nb_27);}}else{nb_27 = \'overig\';}var nb_type = document.querySelector(\'meta[property=\\"og:type\\"]\');var nb_28 = nb_type && nb_type.getAttribute(\\"content\\");if(nb_28!=\\"article\\") {nb_28=\\"index\\";}nb_query = \'&nb_01=Sanoma&nb_02=sanoma.nl&nb_11=web&nb_12=\'+nb_12+\'&nb_25=\'+nb_25+\'&nb_26=\'+nb_26+\'&nb_27=\'+nb_27+\'&nb_28=\'+nb_28+\'&nb_29=general\';function udm_(e){var t=\\"comScore=\\",n=document,r=n.cookie,i=\\"\\",s=\\"indexOf\\",o=\\"substring\\",u=\\"length\\",a=2048,f,l=\\"&ns_\\",c=\\"&\\",h,p,d,v,m=window,g=m.encodeURIComponent||escape;if(r[s](t)+1)for(d=0,p=r.split(\\";\\"),v=p[u];d<v;d++)h=p[d][s](t),h+1&&(i=c+unescape(p[d][o](h+t[u])));e+=l+\\"_t=\\"+ +(new Date)+l+\\"c=\\"+(n.characterSet||n.defaultCharset||\\"\\")+\\"&c8=\\"+g(n.title)+i+\\"&c7=\\"+g(n.URL)+\\"&c9=\\"+g(n.referrer),e[u]>a&&e[s](c)>0&&(f=e[o](0,a-8).lastIndexOf(c),e=(e[o](0,f)+l+\\"cut=\\"+g(e[o](f+1)))[o](0,a)),n.images?(h=new Image,m.ns_p||(ns_p=h),h.src=e):n.write(\\"<\\",\\"p\\",\\"><\\",\'img src=\\"\',e,\'\\" height=\\"1\\" width=\\"1\\" alt=\\"*\\"\',\\"><\\",\\"/p\\",\\">\\")};udm_(\'http\'+(document.location.href.charAt(4)==\'s\'?\'s://sb\':\'://b\')+\'.scorecardresearch.com/b?c1=2&c2=6035634&ns_site=total\'+nb_query);</script><noscript><p><img src=\\"http://b.scorecardresearch.com/p?c1=2&amp;c2=6035634&amp;ns_site=total&amp;nb_01=Sanoma&amp;nb_02=sanoma.nl&amp;nb_11=web&amp;nb_29=general\\" height=\\"1\\" width=\\"1\\" alt=\\"*\\"></p></noscript><script type=\\"text/javascript\\" language=\\"JavaScript1.3\\" src=\\"http://b.scorecardresearch.com/c2/6035634/cs.js\\"></script>\"}]';this.positions_weighted.footer=false;this.positions.toc='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');var GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[1, 1]], \'\\"+uid+\\"\').addService(googletag.pubads())\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted.toc=false;this.positions.billboard='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">var uid = GPTrid();document.write(\'<div id=\\"\'+uid+\'\\"></div>\');;var GPTtag = \\"googletag.cmd.push(function(){var mapping = googletag.sizeMapping().addSize([250, 200], [[240, 80],[240, 40]]).addSize([320, 200], [[320, 50], [320, 100]]).addSize([480, 200], [468, 60]).addSize([736, 200], [[728, 90],[768, 100]]).addSize([970, 200] ,[[728, 90], [970, 250], [970, 90], [1, 1]]). build(); googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [728, 90], \'\\"+uid+\\"\').addService(googletag.pubads()) .setCollapseEmptyDiv(true,true).defineSizeMapping(mapping)\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'position\', \'top\') .setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\";eval(GPTtag);if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted.billboard=false;this.positions['multiple-rectangle-ajax']='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">count=1;function loadRectangle(elementId) {\tvar uid = GPTrid();\tvar slotDiv = document.createElement(\'div\');\tslotDiv.id = uid;\tdocument.getElementById(elementId).appendChild(slotDiv);\tvar GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[300, 250], [336, 280]], \'\\"+uid+\\"\').addService(googletag.pubads()).setCollapseEmptyDiv(true,true)\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'position\', \'top\') .setTargeting(\'adcount\', \'\\"+count+\\"\') .setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\"; ++count;eval(GPTtag);}if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted['multiple-rectangle-ajax']=false;this.positions['medium-rectangle-ajax']='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">count=1;function loadMRectangle1(elementId) {\tvar uid = GPTrid();\tvar slotDiv = document.createElement(\'div\');\tslotDiv.id = uid;\tdocument.getElementById(elementId).appendChild(slotDiv);\tvar GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[300, 250]], \'\\"+uid+\\"\').addService(googletag.pubads()).setCollapseEmptyDiv(true,true)\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'position\', \'top\') .setTargeting(\'adcount\', \'\\"+count+\\"\') .setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\"; ++count;eval(GPTtag);}if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted['medium-rectangle-ajax']=false;this.positions['native-box']='[{\"service_name\": \"Doubleclick\", \"source_non_tracking\": \"\", \"weight\": null, \"service_kind\": \"ads\", \"source_tracking\": \"<script type=\\"text/javascript\\">count=1;function loadNativeBox(elementId) {\tvar uid = GPTrid();\tvar slotDiv = document.createElement(\'div\');\tslotDiv.id = uid;\tdocument.getElementById(elementId).appendChild(slotDiv);\tvar GPTtag = \\"googletag.cmd.push(function(){googletag.defineSlot(\'/4442/P4442.Fashionchick.nl/home\', [[850, 320]], \'\\"+uid+\\"\').addService(googletag.pubads()).setCollapseEmptyDiv(true,true)\\";if(typeof GPTrcmd == \'object\'){for (var k in GPTrcmd) {GPTtag += \\".setTargeting(\'\\"+k+\\"\', \'\\"+GPTrcmd[k]+\\"\')\\";}}GPTtag += \\".setTargeting(\'position\', \'top\') .setTargeting(\'adcount\', \'\\"+count+\\"\') .setTargeting(\'VMspot\', \'\\"+uid.replace(\'VMspot_\',\'\')+\\"\')\\";GPTtag += \\";googletag.enableServices();googletag.display(\'\\"+uid+\\"\');});\\"; ++count;eval(GPTtag);}if(window.enr_initScan) { window.enr_initScan(uid); }</script>\"}]';this.positions_weighted['native-box']=false;};Tagging.prototype._has_optin=function(a){var b,c,d=this;if(this.is_site_without_cookiebar)return true;b=f(this.source_consent_cookie);if(b.length==0){var e=d._get_cookie(d.cookie_barviewcount);if(e>=1&&this.source_default_tracking==true)return true;b=d.allowed_categories.split(",");}for(c=0;c<b.length;c++)if(b[c]==a)return true;return false;function f(a){var b=d._get_cookie(a).split(":");if(b&&typeof b[3]!="undefined")return b[3].split(",");else return [];}};Tagging.prototype._get_cookie=function(a){if(document.cookie&&document.cookie!=""){var b=document.cookie.split(";");for(var c=0;c<b.length;c++){var d=e(b[c]);if(d.substring(0,a.length+1)==(a+"="))return decodeURIComponent(d.substring(a.length+1));}}return "";function e(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"");}};Tagging.prototype._get_tag_source=function(a){if(this._has_optin(a.service_kind))return a.source_tracking;else return a.source_non_tracking;};Tagging.prototype.get_json=function(a){return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(a.replace(/"(\\.|[^"\\])*"/g,'')))&&eval('('+a+')');};Tagging.prototype.random_tag=function(a){var b=[];var c=[];for(index in a){tag=a[index];b[index]=this._get_tag_source(tag);for(var d=0;d<tag.weight;d++)c.push(index);}var e=c[Math.floor((Math.random()*c.length))];return b[e];};Tagging.prototype.all_tags=function(a){var b=[],c,d;for(c in a)if(a.hasOwnProperty(c)){d=a[c];b[c]=this._get_tag_source(d);}return b.join("\n");};Tagging.prototype.render=function(a,b){document.write(this.get_source(a,b));};Tagging.prototype.get_source=function(a,b){if(typeof this.positions[a]=='undefined')this._detect(a);else{var c=this.get_json(this.positions[a]);var d="";if(this.positions_weighted[a])d=this.random_tag(c);else d=this.all_tags(c);var e={};for(variable in this.context)e[variable]=this.context[variable];for(variable in b)e[variable]=b[variable];d=this._replace_variables(d,e);return d.replace(/\$\w+/g,"").replace(/\${\w+}/g,"");}return '';};Tagging.prototype.log=function(a){};Tagging.prototype._load=function(a){var b=document.getElementsByTagName('head')[0]||document.documentElement,c=document.createElement('script');c.type='text/javascript';c.src=a;b.appendChild(c);};Tagging.prototype._detect=function(a){this._load(this.autodetect_url+this.site+'/'+this.zone+'/'+a+'/');};Tagging.prototype._replace_variables=function(a,b){var c=/^[a-zA-Z_]\w*$/;for(variable in b)if(c.test(variable)){var d=[new RegExp('\\$'+variable,'g'),new RegExp('\\${'+variable+'}','g')];for(re in d)a=a.replace(d[re],b[variable]);}else throw "'"+variable+"' is not a valid identifier.";return a;};