﻿jQuery(document).ready(function() {     
        
    //Lefthand Navigation Css
    if (jQuery(".m_LeftHandNavItemNiceUrlHiddenInput").attr("value") != null)
    {    
        var currentNodeNiceUrl = jQuery(".m_LeftHandNavItemNiceUrlHiddenInput").attr("value").toString();    
        jQuery(".menu-item").each(function() {        
            if (jQuery(this).attr("href") == currentNodeNiceUrl) {
                jQuery(this).css("background-color", "#666666");
                jQuery(this).css("color", "#FFFFFF");
            }
            if (jQuery(this).attr("href") == "/default.aspx" && currentNodeNiceUrl == "/home.aspx") {
                //alert("jQuery(this).attr(href) = " + jQuery(this).attr("href"));
                jQuery(this).css("background-color", "#666666");
                jQuery(this).css("color", "#FFFFFF");
            }
            jQuery(".top-tab-links").each(function() {
                if (jQuery(this).attr("href") == currentNodeNiceUrl)
                {
                    jQuery(this).css("color", "#134E4C");    
                }
            });
        }); 
    }
    
    //Subsection Top Context Menu Css and Tab Menu Contact Tab Css
    if (jQuery(".m_currentPageNiceUrlHiddenInput").attr("value") != null)
    {   
        var currentNodeNiceUrlTwo = jQuery(".m_currentPageNiceUrlHiddenInput").attr("value").toString();    
        
        jQuery(".SubsectionMenuLink").each(function() {
            if (jQuery(this).attr("href") == currentNodeNiceUrlTwo) {
                jQuery(this).css("color", "#134E4C");
            }
        });

        jQuery(".SubsectionMenuLinkNested").each(function() {
            if (jQuery(this).attr("href") == currentNodeNiceUrl) {
                jQuery(this).css("color", "#134E4C");
            }
        });
    }
    
    //Top Tabbed Menu Css    
    if (jQuery(".m_currentRPNNiceUrlHiddenInput").attr("value") != null)
    {
        var currentRPNNiceUrl = jQuery(".m_currentRPNNiceUrlHiddenInput").attr("value").toString();
        
        jQuery(".top-tab-links").each(function() {
            if (jQuery(this).attr("href").indexOf(currentRPNNiceUrl) != -1) {
                jQuery(this).css("color", "#134E4C");
            }
        });
    }
    
});

