Moved the widget's prototype outside the jquery function so it's not recreated multiple times unnecessarily.