//<![CDATA[    
   // When the page is ready
   jQuery.noConflict();
   $(document).ready(function(){
							  

	
   $("div#header").hide(); 

	$("div#menu").find("a").not(".alert").bind("mouseover",addFade);
	$("div#featurewrapper").find("a").not(".alert").bind("mouseover",addFade2);
	$("div#contentwrapper").find("a").not(".alert").bind("mouseover",addFade2);
	$("div.submenu").find("a").not(".alert").bind("mouseover",addFade);

function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) {
	var delta = maxValue - minValue;
	var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
	return Math.ceil(stepp)
}

function addFade() {
		doBGFade(this,[229,230,233],[255,255,255],'transparent',75,20,4);
	}

function addFade2() {
		doBGFade(this,[255,127,0],[255,255,255],'transparent',75,20,4);
	}
	
function doBGFade(elem,startRGB,endRGB,finalColor,steps,intervals,powr) {
	if (elem.bgFadeInt) window.clearInterval(elem.bgFadeInt);
	var actStep = 0;
	elem.bgFadeInt = window.setInterval(
		function() {
			elem.style.backgroundColor = "rgb("+
				easeInOut(startRGB[0],endRGB[0],steps,actStep,powr)+","+
				easeInOut(startRGB[1],endRGB[1],steps,actStep,powr)+","+
				easeInOut(startRGB[2],endRGB[2],steps,actStep,powr)+")";
			actStep++;
			if (actStep > steps) {
			elem.style.backgroundColor = finalColor;
			window.clearInterval(elem.bgFadeInt);
			}
		}
		,intervals)
}    
     
 });

 //]]>