(function () {
function run() {
try {
var ROOT = 'https://www.nationaljewish.org';
// Slug → display name conversion
var SLUG_OVERRIDES = {
// Topic-level slugs whose default title-casing looks wrong
'asthma-breathing': 'Asthma & Breathing',
'avoid-treat-insect-stings': 'Avoid & Treat Insect Stings',
'eczema-atopic-dermatitis': 'Eczema & Atopic Dermatitis',
'espanol': 'Español',
'kids-health': "Kids' Health",
'living-with-a-work-related-condition': 'Living with a Work-Related Condition',
'living-with-interstitial-lung-disease-ild': 'Living with Interstitial Lung Disease (ILD)',
'living-with-ipf': 'Living with IPF',
'living-with-pulmonary-hypertension-ph': 'Living with Pulmonary Hypertension (PH)',
'living-with-sarcoidosis': 'Living with Sarcoidosis',
'multimedia': 'Multimedia',
'smoking-vaping': 'Smoking & Vaping',
'what-is-primary-immunodeficiency': 'What Is Primary Immunodeficiency'
};
// Per-word acronym uppercase rules (applied when default title-casing fires)
var ACRONYMS = {
'ada': 'ADA', 'afib': 'AFib', 'ai': 'AI', 'als': 'ALS', 'ards': 'ARDS',
'cad': 'CAD', 'copd': 'COPD', 'cpap': 'CPAP', 'eia': 'EIA',
'fpies': 'FPIES', 'gerd': 'GERD', 'ibd': 'IBD', 'ild': 'ILD',
'ipf': 'IPF', 'mrsa': 'MRSA', 'ntm': 'NTM', 'oas': 'OAS',
'ph': 'PH', 'rsv': 'RSV', 'vcd': 'VCD'
};
var SMALL_WORDS = ['a','an','and','at','by','for','in','of','on','or','the','to','with','as','but','from'];
function prettifySlug(slug) {
if (!slug) return '';
var lower = slug.toLowerCase();
if (SLUG_OVERRIDES[lower]) return SLUG_OVERRIDES[lower];
var words = lower.split('-');
return words.map(function (w, i) {
if (!w) return w;
if (ACRONYMS[w]) return ACRONYMS[w];
if (i > 0 && SMALL_WORDS.indexOf(w) !== -1) return w;
return w.charAt(0).toUpperCase() + w.slice(1);
}).join(' ');
}
var RULES = [
{
name: 'conditions',
match: /^\/conditions\/[^\/]+\/?$/i,
trail: [
{ name: 'Conditions', path: '/conditions' }
],
excludedSlugs: [
'interstitial-lung-disease-ild-center',
'interstitial-lung-disease-ild',
'ild-pf'
]
},
{
name: 'doctors',
match: /^\/doctors-departments\/doctors\/[^\/]+\/?$/i,
trail: [
{ name: 'Doctors', path: '/doctors-departments/doctors' }
],
excludedSlugs: []
},
{
name: 'health-programs',
match: /^\/health-programs\/[^\/]+\/?$/i,
trail: [
{ name: 'Health Programs', path: '/health-programs' }
],
excludedSlugs: []
},
{
name: 'health-information',
// 3, 4, or 5 segments total: /education/health-information/[/[/ Gorska Laboratory