changed widget js code to allow multiple widgets on one page