var WCCmoInfo = {

	init:	function (jquery) {

			var c = this;

			this.jquery = jquery;

			this.wccinfo = document.createElement('div');
			this.wccinfo.id = 'wccmoinfo';
			this.wccinfo.style.position = 'absolute';
			this.wccinfo.style.display = 'none';

			this.pointer = document.createElement('div');
			this.pointer.id = 'pointer';

			this.top = document.createElement('div');
			this.top.id = 'top';

			this.body = document.createElement('div');
			this.body.id = 'body';

			this.bodyp = document.createElement('p');
			this.body.appendChild(this.bodyp);

			this.bottom = document.createElement('div');
			this.bottom.id = 'bottom';

			this.wccinfo.appendChild(this.pointer);
			this.wccinfo.appendChild(this.top);
			this.wccinfo.appendChild(this.body);
			this.wccinfo.appendChild(this.bottom);

			if(window.attachEvent) this.wccinfo.attachEvent('onmouseout', function(){ c.hide(); } );
			else if(window.addEventListener) this.wccinfo.addEventListener('mouseout', function(){ c.hide(); }, false);
			else this.wccinfo.onmouseout = this.hide();

			document.body.insertBefore(this.wccinfo, document.body.firstChild);

		},


	hide:	function () {

			this.jquery(this.wccinfo).hide();
			this.showTargs();

		},


	show:	function (targ, infoClass, content) {

			var offset = this.jquery(targ).offset();

			this.wccinfo.style.left = offset.left + 'px';
			this.wccinfo.style.top = offset.top + 'px';
			this.wccinfo.className = infoClass;

			this.hideTargs(targ);
			this.jquery(this.wccinfo).show();

			this.setContent(content);

		},

	hideTargs:	function (targ) {

				if(!this.otarg) this.otarg = [];
				this.otarg.push(targ);
				this.jquery(targ).hide();

			},


	showTargs:	function () {

				for(var i in this.otarg) this.jquery(this.otarg[i]).show();
				this.otarg = [];

			},


	setContent:	function (content) {

				this.bodyp.innerHTML = this.lead + unescape(content);
				this.body.style.height = this.bodyp.offsetHeight + 'px';

			},

	setLead:	function (lead) {

				this.lead = lead;

			}

}
	
