document.addEventListener('DOMContentLoaded', () => { if (typeof window.BiggerPicture !== 'function') { console.error('[gallery-init] BiggerPicture not found. Check script path.'); return; } const VIDEO_EXTENSIONS = ['mp4', 'webm', 'mov', 'm4v', 'ogv']; const isVideo = (href) => { if (!href) return false; href = href.toLowerCase(); return VIDEO_EXTENSIONS.some(ext => href.endsWith('.' + ext)); }; // 1b) Convert MP4 links into inline