jquery widget refactor edit