/**/
cXJsonpCBkwvgq13nm9nabgwk({"httpStatus":200,"response":{"items":[{"type":"free","campaign":"1","testId":"16"}],"template":"<!--%\nvar item = data.response.items[0];\n\nwindow.pageNotificationCampaignData = {\n  messageId: item['Message Id'] || 'default',\n  placementId: item['Placement Id'] || 'default',\n  channelId: item['Channel Id'] || 'default',\n  campaignId: item['Campaign Id'] || 'default',\n  cellCodeId: item['Cellcode Id'] || 'default',\n  suppressId: item['Suppress Value'] || 'default',\n  modCode: item['Mod Code'] || cxenseOffers.getModCode(item.url) || 'default',\n  trackCode: item['Track Code'] || 'default',\n  sourceKey: item['Source Key'] || 'default',\n  brand: item.Brand || 'default',\n  campaignType: item['Campaign Type'] || 'default',\n  campaignName: item['Campaign Name'] || 'default'\n};\n%-->\n\n<!--%\nif (item.templateName === 'GDPR Notification') {\n%-->\n  <div tmp:id=\"cx-notification-wrapper\" data-campaign-id=\"{{item.campaign}}\">\n    <div tmp:class=\"notification-msg\">\n      <div tmp:class=\"notification-msg-wrapper\">\n        <div tmp:class=\"notification-title\">Cookie Notice</div>\n        <div tmp:class=\"notification-description\">\n          We use cookies for analytics, advertising and to improve our site.\n          You agree to our use of cookies by closing this message box or continuing to use our site.\n          To find out more, including how to change your settings, see our\n          <div tmp:class=\"notification-action\">\n            <a tmp:id=\"{{cX.CCE.clickTracker(item)}}\" tmp:href=\"{{item['url']}}\" tmp:target=\"_top\">Cookie Notice</a>\n          </div>\n        </div>\n        <div tmp:class=\"notification-btn-wrapper\">\n          <div tmp:class=\"gdpr-close close-btn\" title=\"Close\">\n            <svg viewbox=\"0 0 30 30\">\n              <path d=\"M 10,10 L 20,20 M 20,10 L 10,20\"/>\n            </svg>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n<!--%\n} else if (item.templateName == 'Page Notification') {\n  var title = item['Title'];\n  var btxt = item['Button Text'];\n%-->\n  <div tmp:id=\"cx-notification-wrapper\" data-campaign-id=\"{{item.campaign}}\">\n    <div tmp:class=\"notification-msg\">\n      <div tmp:class=\"notification-msg-wrapper\">\n        <!--% if(title && title.length){ %-->\n        <div tmp:class=\"notification-title\">{{item['Title']}}</div>\n        <!--% } %-->\n        <div tmp:class=\"notification-description\">\n          {{item['Description']}}\n          <!--% if(btxt && btxt.length){ %-->\n          <div tmp:class=\"notification-action\">\n            <a tmp:id=\"{{cX.CCE.clickTracker(item, cxHandlePageNotificationCtaButtonClick)}}\" tmp:href=\"{{item['url']}}\" tmp:target=\"_top\" tmp:title=\"{{item['Title']}}\">\n              {{btxt}}\n            </a>\n          </div>\n          <!--% } %-->\n        </div>\n        <div tmp:class=\"notification-btn-wrapper\">\n          <div tmp:class=\"close-btn\" title=\"Close\">\n            <svg viewbox=\"0 0 30 30\">\n              <path d=\"M 10,10 L 20,20 M 20,10 L 10,20\"/>\n            </svg>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n<!--%\n  cxHandlePageNotificationOmniChannelCheck(); %-->\n\n<!--%\n} else if (item.templateName == 'Page Notification - AdobeID Link') {\n  var title = item['Title'];\n  var btxt = item['Button Text'];\n%-->\n  <div tmp:id=\"cx-notification-wrapper\" data-campaign-id=\"{{item.campaign}}\">\n    <div tmp:class=\"notification-msg\">\n      <div tmp:class=\"notification-msg-wrapper\">\n        <!--% if(title && title.length){ %-->\n        <div tmp:class=\"notification-title\">{{item['Title']}}</div>\n        <!--% } %-->\n        <div tmp:class=\"notification-description\">\n          {{item['Description']}}\n          <!--% if(btxt && btxt.length){ %-->\n          <div tmp:class=\"notification-action\">\n            <a tmp:id=\"{{cX.CCE.clickTracker(item, cxHandlePageNotificationAdobeIdCtaButtonClick)}}\" tmp:href=\"{{item['url']}}\" tmp:target=\"_top\" tmp:title=\"{{item['Title']}}\">\n              {{btxt}}\n            </a>\n          </div>\n          <!--% } %-->\n        </div>\n        <div tmp:class=\"notification-btn-wrapper\">\n          <div tmp:class=\"close-btn\" tmp:title=\"Close\">\n            <svg viewbox=\"0 0 30 30\">\n              <path d=\"M 10,10 L 20,20 M 20,10 L 10,20\"/>\n            </svg>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n<!--%\n} else if (item.templateName == 'Page Notification - Vxid') {\n  var title = item['Title'];\n  var btxt = item['Button Text'];\n%-->\n  <div tmp:id=\"cx-notification-wrapper\" data-campaign-id=\"{{item.campaign}}\">\n    <div tmp:class=\"notification-msg\">\n      <div tmp:class=\"notification-msg-wrapper\">\n        <!--% if(title && title.length){ %-->\n        <div tmp:class=\"notification-title\">{{item['Title']}}</div>\n        <!--% } %-->\n        <div tmp:class=\"notification-description\">\n          {{item['Description']}}\n          <!--% if(btxt && btxt.length){ %-->\n          <div tmp:class=\"notification-action\">\n            <a tmp:id=\"{{cX.CCE.clickTracker(item, cxHandlePageNotificationVxidCtaButtonClick)}}\" tmp:href=\"{{item['url']}}\" tmp:target=\"_top\" tmp:title=\"{{item['Title']}}\">\n              {{btxt}}\n            </a>\n          </div>\n          <!--% } %-->\n        </div>\n        <div tmp:class=\"notification-btn-wrapper\">\n          <div tmp:class=\"close-btn\" tmp:title=\"Close\">\n            <svg viewbox=\"0 0 30 30\">\n              <path d=\"M 10,10 L 20,20 M 20,10 L 10,20\"/>\n            </svg>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n<!--%\n} else if (item.custom === 'policy') {\n  cxdj.trackPolicy('wsjcpoct2017');\n\n} else if(item.campaign == '231') {\n  hok3RaV1(item);\n\n} else if (item.widgetId && item.divId) {\n  if (cxenseOffers.hasDivId(item.divId)) {\n    cxenseOffers.requestCCEOffer(item.widgetId, item.divId);\n  }\n}\n%-->\n","style":"#cx-notification-wrapper .notification-msg {\n  width: 100%;\n  position: relative;\n  border-bottom: solid 1px #ddd;\n  background-color: #eee;\n}\n\n#cx-notification-wrapper .notification-msg-wrapper {\n  display: flex;\n  margin: 0 auto;\n  overflow: auto;\n  box-sizing: border-box;\n}\n\n#cx-notification-wrapper .notification-title {\n  display: inline-block;\n  font-family: 'Retina Narrow', Arial, Helvetica, sans-serif;\n  font-size: 14px;\n  color: #333;\n  text-align: left;\n  text-transform: uppercase;\n  letter-spacing: 0.37px;\n}\n\n#cx-notification-wrapper .notification-description {\n  display: inline-block;\n  flex-grow: 100;\n  margin: 0;\n  font-family: \"Retina\", sans-serif;\n  font-size: 14px;\n  font-weight: 400;\n  color: #333333;\n  text-align: left;\n  box-sizing: border-box;\n}\n#cx-notification-wrapper .notification-action {\n  display: inline-block;\n}\n\n#cx-notification-wrapper a {\n  font-family: \"Retina\", sans-serif;\n  color: #333;\n  text-decoration: underline;\n  cursor: pointer;\n}\n\n#cx-notification-wrapper a:hover {\n  color: #000;\n}\n\n#cx-notification-wrapper .notification-btn-wrapper {\n  display: inline-block;\n  flex-grow: 1;\n  float: right;\n  margin: 0 0 0 10px;\n  width: 20px;\n}\n\n#cx-notification-wrapper .close-btn {\n  width: 18px;\n  height: 18px;\n  cursor: pointer;\n  z-index: 100;\n  display: inline-block;\n  border: 1px solid #333;\n  border-radius: 50%;\n}\n\n#cx-notification-wrapper .close-btn:hover {\n  border: 1px solid #999;\n  background: #fff;\n  transition: all 0.25s;\n}\n\n#cx-notification-wrapper .close-btn svg {\n  stroke: #000;\n  fill: transparent;\n  stroke-linecap: round;\n  stroke-width: 2;\n}\n\n#cx-notification-wrapper .close-btn:hover svg {\n  stroke: #999;\n  transition: all 0.25s\n}\n\n\n/* 16U */\n\n@media all and (min-width:1301px) {\n  #cx-notification-wrapper .notification-msg-wrapper {\n    width: 1260px;\n    padding: 20px 0;\n  }\n  #cx-notification-wrapper .notification-title {\n    float: left;\n    min-width: 140px;\n    max-width: 140px;\n    margin: 0 20px 0 0;\n    line-height: 22px;\n  }\n  #cx-notification-wrapper .notification-description {\n    float: left;\n    line-height: 22px;\n  }\n}\n\n\n/* 12U */\n\n@media all and (min-width: 981px) and (max-width: 1300px) {\n  #cx-notification-wrapper .notification-msg-wrapper {\n    width: 970px;\n    padding: 20px 0;\n  }\n  #cx-notification-wrapper .notification-title {\n    float: left;\n    min-width: 140px;\n    max-width: 140px;\n    margin: 0 20px 0 0;\n    line-height: 22px;\n  }\n  #cx-notification-wrapper .notification-description {\n    float: left;\n    line-height: 22px;\n  }\n}\n\n\n/* 8U */\n\n@media all and (min-width: 641px) and (max-width: 980px) {\n  #cx-notification-wrapper .notification-msg-wrapper {\n    width: 100%;\n    padding: 20px 10px;\n  }\n  #cx-notification-wrapper .notification-title {\n    float: left;\n    min-width: 140px;\n    max-width: 140px;\n    margin: 0 20px 0 0;\n    line-height: 20px;\n  }\n  #cx-notification-wrapper .notification-description {\n    float: left;\n    line-height: 20px;\n  }\n}\n\n\n/* 4U */\n\n@media all and (max-width: 640px) {\n  #cx-notification-wrapper {\n    height: inherit;\n  }\n  #cx-notification-wrapper .notification-msg-wrapper {\n    display: block;\n    padding: 10px;\n    width: 100%\n  }\n  #cx-notification-wrapper .notification-title {\n    float: none;\n    width: calc(100% - 22px);\n    margin-bottom: 10px;\n    line-height: 16px;\n  }\n  #cx-notification-wrapper .notification-description {\n    float: none;\n    width: calc(100% - 22px);\n    line-height: 20px;\n  }\n  #cx-notification-wrapper .notification-btn-wrapper {\n    position: absolute;\n    right: 10px;\n    top: 10px;\n  }\n}\n\n.hok-3R-V1 .notification-msg-wrapper {\n  padding: 10px 0 1px 0;\n  max-width: 839px !important;\n}\n\n.hok-3R-V1 .notification-title {\n  font-size: 21px !important;\n  letter-spacing: 1.5px !important;\n}\n\n.hok-3R-V1 .notification-description {\n  font-size: 16px;\n  font-weight: 500;\n  letter-spacing: 0.5px;\n  margin: 15px 0 17px 0;\n}\n\n.hok-3R-V1 .notification-action a {\n  letter-spacing: 1px;\n  padding: 10px 15px !important;\n  background-color: #fff !important;\n  color: #000 !important;\n}\n","head":"window.requestAnimationFrame(function() {\n  handleCloseButtonClick();\n\n  function handleCloseButtonClick() {\n    var $wrapper = document.querySelector('#cx-notification-wrapper');\n    if (!$wrapper) { return; }\n\n    var $closeButton = $wrapper.querySelector('.close-btn');\n    if (!$closeButton) { return; }\n\n    var campaignData = window.pageNotificationCampaignData;\n\n    $closeButton.addEventListener('click', function (event) {\n      event.stopPropagation();\n      campaignData.hideType = 'closeButton';\n\n      if ($closeButton.className.indexOf('gdpr-close') > -1) {\n        cxdj.trackPolicy('wsjcpoct2017');\n        cxdj.reportInteractionEvent('notificationHide', campaignData);\n      } else {\n        if (campaignData.suppressId !== 'default') {\n          cxdj.annotateUserProfile(campaignData.suppressId);\n        }\n        cxdj.reportInteractionEvent('notificationClose', campaignData);\n      }\n      cxenseOffers.fadeOut($wrapper, 50);\n    });\n  }\n});\n\nfunction cxHandlePageNotificationOmniChannelCheck() {\n  var campaignData = window.pageNotificationCampaignData;\n  cxdj.reportInteractionEvent('notificationView', campaignData);\n}\n\nfunction cxHandlePageNotificationCtaButtonClick(item) {\n  var $wrapper = document.querySelector('#cx-notification-wrapper');\n  var campaignData = window.pageNotificationCampaignData;\n  var currentUrl;\n\n  if (window.location.href) {\n    currentUrl = encodeURIComponent(window.location.href.replace(window.location.search, ''));\n  }\n\n  cxGetRenewUrl(item, function () {\n    //Auto Suppress on Button Click if a Suppress Value is found\n    if (campaignData.suppressId !== 'default') {\n      cxdj.annotateUserProfile(campaignData.suppressId);\n    }\n    var redirectUrl = addCurrentUrlToEduRedirectUrl(currentUrl, item.url);\n\n    if (item.campaign === '195' || item.campaign === '130') {\n      addTokentoRedirectUrl(redirectUrl, function (redirectUrl) {\n        cxenseOffers.fadeOut($wrapper, 50, function () {\n          window.location.href = redirectUrl;\n        });\n        cxdj.reportInteractionEvent('notificationClick', campaignData);\n      });\n    } else {\n      cxenseOffers.fadeOut($wrapper, 50, function () {\n        window.location.href = redirectUrl;\n      });\n      cxdj.reportInteractionEvent('notificationClick', campaignData);\n    }\n  });\n\n  function addTokentoRedirectUrl(url, cb) {\n    if (!url || url.length === 0) { return; }\n\n    var key = 'wsj-mansion-global-token';\n\n    cxenseOffers.get1stPartyData(key, function (error, token) {\n      url += (url.indexOf('?') !== -1 ? '&' : '?') + 'token=' + token;\n      if (typeof cb === 'function') {\n        cb(url);\n      }\n    });\n  }\n\n  function addCurrentUrlToEduRedirectUrl(currentUrl, url) {\n    var reg = /^(http|https)?:\\/\\/(partner\\.wsj\\.com\\/partner\\/)([^\\/]|[^\\?])*$/i;\n    var insertPosition;\n\n    if (reg.test(url)) {\n      insertPosition = url.indexOf('?');\n\n      if (insertPosition > 0) {\n        url = url.substring(0, insertPosition) + (url[insertPosition - 1] === '/' ? '' : '/') + currentUrl + url.substring(insertPosition);\n      } else {\n        url += (url[url.length - 1] === '/' ? '' : '/') + currentUrl;\n      }\n    }\n    return url;\n  }\n}\n\nfunction hok3RaV1() {\n  document.querySelector('body').classList.add('hok-3R-V1');\n\n  window.requestAnimationFrame(function () {\n    //change description copy\n    var copy = document.querySelector('#cx-notification-wrapper .notification-description');\n    copy.innerText = 'The credit card we have on file for your WSJ membership may be invalid. To avoid any unintended interruptions to your service, please take a moment to update your credit card details now.';\n\n    //change CTA copy\n    var cta = document.querySelector('#cx-notification-wrapper .notification-action a');\n    cta.innerText = 'UPDATE MY CREDIT CARD';\n\n    //change CTA url\n    cta.href = 'https://customercenter.wsj.com/payment';\n\n    //pushing the navigation bar down if the banner is visible\n    var topDiv = document.querySelector('.style__hat_1vqyrZZ3j7vMCXYKbvaqKa');\n    var bannerVisibleOrNot = setInterval(function () {\n      if (document.querySelector('#cx-notification-wrapper').style.display !== 'none') {\n        clearInterval(bannerVisibleOrNot);\n        topDiv.style.marginBottom = '57px';\n      } else if (document.querySelector('#cx-notification-wrapper').style.display === 'none') {\n        clearInterval(bannerVisibleOrNot);\n        topDiv.style.marginBottom = '0px';\n      }\n    }, 50);\n\n  });\n\n}\n\nfunction cxHandlePageNotificationAdobeIdCtaButtonClick(item) {\n  var campaignData = window.pageNotificationCampaignData;\n  var redirectUrl = addAdobeIdToRedirectUrl(item.url);\n  window.location.href = redirectUrl;\n  cxdj.reportInteractionEvent('notificationClick', campaignData);\n\n  function addAdobeIdToRedirectUrl(url) {\n    if (!url || url.length === 0) { return; }\n\n    var adobeCookie = cxdj.getOmnitureCookieValue();\n    if (adobeCookie && adobeCookie.mcmid) {\n      url += (url.indexOf('?') !== -1 ? '&' : '?') + 'adobeid=' + adobeCookie.mcmid;\n    }\n    return url;\n  }\n}\n\nfunction cxHandlePageNotificationVxidCtaButtonClick(item) {\n  var $wrapper = document.querySelector('#cx-notification-wrapper');\n  var campaignData = window.pageNotificationCampaignData;\n\n  cxGetRenewUrl(item, function () {\n    //Auto Suppress on Button Click if a Suppress Value is found\n    if (campaignData.suppressId !== 'default') {\n      cxdj.annotateUserProfile(campaignData.suppressId);\n    }\n\n    var redirectUrl = addVxidToRedirectUrl(item.url);\n    cxenseOffers.fadeOut($wrapper, 50, function () {\n      window.location.href = redirectUrl;\n    });\n    cxdj.reportInteractionEvent('notificationClick', campaignData);\n  });\n\n  function addVxidToRedirectUrl(url) {\n    if (!url || url.length === 0) { return; }\n\n    var vxid = cxenseOffers.getVxid();\n    url += (url.indexOf('?') !== -1 ? '&' : '?') + 'vxid=' + vxid;\n\n    return url;\n  }\n}\n\nfunction cxGetRenewUrl(item, cb) {\n  var trackCode = item['Track Code'] || 'default';\n\n  if (item['Message Id'] === \"on_renew\") {\n    cxenseOffers.getUserRenewLink(trackCode, function (error, url) {\n      if (!error && url) {\n        item.url = url;\n      }\n      if (typeof cb === 'function') {\n        cb();\n      }\n    });\n  } else {\n    if (typeof cb === 'function') {\n      cb();\n    }\n  }\n}\n\n","prnd":"kwvgpyhp7u56htvz"}})