Adding some changes to allow plugin to work with jquery 1.10.x