Replace deprecated method for jQuery >= 1.7 support

Issue #12