﻿$(function() {

	$("#nav ul li").hover(navMenuHoverOn, navMenuHoverOff);
	
	initializeImageHover($("#ft-tools-social a img"));
	initializeImageHover($("#contribute-badge img"));
	initializeImageHover($("#ft-tools-social a img"));
	
	applyIE6Hacks();

});

function navMenuHoverOn() {
	$(this).addClass('hover');
	$(this).find(".nav-menu").css('display', 'block');
}

function navMenuHoverOff() {
	$(this).removeClass('hover');
	$(this).find(".nav-menu").css('display', 'none');
}

function applyIE6Hacks() {

	/* Adds the class 'ie6' to all bd elements. Check IE6.css for reason */
	$("#bd").addClass('ie6');
	
	// Tweaks the subsection-header element. Doesn't work in style-sheet. Needs to be forced after page loads. Uggg...
	$(".subsection-header").css('display', 'inline-block'); 
}