Applies changes in 7beff92d, 787ebb22, 545723cb to jQuery version of plugin.