| |
| document.addEventListener('DOMContentLoaded', function() { |
| |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { |
| anchor.addEventListener('click', function (e) { |
| e.preventDefault(); |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ |
| behavior: 'smooth' |
| }); |
| }); |
| }); |
|
|
| |
| const animateOnScroll = () => { |
| const elements = document.querySelectorAll('.animate-on-scroll'); |
| |
| elements.forEach(element => { |
| const elementPosition = element.getBoundingClientRect().top; |
| const screenPosition = window.innerHeight / 1.3; |
| |
| if(elementPosition < screenPosition) { |
| element.classList.add('animate-fade-in'); |
| } |
| }); |
| }; |
|
|
| window.addEventListener('scroll', animateOnScroll); |
| animateOnScroll(); |
| }); |
|
|
| |
| function loadTestRecommendations() { |
| |
| return { |
| essential: [ |
| "CBC (Complete Blood Count)", |
| "Comprehensive Metabolic Panel", |
| "Lipid Panel + ApoB", |
| "HbA1c & Fasting Insulin", |
| "Thyroid Function (TSH, Free T4)" |
| ], |
| specialty: [ |
| "Vitamin D (25-OH)", |
| "hs-CRP (Inflammation)", |
| "Hormone Panel", |
| "Omega-3 Index", |
| "Homocysteine" |
| ] |
| }; |
| } |