Update for Jquery 1.8 and above