JQuery 1.9.X Compatibility

Use feature detection instead of browser detection. Should support JQuery < 1.8.X as well.