Fixed compatibility with jquery 1.7.2