gallery slider, lots of javascript