transformed to a jquery widget