var Loader = new Class({
	
	Implements: [Options, Events],
	options:{
		'image':null,
		'parent':null
	},
	
	initialize:function(options) {
		this.setOptions(options);
		debug('Loader:initialize');
		
		this.initContainer();
		
		this.initFxs();
	},
	
	initContainer:function() {
		this.container = new Element('img', {
			'src': this.options.image
		}).inject(this.options.parent);
		this.container.addClass('loader');
	},
	
	initFxs:function() {
		this.fx = new Fxable({
			'target':this.container,
			'type': 'opacity',
			'src':0,
			dest:1,
			duration:150
		});
		this.fx.setClose();
	},
	
	close:function() {
		this.fx.close();
	},
	
	open:function() {
		this.fx.open();
	}
	
});
