var talentFadeTime = 0.4;

function addThumbListeners() {
	
	var thumbs = document.getElementsBySelector("#content-main .talentRightCol .talentItem a");
	var infos = document.getElementsBySelector("#content-main .talentLeftCol .talentItemInfo");
	
	//turn off the info divs
	YAHOO.util.Dom.setStyle(infos, 'opacity', 0);
	
	YAHOO.util.Event.addListener(thumbs, "mouseover", showTalent);
	YAHOO.util.Event.addListener(thumbs, "mouseout", hideTalent);
	
	//turn off the divs that're covering the info divs so we don't see a flicker
	YAHOO.util.Dom.setStyle('talentItemInfoBlockerTop', 'display', 'none');
	YAHOO.util.Dom.setStyle('talentItemInfoBlockerBottom', 'display', 'none');
}
YAHOO.util.Event.addListener(window, "load", addThumbListeners);

function showTalent(evt) {
	var thumbID = this.id;
	var thisImg = this.getElementsByTagName('img');
	YAHOO.util.Dom.addClass(thisImg, "over");
	var spID = thumbID.split("_");
	var infoID = "info_"+spID[1];
	//block the text below
	YAHOO.util.Dom.setStyle('talentItemInfoBlockerBottom', 'display', 'block');
	var myAnim = new YAHOO.util.Anim(infoID, { opacity: { to: 1 } }, talentFadeTime, YAHOO.util.Easing.easeOut);
	myAnim.animate();
}

function hideTalent(evt) {
	var thisImg = this.getElementsByTagName('img');
	YAHOO.util.Dom.removeClass(thisImg[0], "over");
	var thumbID = this.id;
	var spID = thumbID.split("_");
	var infoID = "info_"+spID[1];
	//block the text below
	YAHOO.util.Dom.setStyle('talentItemInfoBlockerBottom', 'display', 'none');
	var myAnim = new YAHOO.util.Anim(infoID, { opacity: { to: 0 } }, talentFadeTime, YAHOO.util.Easing.easeOut);
	myAnim.animate();
	
}
