changed jQuery eventhandler from bind to on, to reflect consistency in the code.