rewrite responsive js for slider, add to events