Updated to support jQuery 1.9