converted to jquery ui widget and added demo.html