jquery Widget factory refactor