// make the current page show as active on the nav
$(document).ready(function() {
	$("#nav a").each(function() {
	if(this.href == window.location || this.href == document.location.protocol + "//" + window.location.hostname + window.location.pathname)
		 $(this).addClass("active");
	})
});

// hover effects
$(document).ready(function() {
	$("#nav a:not(.active) + img").each(function() {
		$(this).css({'display' : 'none'});
	})
	// hover effects
	$("#nav a:not(.active)").hover(function() {
		$(this).find("img").fadeIn(400);
	}, function() {
		$(this).find("img").fadeOut(400);
	})
});
