//
//	Brothers In Arms
//	Hell's Highway
//
//	Custom Animation Functions
//
//	Requires jQuery (www.jquery.com)
//
//	G.Suntop (POP)
//

jQuery(function(){

	// Only run when tooltips are present
	if($("div#tooltips").length) {
			
		var currentTitle;
		var tooltip;
		var newsButton = $("div#btn-news-wrapper a");
			
		$("div#btn-news-wrapper a").fadeOut("fast");	
		
		// BIA Previous Title Tooltips:
		$("div#bia_titles a").hover(
			// OVER
			function(){
				currentTitle = $("div#bia_titles a").index(this);

				tooltip = $("div#tooltips div.tooltip div:eq("+currentTitle+")");
				
				if(tooltip.css("display") == "none")	// Prevents spastic animation queues
					tooltip.fadeIn("slow");
			},
			// OUT
			function(){
					tooltip.fadeOut("fast");
			}
		);
		
		// News button glow:
		$("div#btn-news-wrapper").hover(
			// OVER
			function() {
				if(newsButton.css("display") == "none")
					newsButton.fadeIn("slow");
			},
			// OUT
			function() {
				newsButton.fadeOut("slow");
			}
		);
	}
	
});