// Initialize tooltips document.addEventListener('DOMContentLoaded', function() { // Any initialization code can go here console.log('CryptoSwap Galaxy Explorer loaded'); // Smooth scroll for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); }); // Exchange rate ticker simulation function updateTicker() { const coins = ['BTC', 'ETH', 'SOL', 'XRP', 'ADA']; const ticker = document.getElementById('exchange-ticker'); if (ticker) { let tickerContent = ''; coins.forEach(coin => { const price = (Math.random() * 10000).toFixed(2); const change = (Math.random() * 5 - 2.5).toFixed(2); const isPositive = parseFloat(change) > 0; tickerContent += `