Balloon = new Class.create();
Balloon.prototype = {

	initialize: function(imageContainer,width,height) {
		if (!imageContainer) {
			return false;
		}

		this.ImageContainer = imageContainer;
		$(this.ImageContainer).style.width = width;
		$(this.ImageContainer).style.height = height;
		$(this.ImageContainer).onclick = this.cancel.bind(this);
		$(this.ImageContainer).style.display = 'none';
		$(this.ImageContainer).style.position = 'absolute';
		$(this.ImageContainer).style.margin = "10px";
	},
	
	SetImage: function(src) {
		var imageUrl = "url('" + src + "')";
		$(this.ImageContainer).style.backgroundImage  = imageUrl;
		$(this.ImageContainer).style.backgroundRepeat = 'no-repeat';
	},
	
	show: function() {
		new Effect.Appear(this.ImageContainer,{ from:0.0,to:1,duration:0});
	},
	
	hide: function(speed) {
		new Effect.Fade(this.Bal.id,{ from:1,to:0.0,duration:0});
	},
	
	cancel: function() {
		new Effect.Fade(this.ImageContainer,{ from:1,to:0.0,duration:1});
	}

}
