// Main JavaScript file document.addEventListener('DOMContentLoaded', function() { // Create stars function createStars() { const count = 100; const container = document.body; for (let i = 0; i < count; i++) { const star = document.createElement('div'); star.className = 'star'; const size = Math.random() * 3; star.style.width = `${size}px`; star.style.height = `${size}px`; star.style.left = `${Math.random() * 100}%`; star.style.top = `${Math.random() * 100}%`; star.style.animationDelay = `${Math.random() * 5}s`; container.appendChild(star); } } createStars(); // Initialize tooltips const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); }); // Current date in footer const currentYear = new Date().getFullYear(); document.getElementById('current-year').textContent = currentYear; // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); // Schedule filter functionality const scheduleFilter = document.getElementById('schedule-filter'); if (scheduleFilter) { scheduleFilter.addEventListener('change', function() { const selectedDay = this.value; // Here you would filter the schedule table based on the selected day console.log('Filtering schedule for:', selectedDay); }); } }); // Function to show donation modal function showDonationModal() { // In a real implementation, this would show a modal with donation options alert('Спасибо за желание поддержать нас! Скоро здесь появится форма для пожертвований.'); }