added gallery changes in the javascript