changing gallery image and url according to image with page reloading
removed rout 'gallery' use optional imgIndex parameter istead