Made compatible with the latest version of jquery fixes GH-1