var ss = document.createElement("link");
ss.type = "text/css";
ss.rel = "stylesheet";
ss.href = "/css/js.css";
document.getElementsByTagName("head")[0].appendChild(ss);


$(document).ready(function(){
	if(document.getElementById('circleOfLiteracy')){
		hideText();
		
		$('#secondaryNav li a').focus(function(){hideText(); focusShowText(this)});
		$('#secondaryNav li a').click(function(){hideText();});
		
		$('#circleOfLiteracy li').hover(
			function(){showText(this)},
			function(){hideText()}
		);
	}
});

function hideText(){
	$("#circleOfLiteracy li div").hide();	
}

function showText(stage){
	hideText();
	var div = stage.getElementsByTagName('div');
	$(div).fadeIn('slow');
}

function focusShowText(stage){
	var id = stage.firstChild.nodeValue.toLowerCase();
	var li = document.getElementById(id);
	var div = li.getElementsByTagName('div')[0];
	$(div).fadeIn('slow');
}