Visit Our Campus

Experience the St. Alyson difference firsthand. Schedule a tour to see our facilities and meet our team.

Schedule a Visit
// ===== VIDEOS WITH ACTUAL THUMBNAILS ===== // IMPORTANT: Replace 'gallery/thumbnails/school-tour.jpg' with your actual thumbnail image path { type: 'video', category: 'videos', title: 'School Tour', description: 'Take a virtual tour of our campus', videoUrl: 'gallery/videos/school-tour.mp4', thumbnail: 'gallery/thumbnails/thumnail.jpg', duration: '00:49' }, { type: 'video', category: 'videos', title: 'Graduation Highlights', description: 'Highlights from our 2025 graduation ceremony', videoUrl: 'gallery/videos/school.mp4', thumbnail: 'gallery/thumbnails/graduation.jpg', duration: '05:17' }, ]; let currentFilter = 'all'; let currentLightboxItem = null; let currentFilteredItems = []; function renderGallery() { const grid = document.getElementById('galleryGrid'); const noResults = document.getElementById('noResults'); // Filter items based on current filter let filteredItems = galleryItems; if (currentFilter !== 'all') { filteredItems = galleryItems.filter(item => item.category === currentFilter); } currentFilteredItems = filteredItems; if (filteredItems.length === 0) { grid.style.display = 'none'; noResults.style.display = 'block'; return; } grid.style.display = 'grid'; noResults.style.display = 'none'; grid.innerHTML = filteredItems.map((item, index) => { if (item.type === 'photo') { return ` `; } else { // VIDEO ITEM WITH PROPER THUMBNAIL return `
${item.duration || '03:45'}

${item.title}

${item.description}

${getCategoryName(item.category)}
`; } }).join(''); } function getCategoryName(category) { const categories = { 'graduation': 'Graduation', 'openday': 'Open Day', 'classroom': 'Classroom', 'sports': 'Sports', 'events': 'Events', 'videos': 'Video' }; return categories[category] || category; } function openLightbox(index) { const item = currentFilteredItems[index]; const lightbox = document.getElementById('lightbox'); const lightboxImage = document.getElementById('lightboxImage'); const lightboxVideo = document.getElementById('lightboxVideo'); const caption = document.getElementById('lightboxCaption'); if (item.type === 'photo') { lightboxImage.style.display = 'block'; lightboxVideo.style.display = 'none'; lightboxImage.src = item.image; if (lightboxVideo) lightboxVideo.pause(); } else { lightboxImage.style.display = 'none'; lightboxVideo.style.display = 'block'; const videoSource = document.getElementById('videoSource'); videoSource.src = item.videoUrl; lightboxVideo.load(); lightboxVideo.play(); } caption.textContent = `${item.title} - ${item.description}`; lightbox.classList.add('active'); document.body.style.overflow = 'hidden'; } function closeLightbox() { const lightbox = document.getElementById('lightbox'); const lightboxVideo = document.getElementById('lightboxVideo'); lightbox.classList.remove('active'); if (lightboxVideo) lightboxVideo.pause(); document.body.style.overflow = 'auto'; } // Filter functionality document.querySelectorAll('.filter-btn').forEach(btn => { btn.addEventListener('click', function() { document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active')); this.classList.add('active'); currentFilter = this.dataset.filter; renderGallery(); }); }); // Close lightbox with Escape key document.addEventListener('keydown', function(e) { if (e.key === 'Escape' && document.getElementById('lightbox').classList.contains('active')) { closeLightbox(); } }); // Initialize gallery renderGallery();