switched into jquery.ui widget factory