Improved jQuery detection