if(typeof KIDS == "undefined" || !KIDS) var KIDS = {}; KIDS.ads = KIDS.ads?KIDS.ads:{}; KIDS.ads.config = { "url":"default", "text":"default", "gameLoaderCap":"0", "zone":"", "ads" : [ { "size":"728x90", "contentType":"adi", "elementID":"adA", "keyValues":"site=nickmom;dcopt=ist;mtfIFPath=/asm/doubleclick/;", "dartPercent":"0.0", "refreshable":"false", "refreshRate":"2.0", "yahooAds":"false" } , { "size":"300x250-1", "contentType":"adi", "elementID":"adB", "keyValues":"site=nickmom;", "dartPercent":"0.0", "refreshable":"true", "refreshRate":"3.0", "yahooAds":"false" } , { "size":"300x250-2", "contentType":"adi", "elementID":"adC", "keyValues":"site=nickmom;", "dartPercent":"0.0", "refreshable":"false", "refreshRate":"0.0", "yahooAds":"false" } , { "size":"120x60-1", "contentType":"adi", "actualSize":"120x80", "elementID":"adD", "keyValues":"site=nickmom;logo=foundingmother;", "dartPercent":"0.0", "refreshable":"false", "refreshRate":"0.0", "yahooAds":"false" } , { "size":"1x2", "elementID":"adH", "keyValues":"site=nickmom;research=survey;", "dartPercent":"0.0", "refreshable":"false", "refreshRate":"0.0", "yahooAds":"false" } ] }; var nickInc = { // Nick site entry: nick : function(live) { this.doProjX(live); }, nickjr : function(live) { this.doProjX(live); // Open all links to kid sections in a new window. popPlaytime already does this window.onload = function() { $("a[href|='/kids']").not("[onclick^='popPlaytime']").each(function(index) { var tar = $(this); if(tar.hasClass('promoLink')) { tar.addClass('new-window'); } else { tar.attr('target', '_blank'); } }); }; }, addictinggames : function(live) { this.doProjX(live); }, spongebob : function(live) { this.doProjX(live); }, nickmom : function(live) { this.doProjX(live); }, /* // Other site, uncomment as needed nicktoons : function(live) {}, nickatnite : function(live) {}, teennick : function(live) {}, */ /* include optimizely doOptimizely : function(live) { this.insertScript("//cdn.optimizely.com/js/"+( live ? '97743889' : '90362606' )+".js"); }, */ doProjX : function(live) { this.insertScript("//btg.mtvnservices.com/aria/projectX/projectX.html"); }, insertScript : function(scriptSrc) { var opt_script = document.createElement('script'); opt_script.src = scriptSrc; opt_script.language = "javascript"; var headTag = document.getElementsByTagName('head')[0]; headTag.insertBefore(opt_script, headTag.firstChild); } }; var nickHost = (function(sites) { var host = null; var live = location.hostname.search(/[d|q]\.mtvi\.com/i) == -1; var hosts = location.hostname.match( /www\.(nickmom)|relaunch\.(nickmom)|(nicktoons)\.nick|www\.(teennick)|www\.(nickatnite)|(spongebob)\.nick|www\.(nickjr)|relaunch\.(nickjr)|www\.(nick)|www\.(addictinggames)|dev\.(addictinggames)/i ); hosts = hosts == null ? [] : hosts; hosts.shift(); for(var i = 0; i < hosts.length; i++) { if(host != null || hosts[i] == null || hosts[i] == "") continue; host = hosts[i]; } if(host == null) host = "nick"; if(sites != null && sites[host] != null) sites[host](live); return { host:host, live:live}; })(nickInc);