﻿// Vertically Center Page Headers
$(function () {
    $("#headerText h1").css({ top: (170 - $("h1").height()) / 2 });

    $("#Voiance").parent().hover(function () {
        $(this).find("div.dropdown-outer").css("left", "3px").find("div.dropdown-arrow").css("padding-left", "15px");
    },
            function () {
                $(this).find("div.dropdown-outer").css("left", "-99999px");
            });

    $("#OPI").parent().hover(function () {
        $(this).find("div.dropdown-outer").css("left", "-63px").find("div.dropdown-arrow").css("padding-left", "100px");
    },
            function () {
                $(this).find("div.dropdown-outer").css("left", "-99999px");
            });

    $("#Translation").parent().hover(function () {
        $(this).find("div.dropdown-outer").css("left", "-164px").find("div.dropdown-arrow").css("padding-left", "230px");
    },
            function () {
                $(this).find("div.dropdown-outer").css("left", "-99999px");
            });

    $("#Resources").parent().hover(function () {
        $(this).find("div.dropdown-outer").css("left", "-332px").find("div.dropdown-arrow").css("padding-left", "360px");
    },
            function () {
                $(this).find("div.dropdown-outer").css("left", "-99999px");
            });

});

function highlightMenuItem(item) {
    $("#" + item).addClass("selected");
}

function hideRightColumn() {
    var rightWidth = $("#rightColumn").width();
    $("#rightColumn").hide()
    $("#centerColumn").width($("#centerColumn").width() + rightWidth - 10);
}

function hideLeftColumn() {
    var leftWidth = $("#leftColumn").width();
    $("#leftColumn").hide();
    $("#centerColumn").width($("#centerColumn").width() + leftWidth - 25);
}
