switched to jquery events