Add function for smooth scrolling effect.