Javascript carousel slider with breakpoint support