function dropTitleShadow(type)
{
	var h = document.getElementsByTagName(type);
	for(i=0;i<h.length;i++)
	{
		var main = h[i];
		var text = main.innerHTML;
		main.innerHTML = "";
		var content = document.createElement('span');
		content.innerHTML = text;
		content.className = "shadowText_text";
		var shadow = document.createElement('span');
		shadow.innerHTML = text;
		shadow.className = "shadowText_shadow";
		main.appendChild(content);
		main.appendChild(shadow);
	}
}

var infoBoxFadeFx;

function setAdditionalInformation()
{
	infoBoxFadeFx = new Fx.Morph('infoBox', {duration: 750, transition: Fx.Transitions.Sine.easeOut});
	$$('.listBox').each(function(item, index) {
		var el = item;
		
		if(el.title)
		{
			el.info = el.title;
			el.title = "";
			
			el.onmouseover = function()
			{
				this.style.color = "#96814a";
				this.style.backgroundImage = "url(/pix/main/h2_hgb.gif)";
				this.style.backgroundRepeat = "repeat-x";
				this.style.backgroundPosition = "0px 9px";
				this.style.cursor = "pointer";
				
				$('infoBox').innerHTML = '<strong>Zusatzinfo</strong><br />' + this.info;
				$('infoBox').style.top = this.offsetTop + this.offsetHeight - 1 + "px";
				$('infoBox').style.left = this.offsetLeft + "px";
				$('infoBox').setOpacity(0);
				$('infoBox').style.display = "block";
				infoBoxFadeFx.start({ 'opacity': [0, 1] });
			}
			
			el.onmouseout = function()
			{
				this.style.color = "#FFF";
				this.style.backgroundImage = "none";
				$('infoBox').style.display = "none";
			}
		}
	});
}

window.addEvent("domready",function(){
	dropTitleShadow("h1");
	dropTitleShadow("h2");
	setAdditionalInformation();
});

function setPersonalCookie()
{
	var personalBF2stats = Cookie.write('personalBF2stats', pid);
}
