JavaScript to enable smooth scrolling on pages