google.load("jquery","1.4.2");

google.setOnLoadCallback(function(){
	
	/*$.ajaxSetup({async: false});
	$.getScript("inc/jquery.plugin.js");
	$.ajaxSetup({async: true});*/
	
	thisIndex=0;
	
	navigationAnimationSpeed=.75; // in seconds

	navAniSpd=navigationAnimationSpeed*1000;
	
	$("#topNav ul li a").each(function(){
									   
		thisA=$(this);									   
		thisContent=$(this).html();
		thisIndex++;
									   
		if(thisContent.length<=11) {
		
			$(this).html("<span class='oneLiner'>"+thisContent+"</span>");
			
		}
		
		thisA.attr("rel",thisIndex);
		thisContent=thisA.html();
		
		thisA.css("visibility","hidden").before("<a href=\""+$(this).attr("href")+"\" id=\"coolNav"+thisIndex+"\" class=\"coolNav\">"+thisContent+"</a>");
		
		thisAb=thisA.parent().children("#coolNav"+thisIndex);
		
		thisAb.hover(function(){
			
			$(this).animate({
			
				marginLeft: "-"+($(this).width()/4)+"px",
				marginTop: "-"+($(this).height()/4)+"px",
				fontSize: "20px",
				fontWeight: "bold"
			
			},navAniSpd);
		
		},function(){
		
			$(this).animate({
			
				marginLeft: "0",
				marginTop: "0",
				fontSize: "15px",
				fontWeight: "normal"
			
			},navAniSpd);	
			
		});
	
	});
	
});
