Add check for deprecated $(document).on( "ready"

$(document).on( "ready", handler ) is deprecated as of jQuery 1.8.