1$(document).ready(function () { 2 3 4 5 jQuery(window).scroll(function(){ 6 7 8 9 var sticky = jQuery('header'), 10 11 12 13 scroll = jQuery(window).scrollTop(); 14 15 16 17 18 19 20 21 if (scroll >= 50) sticky.addClass('fixed'); 22 23 24 25 else sticky.removeClass('fixed'); 26 27 28 29 }); 30 31 32 33 $('.btn-menu').on('click', function () { 34 35 36 37 $('.header-center-menu').toggleClass('open'); 38 39 40 41 $('.btn-menu').toggleClass('active'); 42 43 44 45 }); 46 47 48 49 50 51 52 53 54 55/* 56 57 var swiper = new Swiper(".milestonesslider", { 58 59 60 61 slidesPerView: "auto", 62 63 64 65 spaceBetween: 20, 66 67 68 69 70 71 72 73 navigation: { 74 75 76 77 nextEl: ".swiper-button-next", 78 79 80 81 prevEl: ".swiper-button-prev", 82 83 84 85 }, 86 87 88 89 }); 90 91 92 93 94 95 96 97 98 99*/ 100 101 102 103 104 105/* 106 107var maxHeight = 0; 108 109$('.product_txt').each(function () { 110 var thisHeight = $(this).outerHeight(); 111 if (thisHeight > maxHeight) { 112 maxHeight = thisHeight; 113 } 114}); 115 116console.log("Biggest height is:", maxHeight); 117$('.pooja_services_outrer').css('padding-bottom', maxHeight+'px'); 118 119 120*/ 121 122 123 124 125 126 127}); 128 129 130 131 132/* Editorial Pink Cursor (Claude) */ 133(function(){var el=document.createElement('div');el.className='ed-cursor';document.body.appendChild(el);document.addEventListener('mousemove',function(e){el.style.transform='translate('+e.clientX+'px,'+e.clientY+'px) translate(-50%,-50%)';el.classList.add('active');});document.addEventListener('mouseover',function(e){if(e.target.closest&&e.target.closest('a,button,input,label,.menu-item'))el.classList.add('hover');},true);document.addEventListener('mouseout',function(e){if(e.target.closest&&e.target.closest('a,button,input,label,.menu-item')){var to=e.relatedTarget;if(!to||!(to.closest&&to.closest('a,button,input,label,.menu-item')))el.classList.remove('hover');}},true);})(); 134/* End Editorial Pink Cursor */ 135 136/* ===== CLAUDE: Cinematic schedule typography v5 ===== */ 137(function(){ 138 function init(){ 139 var sec = document.querySelector(".section-schedule-events"); 140 if(!sec || sec.dataset.edMounted) return; 141 sec.dataset.edMounted = "1"; 142 sec.classList.add("ed-sched-mounted"); 143 var items = sec.querySelectorAll(".temple_schedule_list > li"); 144 var rows = []; 145 var devaMap = { 146 "Maha Aarti": "\u092E\u0939\u093E \u0906\u0930\u0924\u0940", 147 "Sunderkand Path": "\u0938\u0941\u0902\u0926\u0930\u0915\u093E\u0902\u0921 \u092A\u093E\u0920", 148 "Abhishek": "\u0905\u092D\u093F\u0937\u0947\u0915", 149 "Mata Ki Chowki": "\u092E\u093E\u0924\u093E \u0915\u0940 \u091A\u094C\u0915\u0940", 150 "Langar Maha-Prasad": "\u0932\u0902\u0917\u0930 \u092E\u0939\u093E-\u092A\u094D\u0930\u0938\u093E\u0926" 151 }; 152 items.forEach(function(li){ 153 var nameEl = li.querySelector("span"); 154 var paras = li.querySelectorAll("p"); 155 var noteParts = []; 156 paras.forEach(function(p){ var t=(p.innerText||"").replace(/\s+/g," ").trim(); if(t) noteParts.push(t); }); 157 var nm = nameEl ? nameEl.innerText.trim() : ""; 158 rows.push({ name: nm, deva: devaMap[nm] || "", note: noteParts.join(" \u00B7 ") }); 159 }); 160 if(!rows.length) return; 161 var bgUrl = "/wp-content/themes/hunuman-mandir/assets/images/temple-hero.jpg"; 162 var stage = document.createElement("div"); 163 stage.className = "ed-sched-stage"; 164 var pin = document.createElement("div"); pin.className = "ed-sched-pin"; stage.appendChild(pin); 165 var bg = document.createElement("div"); bg.className = "ed-sched-bg"; bg.style.backgroundImage = "url(" + bgUrl + ")"; pin.appendChild(bg); 166 var light = document.createElement("div"); light.className = "ed-sched-light"; pin.appendChild(light); 167 var wm = document.createElement("div"); wm.className = "ed-sched-watermark"; wm.textContent = "\u0936\u094D\u0930\u0940"; pin.appendChild(wm); 168 var stack = document.createElement("div"); stack.className = "ed-sched-stack"; pin.appendChild(stack); 169 var header = document.createElement("div"); header.className = "ed-sched-header"; stack.appendChild(header); 170 var leftCol = document.createElement("div"); leftCol.className = "ed-sched-from-left"; 171 leftCol.innerHTML = '<span class="ed-eyebrow">Temple Schedule</span><h2 class="ed-h2">Temple Schedule</h2>'; 172 header.appendChild(leftCol); 173 var list = document.createElement("div"); list.className = "ed-sched-list"; stack.appendChild(list); 174 rows.forEach(function(r){ 175 var row = document.createElement("div"); row.className = "ed-schedule-row"; 176 row.innerHTML = '<div><div class="ed-name">' + r.name + '</div><div class="ed-deva">' + r.deva + '</div></div><div class="ed-tiny">' + r.note + '</div><div class="ed-arrow-cell">→</div>'; 177 list.appendChild(row);
178 }); 179 sec.appendChild(stage); 180 var rowEls = list.querySelectorAll(".ed-schedule-row"); 181 var easeOut = function(t){ return 1 - Math.pow(1 - t, 3); }; 182 var ticking = false; 183 function update(){ 184 ticking = false; 185 var rect = stage.getBoundingClientRect(); 186 var total = rect.height - window.innerHeight; 187 var p = Math.min(Math.max(-rect.top / total, 0), 1); 188 var listOpacityP = Math.min(Math.max((p - 0.15) / 0.20, 0), 1); 189 list.style.opacity = listOpacityP; 190 list.style.transform = 'translateY(' + (40 * (1 - listOpacityP)) + 'px)'; 191 var bgScale = 1.05 + p * 0.18; 192 var bgY = (p - 0.5) * 60; 193 bg.style.transform = "translateY(" + bgY + "px) scale(" + bgScale + ")"; 194 if(p > 0.60){ bg.classList.add("blurred"); } else { bg.classList.remove("blurred"); } 195 var titleP = Math.min(Math.max((p - 0.30) / 0.20, 0), 1); 196 var e1 = easeOut(titleP); 197 leftCol.style.transform = "translate3d(" + (-80 * (1 - e1)) + "px,0,0)"; 198 leftCol.style.opacity = e1; 199 var listP = Math.min(Math.max((p - 0.50) / 0.30, 0), 1); 200 var shown = Math.floor(listP * (rowEls.length + 1)); 201 rowEls.forEach(function(row, i){ 202 var vis = i < shown; 203 var dir = (i % 2 === 0) ? "-40vw" : "40vw"; 204 row.style.transform = vis ? "translate3d(0,0,0)" : "translate3d(" + dir + ",0,0)"; 205 row.style.opacity = vis ? 1 : 0; 206 row.style.transition = "transform 720ms var(--ed-ease) " + (i * 30) + "ms, opacity 720ms var(--ed-ease) " + (i * 30) + "ms"; 207 }); 208 var sweepP = Math.min(Math.max((p - 0.60) / 0.35, 0), 1); 209 light.style.transform = "translateX(" + (-10 + sweepP * 130) + "vw) skewX(-12deg)"; 210 light.style.opacity = (sweepP > 0 && sweepP < 1) ? 0.95 : 0; 211 wm.style.transform = "translateY(" + ((0.5 - p) * 40) + "px)"; 212 } 213 function onScroll(){ if(!ticking){ window.requestAnimationFrame(update); ticking = true; } } 214 window.addEventListener("scroll", onScroll, { passive: true }); 215 window.addEventListener("resize", onScroll); 216 update(); 217 } 218 if(document.readyState === "loading"){ document.addEventListener("DOMContentLoaded", init); } else { init(); } 219})(); 220/* End CLAUDE v5 */ 221 222/* ============================ HMC-ABOUT-REDESIGN-START ============================ */ 223/* Redesign of homepage About section ("A sacred vision, laid stone by stone") */ 224(function () { 225 function ready(fn){ 226 if (document.readyState !== "loading") fn(); 227 else document.addEventListener("DOMContentLoaded", fn); 228 } 229 230 function ensureFonts(){ 231 if (document.getElementById("hmc-about-fonts")) return; 232 var pre = document.createElement("link"); 233 pre.rel = "preconnect"; 234 pre.href = "https://fonts.googleapis.com"; 235 document.head.appendChild(pre); 236 var pre2 = document.createElement("link"); 237 pre2.rel = "preconnect"; 238 pre2.href = "https://fonts.gstatic.com"; 239 pre2.crossOrigin = "anonymous"; 240 document.head.appendChild(pre2); 241 var link = document.createElement("link"); 242 link.id = "hmc-about-fonts"; 243 link.rel = "stylesheet"; 244 link.href = "https://fonts.googleapis.com/css2?family=Fraunces:opsz,ital,[email protected],0,400;9..144,0,500;9..144,1,400;9..144,1,500&family=Manrope:wght@500;600;700&family=Tiro+Devanagari+Hindi&display=swap"; 245 document.head.appendChild(link); 246 } 247 248 function buildLotus(svg){ 249 var NS = "http://www.w3.org/2000/svg"; 250 var petalCount = 28; 251 var radius = 470; 252 var petalH = 92; 253 var petalW = 30; 254 var color = "#FFCC99"; 255 var tip = "#FF9E0F"; 256 var opacity = 0.32; 257 var baseRing = document.createElementNS(NS, "circle"); 258 baseRing.setAttribute("r", radius); 259 baseRing.setAttribute("fill", "none"); 260 baseRing.setAttribute("stroke", color); 261 baseRing.setAttribute("stroke-width", "1.2"); 262 baseRing.setAttribute("opacity", String(opacity * 0.7)); 263 svg.appendChild(baseRing); 264 var ring = document.createElementNS(NS, "g"); 265 for (var i = 0; i < petalCount; i++){ 266 var angle = (i / petalCount) * 360; 267 var g = document.createElementNS(NS, "g"); 268 g.setAttribute("transform", "rotate(" + angle + ") translate(0 " + (-radius) + ")"); 269 var outer = document.createElementNS(NS, "path"); 270 outer.setAttribute("d", 271 "M 0 0 Q " + (-petalW) + " " + (-petalH * 0.45) + 272 " 0 " + (-petalH) + 273 " Q " + petalW + " " + (-petalH * 0.45) + " 0 0 Z" 274 ); 275 outer.setAttribute("fill", color);
276 outer.setAttribute("opacity", String(opacity)); 277 g.appendChild(outer); 278 var inner = document.createElementNS(NS, "path"); 279 inner.setAttribute("d", 280 "M 0 " + (-petalH * 0.15) + 281 " Q " + (-petalW * 0.45) + " " + (-petalH * 0.5) + 282 " 0 " + (-petalH * 0.92) + 283 " Q " + (petalW * 0.45) + " " + (-petalH * 0.5) + 284 " 0 " + (-petalH * 0.15) + " Z" 285 ); 286 inner.setAttribute("fill", tip); 287 inner.setAttribute("opacity", String(opacity * 0.85)); 288 g.appendChild(inner); 289 ring.appendChild(g); 290 } 291 svg.appendChild(ring); 292 } 293 294 function injectAbout(){ 295 // Only on homepage. Detect by presence of .section-temple-location and absence of a single-page wrapper. 296 var host = document.querySelector(".section-temple-location"); 297 if (!host) return; 298 if (host.classList.contains("hmc-about-active")) return; 299 300 var section = document.createElement("section"); 301 section.id = "about"; 302 section.className = "hmc-about"; 303 section.innerHTML = 304 '<div class="hmc-about-florals" aria-hidden="true"><svg viewBox="-560 -560 1120 1120"></svg></div>' + 305 '<div class="hmc-about-watermark-wrap" aria-hidden="true"><div class="hmc-about-watermark">à¤à¤¯ सिया राम</div></div>' + 306 '<div class="hmc-about-content">' + 307 '<div class="hmc-about-eyebrow">OUR STORY</div>' + 308 '<h2 class="hmc-about-title">Hanuman Mandir<br>of Greater Chicago</h2>' + 309 '<p class="hmc-about-subtitle-new">A Divine Vision, Carried by Faith</p>' + 310 '<p class="hmc-about-ornament">⦠⦠â¦</p>' + 311 '<p class="hmc-about-quote">“Where Hanuman Ji is not just worshipped, He is felt.”</p>' + 312 '<p class="hmc-about-body">Born from the unwavering devotion of Dr. Chandra Mohini Khurana and brought to life by the love of countless bhakts, Hanuman Mandir of Greater Chicago is home to the rare and miraculous <strong>Doo Mukhi swaroop of Hanuman Ji</strong>, found nowhere else in the world.</p>' + 313 '<p class="hmc-about-body">Here, devotees walk in with burdens and walk out with blessings, for this is no ordinary temple, it is a living abode where <strong>Bajrang Bali resides sakshat</strong>, listening to every prayer, answering every call, and showering His grace upon all who come with faith in their hearts.</p>' + 314 '<p class="hmc-about-ornament">⦠⦠â¦</p>' + 315 '<a href="/about/" class="hmc-about-cta">More About Us <span>â</span></a>' + 316 '</div>'; 317 318 host.appendChild(section); 319 host.classList.add("hmc-about-active"); 320 var svg = section.querySelector(".hmc-about-florals svg"); 321 if (svg) buildLotus(svg); 322 } 323 324 ready(function(){ 325 ensureFonts(); 326 injectAbout(); 327 }); 328})(); 329/* ============================= HMC-ABOUT-REDESIGN-END ============================= */ 330 331/* ===== HMC-GAUSEVA-SUNDAY-FOOTER-JS-START ===== */ 332(function(){ 333 function applyHMCGSFooter(){ 334 try{ 335 // 1) Hide the ⦠⦠⦠ornament rows in Gau Seva + Sunday School 336 var sections = document.querySelectorAll('section.section-divyam.section-gau_seva'); 337 sections.forEach(function(sec){ 338 // Find elements whose trimmed text is ornament dots 339 var all = sec.querySelectorAll('div,span,p'); 340 all.forEach(function(el){ 341 if(el.children.length===0){ 342 var t = (el.textContent||'').trim(); 343 if(t==='⦠⦠â¦' || t==='â¦' || /^[\sâ¦âââ ]+$/.test(t) && t.length<=8){ 344 el.classList.add('hmc-ornament-hide'); 345 el.style.display='none'; 346 } 347 } 348 }); 349 350 // 2) Inject an eyebrow above the heading if not already present 351 var h = sec.querySelector('h1,h2,h3'); 352 if(h && !sec.querySelector('.hmc-gs-eyebrow')){ 353 var isGau = sec.classList.contains('gau-seva-section'); 354 var label = isGau ? 'Gau Seva Dham' : 'Education Initiative'; 355 var eb = document.createElement('div'); 356 eb.className = 'hmc-gs-eyebrow'; 357 eb.textContent = label; 358 h.parentNode.insertBefore(eb, h);
359 360 // Insert a divider under the heading 361 var div = document.createElement('hr'); 362 div.className = 'hmc-gs-divider'; 363 if(h.nextSibling){ 364 h.parentNode.insertBefore(div, h.nextSibling); 365 } else { 366 h.parentNode.appendChild(div); 367 } 368 } 369 370 // 3) Style the quote (the first quoted text after heading) 371 var paras = sec.querySelectorAll('p, div'); 372 paras.forEach(function(p){ 373 if(p.classList.contains('hmc-gs-quote')) return; 374 var t = (p.textContent||'').trim(); 375 // Detect intro quote: starts with " and is short 376 if((t.startsWith('â') || t.startsWith('"')) && t.length < 220 && !p.querySelector('p,div,a,button')){ 377 p.classList.add('hmc-gs-quote'); 378 } 379 }); 380 }); 381 } catch(e){ console.warn('HMC-GS apply error', e); } 382 } 383 if(document.readyState === 'loading'){ 384 document.addEventListener('DOMContentLoaded', applyHMCGSFooter); 385 } else { 386 applyHMCGSFooter(); 387 } 388 // Re-apply after a short delay in case of lazy content 389 setTimeout(applyHMCGSFooter, 500); 390 setTimeout(applyHMCGSFooter, 1500); 391})(); 392/* ===== HMC-GAUSEVA-SUNDAY-FOOTER-JS-END ===== */ 393 394/* === HMC Program Cards fade-slide-up reveal on scroll === */ 395(function(){ 396 function init(){ 397 var cards = document.querySelectorAll('.hmc-program'); 398 if (!cards.length) return; 399 if (!('IntersectionObserver' in window)) { 400 cards.forEach(function(el){ el.classList.add('is-visible'); }); 401 return; 402 } 403 var io = new IntersectionObserver(function(entries){ 404 entries.forEach(function(e){ 405 if (e.isIntersecting) { 406 e.target.classList.add('is-visible'); 407 io.unobserve(e.target); 408 } 409 }); 410 }, { threshold: 0.18, rootMargin: '0px 0px -8% 0px' }); 411 cards.forEach(function(el){ io.observe(el); }); 412 } 413 if (document.readyState === 'loading') { 414 document.addEventListener('DOMContentLoaded', init); 415 } else { 416 init(); 417 } 418})(); 419 420 421/* Retry init for race conditions */ 422(function(){function tryInit(){var cards=document.querySelectorAll('.hmc-program');if(!cards.length)return false;cards.forEach(function(el){if(!el.dataset.hmcObs){el.dataset.hmcObs='1';if('IntersectionObserver' in window){var io=new IntersectionObserver(function(es){es.forEach(function(e){if(e.isIntersecting){e.target.classList.add('is-visible');io.unobserve(e.target);}});},{threshold:0.15,rootMargin:'0px 0px -5% 0px'});io.observe(el);}else{el.classList.add('is-visible');}}});return true;}tryInit();setTimeout(tryInit,500);setTimeout(tryInit,1500);if(window.jQuery)jQuery(window).on('load',tryInit);})(); 423 424/* Fallback: scroll-event reveal if IntersectionObserver fails to fire */ 425(function(){function check(){document.querySelectorAll('.hmc-program').forEach(function(el){if(el.classList.contains('is-visible'))return;var r=el.getBoundingClientRect();var vh=window.innerHeight;if(r.top<vh*0.85 && r.bottom>vh*0.05){el.classList.add('is-visible');}});}window.addEventListener('scroll',check,{passive:true});window.addEventListener('resize',check);window.addEventListener('load',check);check();setTimeout(check,300);setTimeout(check,1200);})(); 426 427/* === STAGGERED PROGRAM REVEAL === */ 428(function(){ 429 function init(){ 430 var sections = document.querySelectorAll('.hmc-program-section'); 431 if(!sections.length) return; 432 var revealedIdx = -1; 433 function check(){ 434 var vh = window.innerHeight; 435 sections.forEach(function(sec, idx){ 436 if(sec.classList.contains('is-visible')) return; 437 var r = sec.getBoundingClientRect(); 438 // Trigger when section top is 75% down the viewport 439 if(r.top < vh * 0.78 && r.bottom > 0){ 440 // Stagger: each section reveals only after previous 441 if(idx === 0 || sections[idx-1].classList.contains('is-visible')){ 442 // Add header-shown class first, then cards 443 if(idx === 0){ 444 sec.classList.add('programs-header-shown'); 445 setTimeout(function(){ sec.classList.add('is-visible'); }, 350); 446 } else { 447 setTimeout(function(){ sec.classList.add('is-visible'); }, 250); 448 } 449 } 450 } 451 }); 452 } 453 window.addEventListener('scroll', check, {passive:true}); 454 window.addEventListener('resize', check, {passive:true}); 455 check(); 456 setTimeout(check, 300); 457 setTimeout(check, 1000); 458 } 459 if(document.readyState==='loading'){ 460 document.addEventListener('DOMContentLoaded', init); 461 } else { 462 init(); 463 } 464})(); 465 466/* === PROGRAMS HEADER INJECT v3 === */ 467(function(){ 468 function injectHeader(){ 469 var first = document.querySelector('.hmc-program-section:not(.hmc-program-section--alt)'); 470 if(!first) return; 471 if(document.querySelector('.hmc-programs-header-block')) return; 472 var hdr = document.createElement('div'); 473 hdr.className = 'hmc-programs-header-block'; 474 hdr.innerHTML = '<div class="hmc-ph-diamonds"><span>\u2726</span><span>\u2726</span><span>\u2726</span></div>' + 475 '<h2 class="hmc-ph-title">OUR PROGRAMS</h2>' + 476 '<p class="hmc-ph-subtitle">
476Service to community, in the spirit of Dharma.</p>'; 477 first.parentNode.insertBefore(hdr, first); 478 } 479 if(document.readyState === 'loading'){ 480 document.addEventListener('DOMContentLoaded', injectHeader); 481 } else { 482 injectHeader(); 483 } 484})(); 485/* === END PROGRAMS HEADER INJECT v3 === */ 486 487 488/* ============================================================ 489 HMC HOMEPAGE ENHANCEMENTS â May 2026 490 ============================================================ */ 491(function(){ 492 function ready(fn){ if(document.readyState !== 'loading') fn(); else document.addEventListener('DOMContentLoaded', fn); } 493 494 ready(function(){ 495 if(!document.body.classList.contains('home') && !document.querySelector('.section-pooja_services')) return; 496 497 function onScroll(){ 498 if(window.scrollY > 30) document.body.classList.add('scrolled'); 499 else document.body.classList.remove('scrolled'); 500 } 501 window.addEventListener('scroll', onScroll, {passive:true}); 502 onScroll(); 503 504 var pa = document.querySelector('.Panchang_area_home'); 505 if(pa){ 506 pa.querySelectorAll('h1,h2,h3,h4,h5,h6,p,span,div').forEach(function(el){ 507 if(el.children.length===0 && el.textContent){ 508 var t = el.textContent; 509 if(/A\s+Glance\s+(at|At)\s+(the|The)\s+Almanac/i.test(t)){ 510 el.textContent = t.replace(/A\s+Glance\s+(at|At)\s+(the|The)\s+Almanac/i, "A Glance at today's Panchang"); 511 } 512 } 513 }); 514 515 if(!pa.querySelector('.hmc-panchang-location')){ 516 var loc = document.createElement('div'); 517 loc.className = 'hmc-panchang-location'; 518 loc.innerHTML = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z"/></svg><span>Hanuman Mandir of Greater Chicago</span>'; 519 pa.appendChild(loc); 520 } 521 } 522 523 var poojaSec = document.querySelector('.section-pooja_services'); 524 if(poojaSec){ 525 poojaSec.querySelectorAll('p, div, span, h3, h4, h5, h6').forEach(function(el){ 526 if(el.children.length===0 && el.textContent){ 527 var t = el.textContent; 528 if(/Sacred offerings,?\s*performed by our priests with prescribed vedic rites/i.test(t)){ 529 el.textContent = 'Sacred offerings, performed by our priests with vedic rites'; 530 el.classList.add('hmc-pooja-subtitle'); 531 } 532 } 533 }); 534 535 var titleCol = poojaSec.querySelector('.row > .col-md-12.text-center'); 536 if(titleCol && !poojaSec.querySelector('.hmc-pooja-subtitle')){ 537 var sub = document.createElement('p'); 538 sub.className = 'hmc-pooja-subtitle'; 539 sub.textContent = 'Sacred offerings, performed by our priests with vedic rites'; 540 titleCol.appendChild(sub); 541 } 542 543 poojaSec.querySelectorAll('.pooja_services_outrer .product_txt h4').forEach(function(h){ 544 if(h.querySelector('.price')) return; 545 var html = h.innerHTML; 546 var m = html.match(/(\$[\d,.]+)/); 547 if(m){ 548 var idx = html.indexOf(m[1]); 549 var before = html.substring(0, idx).trim(); 550 var price = m[1]; 551 var after = html.substring(idx + m[1].length).trim(); 552 h.innerHTML = before + (after ? ' ' + after : '') + '<span class="price">' + price + '</span>'; 553 } 554 }); 555 } 556 557 if(document.body.classList.contains('home') && !document.querySelector('.google-reviews')){ 558 var reviews = [ 559 { quote: 'Hanuman Mandir of Greater Chicago is a peaceful and divine place that brings a sense of calm and positivity. The temple is beautifully maintained, with a serene atmosphere perfect for prayer and meditation. The priests are respectful and perform rituals with great devotion. The community events and festivals are well-organized, bringing people together in a warm and spiritual environment. A truly blessed place to visit for anyone seeking peace, devotion, and cultural connection.', name: 'Teja Reddy K', where: 'Local Guide', when: '9 months ago' }, 560 { quote: 'Always feel full of positive energy and feel blessed and grateful when we visit the temple with family. Itâs very well organized. We live in Minnesota and we come here to Chicago for our sonâs medical treatment. First time we went to this temple in 2023 by randomly searching on Google as itâs only 15 min away from our medical facility. When we reached, we got the blessing of our beloved Hanuman ji. Very dedicated volunteers who are always smiling and welcoming and work hard to make every event. It is definitely a place to visit and get a blessing from Hanuman ji; he is himself present in the temple, and you can feel his presence. We are so grateful that we connected with the Temple.', name: 'Vikas Sharma', where: 'Minnesota', when: 'a year ago' }, 561 { quote: 'A group of us college friends visited Hanuman Mandir in Glenview, and the experience was truly spiritual. The peaceful atmosphere instantly made us feel connected as a family. Attending the Aarti on Tuesday was the highlight â the collective chanting, divine energy, and the warmth from the devotees created a sense of brotherhood and positivity. Itâs a blessing to have such a serene place here in Chicago where we can feel so close to Lord Hanumanâs presence. Highly recommended for anyone seeking peace and blessings.', name: 'Dhruv Jaiswal', where: 'Glenview', when: 'a year ago' }, 562 { quote: 'Jai Hanuman, Jai Shree Ram! Blessed to be living close to the Hanuman temple and get blessings of Lord Hanuman! Everyone is so nice here and the mandir offers temple visits every day. Special days on Tuesday and Saturday. Such a peaceful and blissful place. There is ample parking for you to enjoy all Indian festivals here.', name: 'Dushyant Sharma', where: 'Local Guide', when: '4 years ago' }, 563 { quote: 'Really calm and clean mandir. Had a friendâs marriage last month and the management was really supportive. Pandit ji supported with all the rituals and explained every part of it. This was the first time for us arranging, and with the small space just next to the center of the mandir this was seamless. In all, this was a life-changing moment for all of us to feel the connection with Hanuman ji. Jai Hanuman!', name: 'Sourabh Taluja', where: 'Chicago', when: '5 years ago' } 564 ]; 565 566 var section = document.createElement('section'); 567 section.className = 'google-reviews'; 568 var html = '<div class="reviews-wrap">'; 569 html += '<div class="reviews-eyebrow"><span class="stars">' + String.fromCharCode(9733) + String.fromCharCode(9733) + String.fromCharCode(9733) + String.fromCharCode(9733) + String.fromCharCode(9733) + '</span> 4.8 on Google</div>'; 570 html += '<h2 class="reviews-heading">Google Reviews</h2>'; 571 html += '<div class="reviews-track">'; 572 reviews.forEach(function(r, i){ 573 html += '<article class="review' + (i===0 ? ' is-active' : '') + '">'; 574 html += '<p class="review-quote">' + String.fromCharCode(8220) + r.quote + String.fromCharCode(8221) + '</p>'; 575 html += '<div class="review-attribution">'; 576 html += '<span class="reviewer">' + r.name + '</span>'; 577 html += '<span class="dot">' + String.fromCharCode(183) + '</span>'; 578 html += '<span class="where">' + r.where + '</span>'; 579 html += '<span class="dot">' + String.fromCharCode(183) + '</span>'; 580 html += '<span class="when">' + r.when + '</span>'; 581 html += '</div></article>'; 582 }); 583 html += '</div>'; 584 html += '<div class="reviews-dots">'; 585 reviews.forEach(function(r, i){ 586 html += '<button class="dot' + (i===0 ? ' is-active' : '') + '" aria-label="Review ' + (i+1) + '" data-i="' + i + '"></button>'; 587 }); 588 html += '</div></div>'; 589 section.innerHTML = html; 590 591 var footer = document.querySelector('footer'); 592 if(footer && footer.parentNode){ 593 footer.parentNode.insertBefore(section, footer); 594 } else { 595 document.body.appendChild(section); 596 } 597 598 var idx = 0; 599 var items = section.querySelectorAll('.review'); 600 var dots = section.querySelectorAll('.reviews-dots .dot'); 601 var timer = null; 602 function show(i){
603 items.forEach(function(el, j){ el.classList.toggle('is-active', i===j); }); 604 dots.forEach(function(el, j){ el.classList.toggle('is-active', i===j); }); 605 idx = i; 606 } 607 function next(){ show((idx+1) % items.length); } 608 function start(){ stop(); timer = setInterval(next, 6000); } 609 function stop(){ if(timer){ clearInterval(timer); timer=null; } } 610 dots.forEach(function(d, i){ d.addEventListener('click', function(){ show(i); start(); }); }); 611 section.addEventListener('mouseenter', stop); 612 section.addEventListener('mouseleave', start); 613 start(); 614 } 615 }); 616})(); 617 618/* ===== ROUND 2 JS FIXES ===== */ 619(function(){ 620 function init(){ 621 // 1) Rename Google Reviews heading to "Voices of Sangat" 622 try { 623 var gr = document.querySelector('#google-reviews, .hmc-google-reviews'); 624 if (gr) { 625 var h = gr.querySelector('.hmc-gr-heading, h2'); 626 if (h) h.textContent = 'Voices of Sangat'; 627 } 628 } catch(e) {} 629 630 // 2) Inject Padharo / Plan Your Visit section before footer 631 if (document.body.classList.contains('home') && !document.getElementById('visit')) { 632 var footer = document.querySelector('footer, .site-footer, #colophon, .footer'); 633 if (footer) { 634 var sec = document.createElement('section'); 635 sec.id = 'visit'; 636 sec.className = 'hmc-padharo'; 637 sec.innerHTML = [ 638 '<div class="hmc-padharo-grid">', 639 '<div class="hmc-padharo-left">', 640 '<span class="hmc-padharo-eyebrow">PLAN YOUR VISIT</span>', 641 '<h2 class="hmc-padharo-headline">', 642 '<span class="word padharo-italic">Padharo</span> ', 643 '<span class="word">â</span> ', 644 '<span class="word">the</span> ', 645 '<span class="word">darshan</span> ', 646 '<span class="word">is</span> ', 647 '<span class="word">open.</span>', 648 '</h2>', 649 '<p class="hmc-padharo-lede">The mandir is open every day from morning aarti through shayan. First-time visitors are warmly welcomed; please remove footwear at the entrance.</p>', 650 '<div class="hmc-padharo-ctas">', 651 '<a href="#donate" class="hmc-padharo-btn hmc-padharo-btn--filled">Donate now â</a>', 652 '<a href="https://maps.google.com/?q=Hanuman+Mandir+of+Greater+Chicago" target="_blank" rel="noopener" class="hmc-padharo-btn hmc-padharo-btn--outline">Get directions â</a>', 653 '</div>', 654 '</div>', 655 '<div class="hmc-padharo-card">', 656 '<div class="hmc-padharo-row">', 657 '<span class="hmc-padharo-label">Address</span>', 658 '<p class="hmc-padharo-value">3623 W Lake Avenue<br>Glenview, IL 60026</p>', 659 '</div>', 660 '<div class="hmc-padharo-row">', 661 '<span class="hmc-padharo-label">Hours</span>', 662 '<div class="hmc-padharo-hours"><span>Mon â Sun</span><span>9:00 AM â 9:00 PM</span></div>', 663 '<div class="hmc-padharo-hours"><span>Entry Door Closes</span><span>8:45 PM</span></div>', 664 '</div>', 665 '<div class="hmc-padharo-row">', 666 '<span class="hmc-padharo-label">Contact</span>', 667 '<p class="hmc-padharo-value">(847) 832-4444</p>', 668 '<a class="hmc-padharo-email" href="mailto:[email protected]">[email protected]</a>', 669 '</div>', 670 '</div>', 671 '</div>' 672 ].join(''); 673 footer.parentNode.insertBefore(sec, footer); 674 675 // Word-by-word stagger reveal 676 var words = sec.querySelectorAll('.hmc-padharo-headline .word'); 677 words.forEach(function(w, i){ 678 w.style.transitionDelay = (i * 70) + 'ms'; 679 }); 680 681 // IntersectionObserver to add is-visible 682 var io = new IntersectionObserver(function(entries){ 683 entries.forEach(function(en){ 684 if (en.isIntersecting) { 685 en.target.classList.add('is-visible'); 686 io.unobserve(en.target); 687 } 688 }); 689 }, { threshold: 0.15 }); 690 io.observe(sec); 691 } 692 } 693 } 694 if (document.readyState === 'loading') { 695 document.addEventListener('DOMContentLoaded', init); 696 } else { 697 init(); 698 } 699 // also try after small delay for any late DOM 700 setTimeout(init, 1500); 701})(); 702 703/* === ROUND 2 PATCH: Voices of Sangat + proper ordering === */ 704(function(){ 705 function fix(){ 706 // Rename Google Reviews heading by selector 707 var grSec = document.querySelector('section.google-reviews, .google-reviews'); 708 if (grSec) { 709 var heads = grSec.querySelectorAll('h1,h2,h3,h4'); 710 heads.forEach(function(h){ 711 var t = (h.textContent||'').trim(); 712 if (t.toLowerCase() === 'google reviews') { 713 h.textContent = 'Voices of Sangat'; 714 } 715 }); 716 } 717 // Re-order: ensure google-reviews is BEFORE #visit (padharo) and padharo is right before footer 718 var padharo = document.getElementById('visit'); 719 var footer = document.querySelector('footer, .site-footer, #colophon, .footer'); 720 if (grSec && padharo && grSec.compareDocumentPosition(padharo) & Node.DOCUMENT_POSITION_PRECEDING) { 721 // padharo comes BEFORE grSec; swap so grSec is before padharo 722 padharo.parentNode.insertBefore(grSec, padharo); 723 } 724 if (padharo && footer && padharo.nextElementSibling !== footer) { 725 footer.parentNode.insertBefore(padharo, footer); 726 } 727 } 728 if (document.readyState === 'loading') { 729 document.addEventListener('DOMContentLoaded', fix); 730 } else { fix(); } 731 setTimeout(fix, 1500); 732 setTimeout(fix, 3000); 733})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.