Update script.js

Created function imageSlider with parameter element for storing all slide controllers for gallery.