(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":948,"name":"TMB - Reader's Digest","cookie_name":"bounceClientVisit948","domain":"rd.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"bouncex.failCampaignTypeOnImpression=function(impressedCampaignId, campaignTypeToFail){\n var campaigns = window.bouncex && window.bouncex.campaigns;\n for (var campaignId in campaigns) {\n if (campaignId != impressedCampaignId && campaigns[campaignId].type == campaignTypeToFail) {\n bouncex.campaigns[campaignId].failed = true;\n }\n }\n};\n\n /* enable.feature.NEWSLETTER_IN_A_BOX */ \n/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */\n/* enable.feature.UID2 */\n","force_https":false,"waypoints":false,"content_width":0,"gai":"UA-17041328-1","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":1},"burls":[{"prop":"contains","val":"/newsletters/"},{"prop":"contains","val":"rd.test.rda.net"},{"prop":"contains","val":"/communityhealthheroes/"}],"ple":false,"fbe":true,"mas":2,"map":1,"gar":false,"ete":1,"ettm":false,"etjs":"//Use WID 948 Readers Digest as base for all changes\n//Last Update to Master 9/16 - KK\nvar globalConfig = {\n '948': {\n domain : 'rd.com',\n subscription_url: 'https://order.readersdigest.com/pubs/'\n },\n '933': { \n domain : 'familyhandyman.com'\n },\n '934': { \n domain : 'tasteofhome.com'\n }\n},\nconfig = makeConfig();\n\nfunction makeConfig() {\n config = globalConfig[bouncex.website.id];\n config.subscription_url = config.subscription_url || 'https://order.' + config.domain + '/pubs/';\n\n return config;\n}\n\nfunction isValidDomain(currentUrl) {\n return currentUrl.indexOf(config.domain) > -1 || currentUrl.indexOf(config.subscription_url) > -1;\n}\n\nfunction isEn() {\n var lang = jQuery('html').attr('lang') || '';\n\treturn lang === 'en-US' || lang === 'en';\n}\n\nfunction init(){\n var currentUrl = bouncex.utils.url.allowParams() || \"\";\n\n if (!(isValidDomain(currentUrl) && isEn())) {\n return;\n }\n\n if (bouncex.cookie.vpv === 1) {\n bouncex.push(['view_content', {}]);\n }\n\n if (config.subscription_url && currentUrl.toLowerCase().indexOf(config.subscription_url) > -1) {\n bouncex.push(['view_subscription', {}]);\n }\n \n // if (isArticle()){\n // initializeItemEvents()\n // }\n}\n\ninit();\n\n/*********** Newsletter in a box testing ****************/\n\n// existing article page has a different expression that doesnt meet our needs \nfunction isArticle(){\n return jQuery('meta[property=\"og:type\"]').attr('content') === 'article';\n}\n\nfunction getItemId(){\n var urlArray = bouncex.utils.url.allowParams().split('/');\n \n return urlArray[urlArray.length - 2];\n}\n\nfunction getItem() {\n return {\n id: getItemId(),\n copy: jQuery('meta[property=\"og:title\"]').attr('content'),\n category: jQuery('#breadcrumbs a').eq(-1).attr('data-name'),\n url: bouncex.utils.url.allowParams(),\n imageurl: jQuery('meta[property=\"og:image\"]').attr('content'),\n instock: true,\n date: digitalData.page.content.modifiedDate\n };\n}\n\nfunction fireViewItem(item) {\n var pushItem = {\n 'item:id': item.id,\n };\n bouncex.push(['view item', pushItem]);\n\n return;\n} \n\n\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function() {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl &&\n !!item.date\n },\n function() {\n bouncex.push(['item', item]);\n fireViewItem(item);\n return;\n },\n 10\n );\n\n return;\n}\n\n\n","dge":true,"bxidLoadFirst":false,"pie":false,"cme":true,"gbi_enabled":1,"bpush":false,"pt":{"article":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('body.single-post').length > 0 ;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('body.category, body.tag-diabetes, body.tag-cartoons').length > 0;"},{"activation":"current_page_url","prop":"exactly","prop2":"","prop3":"","val":"https://www.rd.com/videos/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('tmbi_ad_data.global_targeting.pageType', false) === 'category';"}]]},"gallery":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('body.single-listicle').length > 0 ;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/list/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('body.home').length > 0 ;"}]]},"listicle":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('body.single-listicle').length > 0;"}],[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/list/"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.search.search-results').length > 0;"}]]}},"els":{"endcap":".post-body","infeed":"body:not(.listicle-template-default) .post-body > p:not(:has(img, strong)):not(:eq(0)) + p:not(:has(img, strong)):not(:last), body:not(.listicle-template-default) .post-body > p:not(:has(img, strong)):not(:eq(0)) + .bxc + p:not(:has(img, strong):not(:last), body:not(.listicle-template-default) .content-wrapper p:not(:eq(0)) + p:not(:last), body:not(.listicle-template-default) .content-wrapper p:not(:eq(0)) + .bxc + p:not(:last), .listicle-page .content-wrapper .listicle-card p:not(:eq(0), :eq(1), :eq(2), :eq(3), :eq(4), .listicle-page__cta-button-shop) + p:not(.listicle-page__cta-button-shop), .listicle-page .content-wrapper .listicle-card p:not(:eq(0), :eq(1), :eq(2), :eq(3), :eq(4), .listicle-page__cta-button-shop) + .bxc + p:not(.listicle-page__cta-button-shop)","masthead":"#content"},"vars":[{"name":"curr_category","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {\n if(window.location.href.indexOf('http://www.rd.com/health/') !== -1) {\n return 'Health';\n}\n else if(window.location.href.indexOf('http://www.rd.com/food/') !== -1) {\n return 'Food';\n}\n else if(window.location.href.indexOf('http://www.rd.com/advice/') !== -1) {\n return 'Advice';\n}\n else if(window.location.href.indexOf('http://www.rd.com/home/') !== -1) {\n return 'Home';\n}\n else if(window.location.href.indexOf('http://www.rd.com/true-stories/') !== -1) {\n return 'True Stories';\n}\n else if(window.location.href.indexOf('http://www.rd.com/joke') !== -1) {\n return 'Jokes';\n}\n else if(window.location.href.indexOf('http://beta.games.rd.com/') !== -1) {\n return 'Games';\n}\n})();\n\n","trigger":""},{"name":"article_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var $article = jQuery('#genesis-content').find('article');\n if($article.length === 1 || jQuery('section').hasClass('featured-joke-wrapper')){\n if ($article.hasClass('format-standard') || jQuery('section').hasClass('featured-joke-wrapper')) {\n return 'article';\n } else if (jQuery('.rd-listicle-page').length > 0) {\n return 'slideshow';\n } else if (jQuery('.rd-listicle-page').length === 0) {\n return 'gallery';\n }\n } \n return false; \n})();","trigger":""},{"name":"load_perf","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"","code":"/*namik:testing*/\n(function(){\n if(typeof performance != 'undefined' && performance.timing && performance.timing.navigationStart){\n\t\t\treturn (getTimeMs()-performance.timing.navigationStart);\n\t\t} else {\n\t\t\treturn -1;\n\t\t}})();","trigger":""},{"name":"slide_depth","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (jQuery('.rd-listicle-page').length > 0) {\n var slide = jQuery('.rd-listicle-page:not(.rd-card-hidden)');\n var slideNumber = slide[0].classList.value.match(/[0-9]+/g);\n return Number(slideNumber[0]);\n }\n return false; \n})()","trigger":""},{"name":"over_ten","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n bouncex.rd_timer = bouncex.rd_timer || 0;\n bouncex.rd_timer += 1;\n if(bouncex.overlay_visible){\n return null;\n }\n if(bouncex.rd_timer >= 9){\n return true;\n }\n return false;\n})();\n","trigger":""},{"name":"article_name","polling":"none","persist":"no","page_types":["article","gallery"],"testmode":false,"default":"","code":"jQuery('meta[name=pageName]').attr('content');","trigger":""},{"name":"article_category","polling":"none","persist":"no","page_types":["article","gallery"],"testmode":false,"default":"","code":"window.digitalData.page.subCategory.toLowerCase();","trigger":""},{"name":"imageurl","polling":"none","persist":"no","page_types":["article","gallery"],"testmode":false,"default":"","code":"jQuery('meta[property=\"og:image\"]').attr('content');","trigger":""},{"name":"category_title","polling":"none","persist":"no","page_types":["category"],"testmode":false,"default":"","code":"jQuery('meta[property=\"og:title\"]').attr('content');","trigger":""},{"name":"sponsored_article","polling":"none","persist":"no","page_types":["article","gallery"],"testmode":false,"default":"false","code":"location.pathname.indexOf('sponsored') > -1 || (jQuery('meta[name=pageName]').attr('content') || '').toLowerCase().indexOf('sponsored') > -1;","trigger":""},{"name":"content_cat","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":" (function(){\n var pathname = window.location.pathname;\n\n if (pathname.indexOf('/health/') > -1 || pathname.indexOf('/diabetes/') > -1){\n return 'Health Advice and Tips';\n } else if (pathname.indexOf('/food/') > -1){\n return 'Recipes and Tips';\n } else if (pathname.indexOf('/advice/') > -1 || pathname.indexOf('/home/') > -1){\n return 'All-Around Advice';\n } else if (pathname.indexOf('/true-stories/') > -1){\n return 'True Stories';\n } else if (pathname.indexOf('/jokes/') > -1){\n return 'Funniest Jokes';\n } else if (pathname.indexOf('/games/') > -1 || window.location.host.indexOf('games') > -1){\n return 'Online Games';\n } else {\n return 'Essential Stories';\n }\n })();","trigger":""},{"name":"page_type","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tif (bouncex.website.pts === 'article' && bouncex.utils.getNestedProp('digitalData.page.category.pageType') === 'subscription') {\n\t\treturn 'subscription';\n\t} else {\n\t\treturn bouncex.website.pts;\n\t}\n})();","trigger":"pageload"},{"name":"ad_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.before-content-ad-wrapper iframe:visible').length > 0;","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('input[name=\"cds_email\"]').val() !== \"\" ? true : null;","trigger":"pageload"},{"name":"notification_status","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.psh !== undefined && bouncex.psh.getCurrentPermission();","trigger":"pageload"},{"name":"using_edge_browser","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.browser.edge !== false;","trigger":"pageload"},{"name":"is_sponsor","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('digitalData.page.content.contentType') === 'hubs';","trigger":"pageload"},{"name":"is_homepage","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('digitalData.page.content.contentType') === 'homepage';","trigger":"pageload"},{"name":"dfp_rblock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (!bouncex.dfpRan) {\n bouncex.dfpRan = true;\n return 'not_ready';\n }\n function check() {\n bouncex.dfp_loaded = false || bouncex.dfp_loaded;\n var slots = window.googletag && typeof googletag.pubads == 'function' && typeof googletag.pubads().getSlots == 'function'? googletag.pubads().getSlots() : [];\n var numSlots = slots.length;\n for (var i = 0; i < numSlots; i++) {\n var slotInfo = slots[i] && typeof slots[i].getResponseInformation == 'function'? slots[i].getResponseInformation() : false;\n if (slotInfo && (slotInfo.lineItemId || slotInfo.sourceAgnosticLineItemId)) {\n var lineItemId = slotInfo.lineItemId || slotInfo.sourceAgnosticLineItemId;\n bouncex.dfp_loaded = true;\n if (bouncex.website.gbi.rblocks && bouncex.website.gbi.rblocks.indexOf(lineItemId) > -1) {\n return 'sponsor';\n }\n }\n }\n if (bouncex.dfp_loaded) {\n return 'allow';\n }\n return 'not_ready';\n }\n if (bouncex.website.gbi.rblocks) {\n if (!bouncex.website.gbi_enabled) {\n return 'disabled';\n } else if (bouncex.dfp_loaded) {\n return null;\n } else if (window.googletag && googletag.apiReady && googletag.pubadsReady) {\n return check();\n } else if (typeof window.googletag === 'undefined') {\n return 'no_googletag';\n }\n return 'fallback';\n } else {\n return 'not_ready';\n }\n})()","trigger":"pageload"},{"name":"backfill_deployment","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"bouncex.gbi2 ? bouncex.gbi2.getFailedDeployments().join(',') : '';","trigger":"pageload"},{"name":"subscription_fired","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"site_section","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var keyWords = bouncex.utils.getNestedProp('tmbi_ad_data.global_targeting.keywords');\n if(keyWords === 'nokeywords') {\n return false;\n }\n return keyWords;\n})();","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":null,"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":1},"pubs":{"enabled":1},"websdk":{"enabled":0},"ga4_property_id":"","ga4_measurement_id":""} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 0 }; bouncex.assets = {"ads":"0109586821763416266dd874f087ef69","creativesBaseStyles":"a53944a2","inbox":"749c9ccd613f1a40075d1e7b59caea42","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_f63930b37a25405c0fe14c50976210bb.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-adcb","Value":"bouncex.dg.getAdsOptStatus"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();