Create slider.js

Revised and refactored carousel to move infinitely forwards or backwards via prev and next button.