Fix behaviour

$().on does not exist before jQuery 1.7
Get modal working