Added function to update image thumbnail navigation and added elements to the setImg function