js fix for slide show and smooth scroll