changing JS method for thumbnail1