Compatibility with redmine 2.5+ (newer jquery)

Redmine 2.5 and 2.6 uses jquery 1.9 which dropped live() method.
So I added a compatibility function to work on both pre-2.5 and post-2.5 redmine versions.