some optimization
preparing to jquery 1.9