// CrownEd Custom Scripts document.addEventListener('DOMContentLoaded', function() { const notification = document.getElementById('notification'); if (notification) { // Show the notification if it exists if (notification.textContent.trim().length > 0) { notification.style.display = 'block'; setTimeout(() => { notification.style.display = 'none'; }, 5000); // Hide after 5 seconds } } // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { if (this.getAttribute('href').length > 1) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); } }); }); });