tested on jQuery 1.7