Global click/resize events instead of binding once for each widget

Use global click/resize events instead of binding once for each widget in the page
Check out this change I mentioned in #177