Orders functions in slider.js