Adding browser js checking back in for jquery 1.9 and replacing deprecated functions with new versions