$(function()
{	
	$(".lightbox").lightBox();
	
	/* Navigation Flyout Menu */
	/*
	var tallest = 0;
	$("#nav ul").each(function()
	{
		if ($(this).height() > tallest)
			tallest = $(this).height();
	});
	$("#nav ul").height(tallest);
	*/
	
	// Main navigation drop-down menu functions
	$("#nav .drop-wrap1").hide().css("visibility", "visible");
	$("#nav ul .drop-wrap2").hide();
	$("#nav > li").hover(
		function()
		{
			$(this).children(".drop-wrap1").fadeIn("fast");
		},
		function()
		{
			$("#nav ul .drop-wrap2").fadeOut("fast");
			$(".drop-wrap1").fadeOut("fast");
		}
	);
	$("#nav ul li").hover(
		function()
		{
			if ($(this).children("div").length > 0)
			{
				$(this).addClass("active");
				$(this).children(".drop-wrap2").css("z-index", "80");
				$(this).parents("li .drop-wrap2").css("z-index", "75").css("right", "-156px");
				$(this).parent("ul").css("padding-right", "6px");
			}
			text = $(this).children("a").text();
			$(this).children("a").text(text.replace("+", "-"));
			$(this).children(".drop-wrap2").fadeIn("fast");
		},
		function()
		{
			if ($(this).children("div").length > 0)
			{
				$(this).removeClass("active");
				$(this).parents(".drop-wrap2").css("right", "-150px");
			}
			$(this).children(".drop-wrap2").fadeOut("fast");
			$(this).parent("ul").css("padding-right", "0");
			text = $(this).children("a").text();
			$(this).children("a").text(text.replace("-", "+"));
		}
	);
});