Upgraded to support jQuery 1.9+