if (!jQuery) {alert('Este treco precisa do jQuery');}
Object.extend = function() {
	var func = jQuery.extend;
	func.apply(this,arguments);
}
Object.extend(Object, {
  toJSON: function(object) {
	var type = typeof object;
	switch (type) {
	  case 'undefined':
	  case 'function':
	  case 'unknown': return;
	  case 'boolean': return object.toString();
	}
	if (object === null) return 'null';
	if (object.toJSON) return object.toJSON();
	if (Object.isElement(object)) return;
	var results = [];
	for (var property in object) {
	  var value = Object.toJSON(object[property]);
	  if (value !== undefined)
		results.push(property.toJSON() + ': ' + value);
	}
	return '{' + results.join(', ') + '}';
  },
  isElement: function(object) {
	return object && object.nodeType == 1;
  },
  isArray: function(object) {
	return object && object.constructor === Array;
  },
  isHash: function(object) {
	return object instanceof Hash;
  },
  isFunction: function(object) {
	return typeof object == "function";
  },
  isString: function(object) {
	return typeof object == "string";
  },
  isNumber: function(object) {
	return typeof object == "number";
  },
  isUndefined: function(object) {
	return typeof object == "undefined";
  }
});
Class = {
	create: function() {
		function klazz() {
			if (this.initialize) {
				this.initialize.apply(this,arguments);
			}
		}
		if (arguments.length==2 && Object.isFunction(arguments[0])) {
			Object.extend(arguments[0].prototype,arguments[1]);
		}
		return klazz;
	}
};

