sub js file: slider.js rewrite