function Widget(options) {
	var self = this;
	var elementId;

	function construct() {
		elementId = options["id"];

		initControlHandler("click", "clickHandler");
		initControlHandler("mouseenter", "mouseEnterHandler");
		initControlHandler("mouseleave", "mouseLeaveHandler");
		initControlHandler("hover", "hoverHandler");
	}

	this.selector = function (selector) {
		return "#" + elementId + (selector ? selector : "");
	};

	this.element = function (selector) {
		return $J(this.selector(selector));
	};

	function initControlHandler(event, attr) {
	 var selector = self.selector() + ' ';

	 $J('body').on(nsEvent(event), selector + "[" + attr + "]", function (args) {
	  var handler = $J(this).attr(attr);
	  if (self[handler]) {
	   self[handler].call(self, this, args);
	  }
	 });
	}

	function nsEvent(event) {
		return event + '.' + elementId;
	}

	construct();
};