add change gallery thumbnail function