﻿var sCurrentProductCategory;
var nCurrentProductSubCategoryID = 0;

sCurrentPage = "products";

function InitializeNav() {
    // Turn current tab on
    ToggleTab(sCurrentProductCategory, 'on');

    $("ul.navigationTabbed li").hover(
        function (event) {
            // Make sure the main tab stays on
            if ($(this).attr("id") != sCurrentProductCategory) ToggleTab($(this).attr("id"), 'on');

            // Turn on our blanket layer. It's so IE7 can't interact with the background.
            $('#blanket').show();

            var sSubTabID = "navigationSubTab" + $(this).attr("id");
            $('#' + sSubTabID).fadeIn("fast");
        }, function (event) {
            // Turn the main tab off
            if ($(this).attr("id") != sCurrentProductCategory) ToggleTab($(this).attr("id"), 'off');

            // Turn off our blanket layer. It's so IE7 can't interact with the background.
            $('#blanket').hide();

            var sSubTabID = "navigationSubTab" + $(this).attr("id");
            $('#' + sSubTabID).fadeOut("fast");
        }
    );

    // Add padding to the top of all first subtabs
    $('#navigationSubTabBreads li:first').addClass('first');
    $('#navigationSubTabMisc li:first').addClass('first');
}

function InitNutritionHide() {
    $('#productNutrition').click(
        function() {
            $(this).hide();
        }
    );
}

