Update script.js

Corrected code for sliding and changed time values.