//Ideagrow Inc. custom Safari hover bug javascript prototype fix
var SafariHoverDeBug = Class.create();

SafariHoverDeBug.prototype = {

  initialize: function(thisEle) {
	this.linkClassEle = thisEle;
    this.origTextColor = '#FFFFFF';
	this.origBckColor = '#B7CD29';
	this.hvrTextColor = '#FFFFFF';
	this.hvrBckColor = '#515355';
	
	this.linkClassEle.onmouseover = this.cssFix.bindAsEventListener(this);
	this.linkClassEle.onmouseout = this.cssFix.bindAsEventListener(this);
	
  },

  cssFix: function(evt) {
  	if(evt.type == 'mouseover')
	{
		this.linkClassEle.style.backgroundColor = this.hvrBckColor;
		this.linkClassEle.style.color = this.hvrTextColor;
	}
	else if(evt.type == 'mouseout')
	{
		this.linkClassEle.style.backgroundColor = this.origBckColor;
		this.linkClassEle.style.color = this.origTextColor;
	}
  }
};



function showSubMenu(evt,menuItemEvt,projMenu)
{
	if(evt.type == 'mouseover')
	{
		projMenu.style.display = 'block';
		menuItemEvt.style.backgroundColor = '#515355';
		menuItemEvt.style.color = '#FFFFFF';
	}
	else if(evt.type == 'mouseout')
	{
		projMenu.style.display = 'none';
		if(menuItemEvt.nonActiveSection)
		{
			menuItemEvt.style.backgroundColor = '';
			menuItemEvt.style.color = '#FFFFFF';
		}
	}
}

/*

Show the correct corresponding image

*/
function loadLargeImage(loadThisImage)
{
	$$('#mid_content a').each( function(element){
		element.style.display = 'none';
	});
	$(loadThisImage).style.display = 'block';
}