function config() {};

config.prototype.current = {};  

config.prototype.get = function(path, defaultValue, extraOptions) {
	var array = path.split('.');
    if(extraOptions != undefined)
    {
        var empty = {};
        var settings = $.extend(empty, this.current, extraOptions);
		var object = settings;
		for (property in array)
			if(object[array[property]] != undefined) 
				object = object[array[property]];
			else return defaultValue;
		return object;
    }
    else
    {
		var object = this.current;
		for (property in array)
			if(object[array[property]] != undefined) 
				object = object[array[property]];
			else return defaultValue;
		return object;
    }
}

config.prototype.override = function(options) {
    jQuery.extend(true, this.current, options);
}

jQuery.config = new config();
