changing gallery to unbind on hide event