var Widget = function(){


	this.extend = function(obj) {
		for (var prop in obj) {
			this[prop] = obj[prop];
		}
	}

    this.each = function(func){
        if (this.data) {
            for (var i = 0; i < this.data.length; i++) {
                func(this.data[i]);
            }
        }

	}
    this.find = function(attr, value){
        if (this.data) {
            for (var i = 0; i < this.data.length; i++) {
                if (this.data[i][attr] == value) {
                    return this.data[i];
                }
            }
        }

	}
	this.listen = function(e, obj) {

	}
}

if (typeof Observable != 'undefined') {
	Widget.prototype = new Observable();
}
