Change calls to jquery 'delegate/undelegate' to use 'on/off'