var CmsContImageBlendImage = new Class({
	Extends: NETVISION.ui.UIComponent,
	
	_fx: null,
	
	initialize: function(name,size,blend,id) {
		this.parent(this._createImage(name,size,id));
		
		this._fx = new Fx.Tween(
			this.element,
			{
				duration:blend
			}
		);
	},
	
	show: function() {
		this._fx.start("opacity",0,1);
	},
	
	hide: function() {
		this._fx.start("opacity",1,0);
	},
	
	_createImage: function(name,size,id) {
		var image = null,
			styles = {
				position: 'absolute',
				opacity: 0
			};
			
		image = new Element('img',{
					"id": id,
					"src": name+"/h-"+size.y+"/w-"+size.x+"/img.jpg",
					"width": size.x,
					"height": size.y,
					"alt": ""
				});
			
		image.setStyles(styles);
		
		return image;
	}
});

