version compatible with jQuery 1.4.x