Adapt plugins to new jQuery and jQuery UI (#507).

See #507.