Fix compatibility with jQuery 1.8+.

Django 1.6 uses a newer jQuery, and a couple things in treebeard-admin.js were not compatible with newer jQuery. This pull request fixes those; the fixes are backwards compatible at least as far as jQuery 1.3, and Django 1.3 already used jQuery 1.4.2, so there should be no back-compat issues here.