added support for latest versions of jQuery