application.core.extend({
  base: {  
	Base: function(config) {
	  this.storeConfig(config || {});		
	  
	  return this.init();
	}    
  }
});

application.core.extend(application.base.Base.prototype, {
  init: function() {
	return this;
  },
	
  ready: function(fn) {
	application.core.ready(fn, this);
  },
  
  uuid: function() {
	return new Date().getSeconds().toString();  
  },
  
  timeout: function(scope, fn, time, args) {
	setTimeout(function() { fn.apply(scope, args || []); }, time);
  },
  
  delegate: function(callback, args) {
	return application.util.scopeCallback(callback, this, args);  
  },
  
  getId: function(id) {
	return application.util.getById(id);  
  }, 
  
  ajaxGet: function(url, params, dataType, success, failure, el, timeout) {
	application.ui.ajax.get(this, el, success, failure, url, params, dataType, timeout);
  },
	
  ajaxPost: function(url, params, dataType, success, failure, el, timeout) {
	application.ui.ajax.post(this, el, success, failure, url, params, dataType, timeout);
  },
  
  getGlobal: function(k) {
	return application.core.getGlobal(k);  
  },
  
  getLang: function(k) {
	return application.core.getLang(k);  
  },
  
  getLangFormatted: function(k, r) {
	return application.core.getLangFormatted(k, r);  	  
  },
  
  getProp: function(p) {
	return this._props[p];
  },
  
  setProp: function(p, v) {
	this._props[p] = v;
  },
  
  storeConfig: function() {
	this.setProp(this._configKey, $.extend.apply(null, arguments));
  },
  
  retrieveConfig: function() {
	return this.getProp(this._configKey);
  }, 
  
  storeConfigValue: function(key, value) {
	this.retrieveConfig()[key] = value;
  },
  
  retrieveConfigValue: function(key) {
	return this.retrieveConfig()[key];
  },   
  
  _props: {},
  _configKey: '__config__'
});