var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); var DfpSlotManagerMixin = DfpSlotManagerMixin || (function() { var DfpSlotManager = function() { this.dfpSlots = {}; this.initialize = function() { $(document).on('dfpSlotManager::updateSlot', function(e, data) { this.updateSlot(data); }.bind(this)); $(document).on('adsRefresher::beforeDfpRefresh', function() { this.beforeSlotRefresh(); }.bind(this)); }; this.getSlots = function() { return this.dfpSlots; }.bind(this); this.updateSlot = function(payload) { payload = typeof payload === 'object' ? payload : {}; if (!this.dfpSlots[payload.id]) { this.dfpSlots[payload.id] = payload; } else if (!$('#' + payload.id).hasClass('permanent_hide')) { $.extend(this.dfpSlots[payload.id], payload); } }.bind(this); this.handleSlotStacking = function(slot) { var direction = slot.refreshWhenNodeHasContent; var refreshable = true; if (!direction || direction === 'None') { return refreshable; } var slotNode = $('#' + slot.id)[0]; var $slotParent = $(slotNode.parentElement); var nodesToCheck = []; var $firstNodeToCheck = {}; var $secondNodeToCheck = {}; if (direction === 'Next') { $firstNodeToCheck = $slotParent.next(); $secondNodeToCheck = $firstNodeToCheck.next(); } else { $firstNodeToCheck = $slotParent.prev(); $secondNodeToCheck = $firstNodeToCheck.prev(); } nodesToCheck.push($firstNodeToCheck); nodesToCheck.push($secondNodeToCheck); var allChildrenEmpty = true; var nodesOk = false; nodesToCheck.forEach(function($nodeToCheck) { $nodeToCheck.children().each(function() { if ($(this).children().length || !!$.trim($(this).html())) { allChildrenEmpty = false; } return allChildrenEmpty; }); var isDfpSlot = $nodeToCheck.hasClass('ads_dfpslot') || $nodeToCheck.hasClass('v2_ads_dfpslot'); var nodeHasChildren = !!$nodeToCheck.children().length; var nodeHasText = $.trim($nodeToCheck.text()) !== ''; var nodeHasMarkup = $.trim($nodeToCheck.html()) !== ''; if (!isDfpSlot && ((!allChildrenEmpty && nodeHasText) || nodeHasChildren || nodeHasMarkup)) { nodesOk = true; } return nodesOk; }); if (!nodesOk) { slot.refresh = false; $('#' + slot.id).hide(); $('#' + slot.id).addClass('permanent_hide'); // Don't apply ad stacking logic if slot explicitly set { hidden: true }, // if hidden === true, slot is unaffiliated with ad stacking } else if (!slot.hidden) { slot.refresh = true; $('#' + slot.id).show(); } refreshable = slot.refresh; return refreshable; }; this.beforeSlotRefresh = function() { for (var key in this.dfpSlots) { this.handleSlotStacking(this.dfpSlots[key]); } }.bind(this); }; var dfpSlotManager = new DfpSlotManager(); dfpSlotManager.initialize(); var exposedManagerMethods = { getSlots: dfpSlotManager.getSlots, updateSlot: dfpSlotManager.updateSlot, beforeSlotRefresh: dfpSlotManager.beforeSlotRefresh }; return exposedManagerMethods; })(); var PageDepthManager = PageDepthManager || (function() { var pageDepth = 0; var prevHref; var attributes = { pageDepthVariableName: 'guteref' }; function initialize(options) { $.extend(attributes, options); function sameDomain() { return document.domain === sessionStorage.prevDomain; } function uniqueReferal() { var uniq = document.referrer !== sessionStorage.prevReferrer; return !!document.referrer && uniq; } if (sameDomain() && uniqueReferal()) { pageDepth = Number(sessionStorage.pageDepth); } sessionStorage.prevDomain = document.domain || ''; sessionStorage.prevReferrer = document.referrer || ''; initialize = function() { return this; }; $(document).on('carousel_slide_change', PageDepthManager.incrementDepth); return this; } function emitDepth() { try { googletag.cmd.push(function() { googletag.pubads().setTargeting(attributes.pageDepthVariableName, String(pageDepth)); }); } catch (e) { // window.googletag || googletag.cmd undefined } return this; } function incrementDepth() { console.log('incrementDepth--------------------------'); var pageChange = prevHref !== location.href; if (pageChange) { pageDepth += 1; sessionStorage.pageDepth = pageDepth; } prevHref = location.href; return this; } function getDepth() { return pageDepth; } return { initialize: initialize, emitDepth: emitDepth, incrementDepth: incrementDepth, getDepth: getDepth }; })(); var AppContentData = AppContentData || (function() { var moduleName = 'js_app_contentdata-0'; var ContentDataController = function() { var pageData = __page_data__ || {}; var data = pageData[moduleName]; var actionHandlers = function() { return { 'contentData::getCategories': this.getCategories, 'contentData::getTitle': this.getTitle }; }.bind(this); var bindActionHandlers = function() { actionHandlers = actionHandlers(); var keys = Object.keys(actionHandlers); for (var i = 0; i < keys.length; i++) { var action = keys[i]; var handler = actionHandlers[keys[i]]; $(document).on(action, handler); } }; this.initialize = function() { bindActionHandlers(); }; // Returns Wiki style categories for all content. this.getCategories = function(event, payload) { payload = payload || {}; if (!data.categories) { return undefined; } var categories = { category: data.categories.category, category_id: data.categories.category_id, subcategory: data.categories.subcategory, subcategory_id: data.categories.subcategory_id }; if (!!payload.done) { payload.done.call(payload.done, categories); } return categories; }.bind(this); this.getTitle = function(event, payload) { payload = payload || {}; if (!data.title) { return undefined; } if (!!payload.done) { payload.done.call(payload.done, data.title); } return data.title; }.bind(this); this.getCategoryIDArray = function(event, payload) { payload = payload || {}; var categoryArray = []; if (!!payload.done) { payload.done.call(payload.done, categories); } // Wiki questions have page_var with all categories, not just top two if (data.categories.question_categories) { return data.categories.question_categories.split(',').map(Number); } if (data.categories.category_id) { categoryArray.push(Number(data.categories.category_id)); } if (data.categories.subcategory_id) { categoryArray.push(Number(data.categories.subcategory_id)); } return categoryArray; }.bind(this); }; var controller = new ContentDataController(); controller.initialize(); return { getCategories: function(payload) { return controller.getCategories(null, payload); }, getCategoryIDArray: function(payload) { return controller.getCategoryIDArray(null, payload); }, getTitle: function(payload) { return controller.getTitle(null, payload); } }; })(); /* global initAdserver googletagData */ var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; var PrebidManager = PrebidManager || (function() { var adUnits = []; var slotNum = 0; var indexID = 0; // Used for indexExchange until they fix their bidder function initialize(timeout) { pbjs.isEnabled = true; pbjs.timeout = timeout; // Next block is used to load the Prebid.js CDN whenever we don't use a prebuilt one. // Keep for now until we work out kinks // (function() { // var pbjsEl = document.createElement('script'); // pbjsEl.type = 'text/javascript'; // pbjsEl.async = true; // pbjsEl.src = '//web.archive.org/web/20180331212031/http://acdn.adnxs.com/prebid/static/0.6.0/prebid.js'; // var pbjsTargetEl = document.getElementsByTagName('head')[0]; // pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild); // })(); // add sovrn beacon if (googletagData.sovrn_bidder) { (function() { var sovrnBeacon = document.createElement('script'); sovrnBeacon.type = 'text/javascript'; sovrnBeacon.id = 'sBeacon'; sovrnBeacon.src = '//web.archive.org/web/20180331212031/http://ap.lijit.com/www/sovrn_beacon_standalone/sovrn_standalone_beacon.js?iid=12106015&uid=answers'; var sovrnBeaconTargetEl = document.getElementsByTagName('head')[0]; sovrnBeaconTargetEl.insertBefore(sovrnBeacon, sovrnBeaconTargetEl.firstChild); })(); } pbjs.que.push(function() { // 1-cent increments up to $20 pbjs.setPriceGranularity('high'); }); return this; } function registerSlot(slot, sizes) { var slotConfig = { code: slot.container_id, sizes: sizes, bids: buildBidderParams(slot) }; adUnits.push(slotConfig); return this; } function buildBidderParams(slot) { var params = []; var explodedTag = slot.ad_unit.split('/'); var adUnit = explodedTag[explodedTag.length - 1]; var sizeRegEx = /[0-9]{2,3}x[0-9]{2,3}_.*/; var placement = (sizeRegEx.test(adUnit)) ? sizeRegEx.exec(adUnit)[0] : '300x250_' + ++slotNum; if (googletagData.sovrn_bidder && slot.enable_sovrn_bidding !== 'off') { var sovrnParams = generateSovrnParams(placement, adUnit); if (sovrnParams) { params.push(sovrnParams); } } if (googletagData.pulsepoint_bidder && slot.enable_pulsepoint_bidding !== 'off') { var pulsepointParams = generatePulsePointParams(placement, adUnit); if (pulsepointParams) { params.push(pulsepointParams); } } if (googletagData.brealtime_bidder && slot.enable_brealtime_bidding !== 'off') { var brealtimeParams = generatebRealtimeParams(placement, adUnit); if (brealtimeParams) { params.push(brealtimeParams); } } if (googletagData.new_aol_bidder && slot.enable_aol_bidding !== 'off') { var AOLParams = generateAOLParams(slot, placement, adUnit); if (AOLParams) { params.push(AOLParams); } } if (googletagData.new_indexexchange_bidder && slot.enable_indexexchange_bidding !== 'off') { var indexParams = generateIndexParams(placement); if (indexParams) { params.push(indexParams); } } if (googletagData.appnexus_bidder && slot.enable_appnexus_bidding !== 'off') { var appNexusParams = generateAppNexusParams(placement, adUnit); if (appNexusParams) { params.push(appNexusParams); } } if (googletagData.districtm_bidder && slot.enable_districtm_bidding !== 'off') { var districtMParams = generateDistrictMParams(placement, adUnit); if (districtMParams) { params.push(districtMParams); } } if (googletagData.triplelift_bidder && slot.enable_triplelift_bidding !== 'off') { var tripleLiftParams = generateTripleLiftParams(slot); if (tripleLiftParams) { params.push(tripleLiftParams); } } if (googletagData.audienceNetwork_bidder && slot.enable_audienceNetwork_bidding !== 'off') { var audienceNetworkParams = generateAudienceNetworkParams(slot); if (audienceNetworkParams) { params.push(audienceNetworkParams); } } return params; } function generateSovrnParams(placement, adUnit) { // Ugly mapping ahead var map = { ANSWG_160x600_1: 405179, ANSWG_160x600_2: 405180, ANSWG_728x90_1: 405181, ANSWG_728x90_2: 405182, ANSWG_728x90_3: 405183, ANSWG_728x90_4: 405184, ANSWG_728x90_5: 405185, ANSWG_300x250_1: 405186, ANSWG_300x250_2: 405187, ANSWG_300x250_3: 405188, ANSWG_300x250_1_mobile: 405189, ANSWG_300x250_2_mobile: 405190, ANSWG_300x250_3_mobile: 405191, ANSWG_300x250_4_mobile: 405192, ANSWG_300x250_5_mobile: 405193, ANSW_160x600_1: 405413, ANSW_160x600_2: 405414, ANSW_728x90_1: 405415, ANSW_728x90_2: 405417, ANSW_728x90_3: 405418, ANSW_728x90_4: 405419, ANSW_728x90_5: 405420, ANSW_300x250_1: 405421, ANSW_300x250_2: 405422, ANSW_300x250_3: 405423, ANSW_300x250_1_mobile: 405426, ANSW_300x250_2_mobile: 405428, ANSW_300x250_3_mobile: 405430, ANSW_300x250_4_mobile: 405431, ANSW_300x250_5_mobile: 405432, ROA_160x600_1: 405194, ROA_160x600_2: 405195, ROA_728x90_1: 405196, ROA_728x90_2: 405197, ROA_728x90_3: 405198, ROA_728x90_4: 405199, ROA_728x90_5: 405200, ROA_300x250_1: 405201, ROA_300x250_2: 405202, ROA_300x250_3: 405203, ROA_300x250_1_mobile: 405204, ROA_300x250_2_mobile: 405205, ROA_300x250_3_mobile: 405206, ROA_300x250_4_mobile: 405207, ROA_300x250_5_mobile: 405208, LAU_160x600_1: 405210, LAU_160x600_2: 405211, LAU_728x90_1: 405212, LAU_728x90_2: 405213, LAU_728x90_3: 405214, LAU_728x90_4: 405215, LAU_728x90_5: 405216, LAU_300x250_1: 405217, LAU_300x250_2: 405218, LAU_300x250_3: 405219, LAU_300x250_1_mobile: 405220, LAU_300x250_2_mobile: 405221, LAU_300x250_3_mobile: 405222, LAU_300x250_4_mobile: 405223, LAU_300x250_5_mobile: 405224, EK_160x600_1: 405225, EK_160x600_2: 405226, EK_728x90_1: 405227, EK_728x90_2: 405228, EK_728x90_3: 405229, EK_728x90_4: 405230, EK_728x90_5: 405231, EK_300x250_1: 405232, EK_300x250_2: 405233, EK_300x250_3: 405234, EK_300x250_1_mobile: 405235, EK_300x250_2_mobile: 405236, EK_300x250_3_mobile: 405237, EK_300x250_4_mobile: 405238, EK_300x250_5_mobile: 405239, FSB_160x600_1: 405351, FSB_160x600_2: 405352, FSB_728x90_1: 405353, FSB_728x90_2: 405354, FSB_728x90_3: 405355, FSB_728x90_4: 405356, FSB_728x90_5: 405357, FSB_300x250_1: 405358, FSB_300x250_2: 405359, FSB_300x250_3: 405360, FSB_300x250_1_mobile: 405378, FSB_300x250_2_mobile: 405379, FSB_300x250_3_mobile: 405380, FSB_300x250_4_mobile: 405381, FSB_300x250_5_mobile: 405383, HRT_160x600_1: 431300, HRT_160x600_2: 431301, HRT_728x90_1: 431302, HRT_728x90_2: 431303, HRT_728x90_3: 431304, HRT_728x90_4: 431305, HRT_728x90_5: 431306, HRT_300x250_1: 431307, HRT_300x250_2: 431308, HRT_300x250_3: 431309, HRT_300x250_1_mobile: 431310, HRT_300x250_2_mobile: 431311, HRT_300x250_3_mobile: 431312, HRT_300x250_4_mobile: 431313, HRT_300x250_5_mobile: 431314, HWY_160x600_1: 431315, HWY_160x600_2: 431316, HWY_728x90_1: 431317, HWY_728x90_2: 431318, HWY_728x90_3: 431319, HWY_728x90_4: 431320, HWY_728x90_5: 431321, HWY_300x250_1: 431322, HWY_300x250_2: 431323, HWY_300x250_3: 431324, HWY_300x250_1_mobile: 431325, HWY_300x250_2_mobile: 431326, HWY_300x250_3_mobile: 431327, HWY_300x250_4_mobile: 431328, HWY_300x250_5_mobile: 431329 }; var placement = googletagData.site_code + '_' + placement; if (adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0) { placement += '_mobile'; } var tagid = map[placement]; if (tagid) { return { bidder: 'sovrn', params: { tagid: tagid } }; } else { return; } } function generateAOLParams(slot, placement, adUnit) { // Note: in Prebid.js documentation 'placement' is needed for AOL // 'placement' and 'alias' map 1:1, so only one or the other is needed per a conversation with AOL var alias = googletagData.site_code + '_' + placement + '_header'; if (adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0) { alias += '_mobile'; } if (googletagData.site_code === 'ANSW' || googletagData.site_code === 'ANSWG') { var map = { ANSW_160x600_1_header: 4550241, ANSW_728x90_1_header: 4550239, ANSW_300x250_1_header: 4550240, ANSW_300x250_1_header_mobile: 4550242 }; var size = slot.width + 'x' + slot.height; var sizeRegEx = /([0-9]{2,3}x[0-9]{2,3})/; if(placement.match(sizeRegEx)){ size = placement.match(sizeRegEx)[0]; } var key = 'ANSW_' + size + '_1_header'; if(adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0){ key += '_mobile'; } if(map[key]){ return { bidder: 'aol', params: { network: '9424.1', placement: map[key] } }; } } return { bidder: 'aol', params: { network: '9424.1', alias: alias } }; } function generateIndexParams(placement) { var map = { ANSW_160x600_1_header: 172832, ANSW_160x600_2_header: 172832, ANSW_160x600_3_header: 172832, ANSW_160x600_4_header: 172832, ANSW_300x250_1_header: 172833, ANSW_300x250_2_header: 172833, ANSW_300x250_3_header: 172833, ANSW_300x250_4_header: 172833, ANSW_728x90_1_header: 162476, ANSW_728x90_2_header: 162476, ANSW_728x90_3_header: 162476, ANSW_728x90_4_header: 162476, ANSW_300x250_1_header_mobile: 184533, ANSW_300x250_2_header_mobile: 184533, ANSW_300x250_3_header_mobile: 184533, ANSW_300x250_4_header_mobile: 184533, ANSWG_160x600_1_header: 172832, ANSWG_160x600_2_header: 172832, ANSWG_160x600_3_header: 172832, ANSWG_160x600_4_header: 172832, ANSWG_300x250_1_header: 172833, ANSWG_300x250_2_header: 172833, ANSWG_300x250_3_header: 172833, ANSWG_300x250_4_header: 172833, ANSWG_728x90_1_header: 162476, ANSWG_728x90_2_header: 162476, ANSWG_728x90_3_header: 162476, ANSWG_728x90_4_header: 162476, ANSWG_300x250_1_header_mobile: 184533, ANSWG_300x250_2_header_mobile: 184533, ANSWG_300x250_3_header_mobile: 184533, ANSWG_300x250_4_header_mobile: 184533, BLE_728x90_1_header: 174945, BLE_728x90_2_header: 174946, BLE_728x90_3_header: 174947, BLE_728x90_4_header: 174948, BLE_728x90_5_header: 174949, BLE_300x250_1_header: 174950, BLE_300x250_2_header: 174951, BLE_300x250_3_header: 174952, BLE_300x250_4_header: 174953, BLE_160x600_1_header: 174954, ELS_728x90_1_header: 175039, ELS_728x90_2_header: 175040, ELS_728x90_3_header: 175041, ELS_728x90_4_header: 175042, ELS_728x90_5_header: 175043, ELS_300x250_1_header: 175044, ELS_300x250_2_header: 175045, ELS_300x250_3_header: 175046, ELS_300x250_4_header: 175047, ELS_160x600_1_header: 175048, NEW_728x90_1_header: 175049, NEW_728x90_2_header: 175050, NEW_728x90_3_header: 175051, NEW_728x90_4_header: 175052, NEW_728x90_5_header: 175053, NEW_300x250_1_header: 175054, NEW_300x250_2_header: 175055, NEW_300x250_3_header: 175056, NEW_300x250_4_header: 175057, NEW_160x600_1_header: 175058, PRE_728x90_1_header: 175059, PRE_728x90_2_header: 175060, PRE_728x90_3_header: 175061, PRE_728x90_4_header: 175062, PRE_728x90_5_header: 175063, PRE_300x250_1_header: 175064, PRE_300x250_2_header: 175065, PRE_300x250_3_header: 175066, PRE_300x250_4_header: 175067, PRE_160x600_1_header: 175068, ROA_728x90_1_header: 175069, ROA_728x90_2_header: 175070, ROA_728x90_3_header: 175071, ROA_728x90_4_header: 175072, ROA_728x90_5_header: 175073, ROA_300x250_1_header: 175074, ROA_300x250_2_header: 175075, ROA_300x250_3_header: 175076, ROA_300x250_4_header: 175077, ROA_160x600_1_header: 175078, SPL_728x90_1_header: 175079, SPL_728x90_2_header: 175081, SPL_728x90_3_header: 175082, SPL_728x90_4_header: 175083, SPL_728x90_5_header: 175084, SPL_300x250_1_header: 175085, SPL_300x250_2_header: 175086, SPL_300x250_3_header: 175087, SPL_300x250_4_header: 175088, SPL_160x600_1_header: 175089 }; return { bidder: 'indexExchange', params: { id: ++indexID, siteID: map[googletagData.site_code + '_' + placement + '_header'] } }; } function generatePulsePointParams(placement, adunit) { var map = { ANSWG_728x90_1_header: 535164, ANSWG_728x90_2_header: 535165, ANSWG_728x90_3_header: 535166, ANSWG_728x90_4_header: 535167, ANSWG_728x90_5_header: 535168, ANSWG_160x600_1_header: 535169, ANSWG_160x600_2_header: 535170, ANSWG_160x600_3_header: 535171, ANSWG_160x600_4_header: 535172, ANSWG_300x250_1_header: 535173, ANSWG_300x250_2_header: 535174, ANSWG_300x250_3_header: 535175, ANSWG_300x250_4_header: 535176, ANSWG_300x250_4_header: 535177, ANSWG_300x250_1_header_mobile: 535178, ANSWG_300x250_2_header_mobile: 535179, ANSWG_300x250_3_header_mobile: 535180, ANSWG_300x250_4_header_mobile: 535181, ANSWG_300x250_5_header_mobile: 535182, ANSWG_300x250_6_header_mobile: 535183, ANSW_728x90_1_header: 535184, ANSW_728x90_2_header: 535185, ANSW_728x90_3_header: 535186, ANSW_728x90_4_header: 535187, ANSW_728x90_5_header: 535188, ANSW_160x600_1_header: 535189, ANSW_160x600_2_header: 535190, ANSW_160x600_3_header: 535191, ANSW_160x600_4_header: 535192, ANSW_300x250_1_header: 535193, ANSW_300x250_2_header: 535194, ANSW_300x250_3_header: 535195, ANSW_300x250_4_header: 535196, ANSW_300x250_5_header: 546926, ANSW_300x250_1_header_mobile: 535197, ANSW_300x250_2_header_mobile: 535198, ANSW_300x250_3_header_mobile: 535199, ANSW_300x250_4_header_mobile: 535200, ANSW_300x250_5_header_mobile: 535201, ANSW_300x250_6_header_mobile: 535202, HEA_728x90_1_header: 535203, HEA_728x90_2_header: 535204, HEA_728x90_3_header: 535205, HEA_728x90_4_header: 535206, HEA_728x90_5_header: 535207, HEA_160x600_1_header: 535208, HEA_160x600_2_header: 535209, HEA_160x600_3_header: 535210, HEA_160x600_4_header: 535211, HEA_300x250_1_header: 535212, HEA_300x250_2_header: 535217, HEA_300x250_3_header: 535213, HEA_300x250_4_header: 535218, HEA_300x250_4_header: 535214, HEA_300x250_1_header_mobile: 535219, HEA_300x250_2_header_mobile: 535215, HEA_300x250_3_header_mobile: 535220, HEA_300x250_4_header_mobile: 535216, HEA_300x250_5_header_mobile: 535221, HEA_300x250_6_header_mobile: 535222, LAU_728x90_1_header: 535223, LAU_728x90_2_header: 535224, LAU_728x90_3_header: 535225, LAU_728x90_4_header: 535226, LAU_728x90_5_header: 535227, LAU_160x600_1_header: 535228, LAU_160x600_2_header: 535229, LAU_160x600_3_header: 535230, LAU_160x600_4_header: 535231, LAU_300x250_1_header: 535232, LAU_300x250_2_header: 535233, LAU_300x250_3_header: 535234, LAU_300x250_4_header: 535235, LAU_300x250_1_header_mobile: 535236, LAU_300x250_2_header_mobile: 535237, LAU_300x250_3_header_mobile: 535238, LAU_300x250_4_header_mobile: 535239, LAU_300x250_5_header_mobile: 535240, LAU_300x250_6_header_mobile: 535241, RID_728x90_1_header: 535242, RID_728x90_2_header: 535243, RID_728x90_3_header: 535244, RID_728x90_4_header: 535245, RID_728x90_5_header: 535246, RID_160x600_1_header: 535247, RID_160x600_2_header: 535248, RID_160x600_3_header: 535249, RID_160x600_4_header: 535250, RID_300x250_1_header: 535251, RID_300x250_2_header: 535252, RID_300x250_3_header: 535253, RID_300x250_4_header: 535254, RID_300x250_1_header_mobile: 535255, RID_300x250_2_header_mobile: 535256, RID_300x250_3_header_mobile: 535257, RID_300x250_4_header_mobile: 535258, RID_300x250_5_header_mobile: 535259, RID_300x250_6_header_mobile: 535260, ROA_728x90_1_header: 535261, ROA_728x90_2_header: 535262, ROA_728x90_3_header: 535263, ROA_728x90_4_header: 535264, ROA_728x90_5_header: 535265, ROA_160x600_1_header: 535266, ROA_160x600_2_header: 535267, ROA_160x600_3_header: 535269, ROA_160x600_4_header: 535270, ROA_300x250_1_header: 535272, ROA_300x250_2_header: 535273, ROA_300x250_3_header: 535275, ROA_300x250_4_header: 535276, ROA_300x250_1_header_mobile: 535277, ROA_300x250_2_header_mobile: 535278, ROA_300x250_3_header_mobile: 535279, ROA_300x250_4_header_mobile: 535280, ROA_300x250_5_header_mobile: 535281, ROA_300x250_6_header_mobile: 535282, FSB_728x90_1_header: 551766, FSB_728x90_2_header: 551767, FSB_728x90_3_header: 551768, FSB_728x90_4_header: 551770, FSB_728x90_5_header: 551771, FSB_160x600_1_header: 551772, FSB_160x600_2_header: 551773, FSB_160x600_3_header: 551775, FSB_160x600_4_header: 551776, FSB_300x250_1_header: 551777, FSB_300x250_2_header: 551778, FSB_300x250_3_header: 551779, FSB_300x250_4_header: 551780, FSB_300x250_1_header_mobile: 551781, FSB_300x250_2_header_mobile: 551782, FSB_300x250_3_header_mobile: 551784, FSB_300x250_4_header_mobile: 551785, FSB_300x250_5_header_mobile: 551786, FSB_300x250_6_header_mobile: 551787, HWY_728x90_1_header: 551788, HWY_728x90_2_header: 551789, HWY_728x90_3_header: 551790, HWY_728x90_4_header: 551791, HWY_728x90_5_header: 551792, HWY_160x600_1_header: 551793, HWY_160x600_2_header: 551794, HWY_160x600_3_header: 551795, HWY_160x600_4_header: 551796, HWY_300x250_1_header: 551797, HWY_300x250_2_header: 551798, HWY_300x250_3_header: 551799, HWY_300x250_4_header: 551800, HWY_300x250_1_header_mobile: 551802, HWY_300x250_2_header_mobile: 551803, HWY_300x250_3_header_mobile: 551804, HWY_300x250_4_header_mobile: 551805, HWY_300x250_5_header_mobile: 551807, HWY_300x250_6_header_mobile: 551808, HRT_728x90_1_header: 551809, HRT_728x90_2_header: 551810, HRT_728x90_3_header: 551811, HRT_728x90_4_header: 551812, HRT_728x90_5_header: 551813, HRT_160x600_1_header: 551814, HRT_160x600_2_header: 551815, HRT_160x600_3_header: 551816, HRT_160x600_4_header: 551817, HRT_300x250_1_header: 551818, HRT_300x250_2_header: 551819, HRT_300x250_3_header: 551820, HRT_300x250_4_header: 551821, HRT_300x250_1_header_mobile: 551824, HRT_300x250_2_header_mobile: 551825, HRT_300x250_3_header_mobile: 551826, HRT_300x250_4_header_mobile: 551827, HRT_300x250_5_header_mobile: 551828, HRT_300x250_6_header_mobile: 551829 }; var size = placement.substring(0, placement.indexOf('_')); var placement = googletagData.site_code + '_' + placement + "_header"; if (adunit.indexOf('gut_') === 0 || adunit.indexOf('_m_') >= 0) { placement += '_mobile'; } var placementId = map[placement]; var params = { bidder: 'pulsepoint', params: { cf : size, cp : "560810", ct : placementId } }; return params; } function generatebRealtimeParams(placement, adunit) { var map = { ANSWG_728x90_1_header: 10553475, ANSWG_728x90_2_header: 10553477, ANSWG_728x90_3_header: 10553478, ANSWG_728x90_4_header: 10553476, ANSWG_728x90_5_header: 10553479, ANSWG_160x600_1_header: 10553480, ANSWG_160x600_2_header: 10553481, ANSWG_160x600_3_header: 10553482, ANSWG_160x600_4_header: 10553483, ANSWG_300x250_1_header: 10553484, ANSWG_300x250_2_header: 10553485, ANSWG_300x250_3_header: 10553489, ANSWG_300x250_4_header: 10553490, ANSWG_300x250_4_header: 10553490, ANSWG_300x250_1_header_mobile: 10553492, ANSWG_300x250_2_header_mobile: 10553493, ANSWG_300x250_3_header_mobile: 10553494, ANSWG_300x250_4_header_mobile: 10553495, ANSWG_300x250_5_header_mobile: 10553486, ANSWG_300x250_6_header_mobile: 10553487, ANSW_728x90_1_header: 10553488, ANSW_728x90_2_header: 10553497, ANSW_728x90_3_header: 10553496, ANSW_728x90_4_header: 10553499, ANSW_728x90_5_header: 10553498, ANSW_160x600_1_header: 10553500, ANSW_160x600_2_header: 10553502, ANSW_160x600_3_header: 10553501, ANSW_160x600_4_header: 10553503, ANSW_300x250_1_header: 10553504, ANSW_300x250_2_header: 10553505, ANSW_300x250_3_header: 10553509, ANSW_300x250_4_header: 10553508, ANSW_300x250_5_header: 10553507, ANSW_300x250_1_header_mobile: 10553690, ANSW_300x250_2_header_mobile: 10553691, ANSW_300x250_3_header_mobile: 10553510, ANSW_300x250_4_header_mobile: 10553511, ANSW_300x250_5_header_mobile: 10553512, ANSW_300x250_6_header_mobile: 10553513, HEA_728x90_1_header: 10553514, HEA_728x90_2_header: 10553518, HEA_728x90_3_header: 10553521, HEA_728x90_4_header: 10553522, HEA_728x90_5_header: 10553523, HEA_160x600_1_header: 10553524, HEA_160x600_2_header: 10553515, HEA_160x600_3_header: 10553516, HEA_160x600_4_header: 10553517, HEA_300x250_1_header: 10553519, HEA_300x250_2_header: 10553520, HEA_300x250_3_header: 10553528, HEA_300x250_4_header: 10553529, HEA_300x250_4_header: 10553529, HEA_300x250_1_header_mobile: 10553533, HEA_300x250_2_header_mobile: 10553531, HEA_300x250_3_header_mobile: 10553532, HEA_300x250_4_header_mobile: 10553534, HEA_300x250_5_header_mobile: 10553525, HEA_300x250_6_header_mobile: 10553526, LAU_728x90_1_header: 10553527, LAU_728x90_2_header: 10553535, LAU_728x90_3_header: 10553540, LAU_728x90_4_header: 10553539, LAU_728x90_5_header: 10553537, LAU_160x600_1_header: 10553536, LAU_160x600_2_header: 10553538, LAU_160x600_3_header: 10553541, LAU_160x600_4_header: 10553542, LAU_300x250_1_header: 10553543, LAU_300x250_2_header: 10553544, LAU_300x250_3_header: 10553546, LAU_300x250_4_header: 10553547, LAU_300x250_1_header_mobile: 10553545, LAU_300x250_2_header_mobile: 10553550, LAU_300x250_3_header_mobile: 10553548, LAU_300x250_4_header_mobile: 10553549, LAU_300x250_5_header_mobile: 10553551, LAU_300x250_6_header_mobile: 10553552, RID_728x90_1_header: 10553553, RID_728x90_2_header: 10553554, RID_728x90_3_header: 10553557, RID_728x90_4_header: 10553558, RID_728x90_5_header: 10553559, RID_160x600_1_header: 10553560, RID_160x600_2_header: 10553561, RID_160x600_3_header: 10553562, RID_160x600_4_header: 10553563, RID_300x250_1_header: 10553564, RID_300x250_2_header: 10553555, RID_300x250_3_header: 10553556, RID_300x250_4_header: 10553566, RID_300x250_1_header_mobile: 10553567, RID_300x250_2_header_mobile: 10553568, RID_300x250_3_header_mobile: 10553569, RID_300x250_4_header_mobile: 10553570, RID_300x250_5_header_mobile: 10553571, RID_300x250_6_header_mobile: 10553573, ROA_728x90_1_header: 10553572, ROA_728x90_2_header: 10553574, ROA_728x90_3_header: 10553575, ROA_728x90_4_header: 10553576, ROA_728x90_5_header: 10553577, ROA_160x600_1_header: 10553578, ROA_160x600_2_header: 10553580, ROA_160x600_3_header: 10553579, ROA_160x600_4_header: 10553581, ROA_300x250_1_header: 10553582, ROA_300x250_2_header: 10553583, ROA_300x250_3_header: 10553584, ROA_300x250_4_header: 10553585, ROA_300x250_1_header_mobile: 10553586, ROA_300x250_2_header_mobile: 10553587, ROA_300x250_3_header_mobile: 10553588, ROA_300x250_4_header_mobile: 10553589, ROA_300x250_5_header_mobile: 10553590, ROA_300x250_6_header_mobile: 10553591, FSB_728x90_1_header: 10553592, FSB_728x90_2_header: 10553593, FSB_728x90_3_header: 10553594, FSB_728x90_4_header: 10553595, FSB_728x90_5_header: 10553597, FSB_160x600_1_header: 10553598, FSB_160x600_2_header: 10553599, FSB_160x600_3_header: 10553601, FSB_160x600_4_header: 10553600, FSB_300x250_1_header: 10553602, FSB_300x250_2_header: 10553605, FSB_300x250_3_header: 10553603, FSB_300x250_4_header: 10553604, FSB_300x250_1_header_mobile: 10553606, FSB_300x250_2_header_mobile: 10553610, FSB_300x250_3_header_mobile: 10553612, FSB_300x250_4_header_mobile: 10553611, FSB_300x250_5_header_mobile: 10553613, FSB_300x250_6_header_mobile: 10553614, HWY_728x90_1_header: 10553615, HWY_728x90_2_header: 10553616, HWY_728x90_3_header: 10553617, HWY_728x90_4_header: 10553608, HWY_728x90_5_header: 10553609, HWY_160x600_1_header: 10553619, HWY_160x600_2_header: 10553618, HWY_160x600_3_header: 10553620, HWY_160x600_4_header: 10553621, HWY_300x250_1_header: 10553622, HWY_300x250_2_header: 10553623, HWY_300x250_3_header: 10553624, HWY_300x250_4_header: 10553625, HWY_300x250_1_header_mobile: 10553626, HWY_300x250_2_header_mobile: 10553627, HWY_300x250_3_header_mobile: 10553630, HWY_300x250_4_header_mobile: 10553628, HWY_300x250_5_header_mobile: 10553629, HWY_300x250_6_header_mobile: 10553631, HRT_728x90_1_header: 10553632, HRT_728x90_2_header: 10553633, HRT_728x90_3_header: 10553634, HRT_728x90_4_header: 10553635, HRT_728x90_5_header: 10553636, HRT_160x600_1_header: 10553637, HRT_160x600_2_header: 10553645, HRT_160x600_3_header: 10553646, HRT_160x600_4_header: 10553647, HRT_300x250_1_header: 10553648, HRT_300x250_2_header: 10553649, HRT_300x250_3_header: 10553640, HRT_300x250_4_header: 10553641, HRT_300x250_1_header_mobile: 10553643, HRT_300x250_2_header_mobile: 10553642, HRT_300x250_3_header_mobile: 10553644, HRT_300x250_4_header_mobile: 10553652, HRT_300x250_5_header_mobile: 10553653, HRT_300x250_6_header_mobile: 10553689 }; var size = placement.substring(0, placement.indexOf('_')); var placement = googletagData.site_code + '_' + placement + "_header"; if (adunit.indexOf('gut_') === 0 || adunit.indexOf('_m_') >= 0) { placement += '_mobile'; } var placementId = map[placement]; var params = { bidder: 'brealtime', params: { placementId: placementId } }; return params; } function generateAppNexusParams(placement, adUnit) { var placement = googletagData.site_code + '_' + placement + '_header'; if (adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0 ) { placement += '_mobile'; } return { bidder: 'appnexus', params: { invCode: placement, member: 3768 } }; } function generateTripleLiftParams(slot) { var map = { ANSWG: { 'desktop_728x90': "ANSWG_728x90_1_header", 'desktop_300x250': "ANSWG_300x250_1_header", 'mobile_300x250': "ANSWG_300x250_1_header_mobile" }, ANSW: { 'desktop_728x90': "ANSW_728x90_1_header", 'desktop_300x250': "ANSW_300x250_1_header", 'mobile_300x250': "ANSW_300x250_1_header_mobile" } }; if (map[googletagData.site_code]) { var platform = 'desktop'; var adUnit = slot.ad_unit; var size = slot.width+'x'+slot.height; if(adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0){ platform = 'mobile'; } var name = platform + '_' + size; if(map[googletagData.site_code][name]){ return { bidder: 'triplelift', params: { inventoryCode: map[googletagData.site_code][name] } }; } } } function generateDistrictMParams(placement, adUnit) { var map = { ANSWG: { desktop: 9810275, mobile: 9810274 }, LAU: { desktop: 9810277, mobile: 9810276 }, EK: { desktop: 9831674, mobile: 9831675 }, BLE: { desktop: 9831671, mobile: 9831672 }, HEA: { desktop: 9831676, mobile: 9831677 }, RID: { desktop: 9831678, mobile: 9831679 }, RUM: { desktop: 9831680, mobile: 9831681 }, SUP: { desktop: 9831682, mobile: 9831683 }, ANSW: { desktop: 9882447, mobile: 9882448 }, HWY: { desktop: 9905593, mobile: 9905591 }, FSB: { desktop: 9905595, mobile: 9905594 } }; if (map[googletagData.site_code]) { var platform; if(adUnit.indexOf('gut_') === 0 || adUnit.indexOf('_m_') >= 0){ platform = 'mobile'; } else{ platform = 'desktop'; } return { bidder: 'districtm', params: { placementId: map[googletagData.site_code][platform] } }; } else { return; } } function generateAudienceNetworkParams(slot) { var placementID = slot.audienceNetwork_placement_id; if (placementID) { var params = { placementId: placementID }; if (slot.audienceNetwork_ad_format === 'native') { params['native'] = true; } if (googletagData.audienceNetwork_test_mode) { params['testMode'] = true; } return { bidder: 'audienceNetwork', params: params }; } else { return; } } function populateAdUnits() { pbjs.que.push(function() { if (googletagData.districtm_bidder) { pbjs.aliasBidder('appnexus', 'districtm'); } if (googletagData.brealtime_bidder) { pbjs.aliasBidder('appnexus', 'brealtime'); } pbjs.addAdUnits(adUnits); pbjs.bidderSettings = { aol: { bidCpmAdjustment: function(bidCpm) { // 90% rev share with AOL return bidCpm * 0.90; } }, brealtime: { bidCpmAdjustment: function(bidCpm) { // 90% rev share with AOL return bidCpm * 0.80; } } }; }); return this; } function requestBids() { pbjs.que.push(function() { pbjs.requestBids({ timeout: pbjs.timeout, bidsBackHandler: function() { window.initAdServer(); } }); }); return this; } function sendBids() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); }); } function refresh(name) { pbjs.que.push(function() { pbjs.requestBids({ timeout: pbjs.timeout, bidsBackHandler: function() { pbjs.setTargetingForGPTAsync(); $(document).trigger('received_partner_bid-' + name); } }); }); } return { initialize: initialize, registerSlot: registerSlot, lockInAdUnits: populateAdUnits, requestBids: requestBids, setTargeting: sendBids, refresh: refresh }; })(); /* global __page_data__ PrebidManager DfpSlotManagerMixin pbjs PageDepthManager AppContentData amznads d*/ var googletagData = __page_data__['ads_dfpheader2-0'] || {}; var load_group = []; var interstitial_group = []; var custom_1_group = []; var custom_2_group = []; var custom_3_group = []; var PREBID_TIMEOUT = googletagData.header_bidding_timeout; if (!googletagData.openx_bidder) { var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; } if (googletagData.rubicon_bidder) { var rubicontag = rubicontag || {}; rubicontag.cmd = rubicontag.cmd || []; } if (googletagData.indexexchange_bidder) { window.headertag_ready = window.headertag_ready || false; } if (googletagData.new_aol_bidder || googletagData.new_indexexchange_bidder || googletagData.sovrn_bidder || googletagData.appnexus_bidder || googletagData.districtm_bidder || googletagData.triplelift_bidder || googletagData.pulsepoint_bidder || googletagData.brealtime_bidder) { PrebidManager.initialize(PREBID_TIMEOUT); } var gptLoaded = false; function initAdServer() { if (!gptLoaded) { (function() { var gads = document.createElement('script'); gads.async = true; gads.type = 'text/javascript'; var useSSL = document.location.protocol === 'https:'; gads.src = (useSSL ? 'https:' : 'http:') + '//web.archive.org/web/20180331212031/http://www.googletagservices.com/tag/js/gpt.js'; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(gads, node); })(); gptLoaded = true; } } var numExpectedRequests = googletagData.rubicon_bidder + googletagData.indexexchange_bidder; var numReceivedRequests = 0; $(document).on('receivedPrepingBid', function() { numReceivedRequests++; if (numReceivedRequests === numExpectedRequests) { initAdServer(); } }); if (window.headertag_ready) { numReceivedRequests++; } // backup timer to allow for prebidding if (googletagData.rubicon_bidder || (googletagData.indexexchange_bidder && !window.headertag_ready) || pbjs.isEnabled) { setTimeout(initAdServer, PREBID_TIMEOUT); } else { initAdServer(); } var filterObject = function(obj, predicate) { var key; var result = []; for (key in obj) { if (obj.hasOwnProperty(key) && predicate(obj[key])) { result.push(obj[key]); } } return result; }; var dfpheader2 = dfpheader2 || (function() { var isArrayLike = function(variable) { var isObject = typeof variable === 'object'; var hasLength = typeof variable.length === 'number'; return isObject && hasLength; }; var Model = function(model) { // strip unnecessary 'dfp_' prefix from ads/dfpslot configs function normalizeSlotKeys() { var i = 0; while (model.dfpSlots[i]) { var slot = model.dfpSlots[i]; var keys = Object.keys(slot); for (var index = 0; index < keys.length; index++) { var key = keys[index]; if (key.match('dfp_')) { var normalKey = key.replace('dfp_', ''); if (normalKey === 'div_id') { normalKey = 'container_id'; } slot[normalKey] = slot[key]; delete slot[key]; } } model.dfpSlots[i] = slot; i++; } } this.each = function(key, callback) { var value = model[key]; var i; var len; if (typeof value === 'object' && !!value.push) { for (i = 0, len = value.length; i < len; i++) { callback.call(model, value[i]); } } else if (typeof value === 'object') { var keys = Object.keys(value); for (i = 0, len = keys.length; i < len; i++) { callback.call(model, value[keys[i]]); } } }; this.get = function(key) { return typeof model[key] === 'undefined' ? {} : model[key]; }; (function initialize() { if (model.dfpSlots) { normalizeSlotKeys(); } })(); }; // if ads/dfpheader2 config 'load_on_carousel_ready' set to 'on' // && have dfpslot objects && carousel has images // then load make initial call for dfpslots var handleCarouselCoupledSlotInitialization = function() { var initializeSlots = function() { DfpSlotManagerMixin.beforeSlotRefresh(); var slotsToInit = filterObject(DfpSlotManagerMixin.getSlots(), function(slot) { return slot.refresh === true; }); slotsToInit = $.map(slotsToInit, function(slot) { return slot.object; }); // Func '..refresh()' is a misnomer in this case // because disableInitialLoad called, slots have yet to initialize googletag.pubads().refresh(slotsToInit); }; var checkReady = function() { var slots = DfpSlotManagerMixin.getSlots(); var hasSlots = Object.keys(slots).length > 0; if (hasSlots) { var imageWrapper = document.getElementsByClassName('carousel_ui_img-0')[0]; var sectionWrapper = document.getElementsByClassName('subject_section')[0]; var image; var embed; if (!!imageWrapper) { image = imageWrapper.getElementsByTagName('img')[0]; embed = imageWrapper.getElementsByClassName('embed')[0]; if (!!image || !!embed) { window.clearInterval(check); initializeSlots(); } } else if (!!sectionWrapper) { var section = sectionWrapper.getElementsByClassName('section')[0]; if (!!section) { window.clearInterval(check); setTimeout(function() { initializeSlots(); }, 50); } } else { return; } } }; var check = window.setInterval(checkReady, 50); }; var sandboxDfpslots = function() { var whitelist = filterObject(DfpSlotManagerMixin.getSlots(), function(slot) { return slot.sandboxWhitelist; }); Node.prototype.appendChild_ = Node.prototype.appendChild; Node.prototype.appendChild = function(el) { if (el.nodeName === 'IFRAME') { var shouldFilter = true; // never sandbox FB ad iframes if ( this.nodeName === 'FB:AD' || (this.closest && this.closest('fb\\:ad')) || (this.closest && this.closest('.fb-ad')) || (this.closest && this.closest('.fb_iframe_widget')) || (this.closest && this.closest('.fb-page')) || (this.closest && this.closest('.fb-banner')) || (window.jQuery && jQuery(this).closest('fb\\:ad').length) || (window.jQuery && jQuery(this).closest('.fb-page').length) || (window.jQuery && jQuery(this).closest('.fb-ad').length) || (window.jQuery && jQuery(this).closest('.fb_iframe_widget').length) || (window.jQuery && jQuery(this).closest('.fb-banner').length) || (el.src && el.src.search('facebook.com') !== -1 && el.src.search('plugins/ad.php') !== -1) ) { shouldFilter = false; } if (shouldFilter && whitelist.length > 0) { for (var i = 0, len = whitelist.length; i < len; i++) { if (whitelist[i].ad_unit && el.id.search(whitelist[i].ad_unit) !== -1) { shouldFilter = false; } } } if (shouldFilter) { el.sandbox = 'allow-forms allow-popups allow-scripts allow-same-origin'; } } Node.prototype.appendChild_.apply(this, arguments); return el; }; var documentWriteFilter = function(html) { try { var shouldFilter = false; // never sandbox FB ad iframes if (html && !(html.search('facebook.com') !== -1 && html.search('plugins/ad.php') !== -1)) { shouldFilter = true; if (whitelist.length > 0) { for (var i = 0, len = whitelist.length; i < len; i++) { // could generate false positives, if becomes an issue make more specific if (whitelist[i].ad_unit && html.search(whitelist[i].ad_unit) !== -1) { shouldFilter = false; } } } } if (shouldFilter) { html = html.replace(/