Support jQuery < 1.6 by not using $.fn.is().

Adapted from rooby's pull request for issue #1555:

* Condensed into one commit.
* Renamed local var chosenContainer -> active_container to (I hope) better reflect what the variable represents, and project naming conventions.