/**
 *  Loader Class
 */
var Loader = new Class({
		
	Implements: [Events, Options],
	
	initialize: function(){
		this.settings();
	},
	
	settings: function(){
		var self = this;
		$.ajaxSetup({
			context		: self/*,
			beforeSend	: function(xhr){ self.fireEvent('ajaxInit') },
			error		: function(e){ self.fireEvent('ajaxError') },
			complete	: function(xhr){ self.fireEvent('ajaxComplete') },
			success		: function(data){ self.fireEvent('ajaxSuccess', data) }*/
		});
	},
	
	progressElement: function(element){
		var _load = this.__load;
		$.extend(this,element);
		this.__load = _load;
	},
	
	__load: function(params){
		$.ajax(params);
	},

	__show: function(){
		this.show();
	},
	
	__hide: function(){
		this.hide();
	}
});
