Adding jQuery 1.9 compatibility

jQuery doesn’t support $.fn.live anymore so I updated the js to use $.fn.on(event, selector, callback).