Rewrote old JS to jQuery and allow usage of multiple widgets

There was plain old legacy JS in the widget code.
I also replaced usage of id with class for the widget to allow multiple usages of this widget on one page.