﻿$(document).ready(function() {
    $("#navigation ul li a").css('color', '#FFF');

    var pathname = window.location.pathname;
    $("#navigation ul li a").each(function() {
        if (pathname.indexOf($(this).attr("href")) != -1) {
            $(this).parent().addClass("active");
            $(this).css('color', '#27364A');
        }
    });

    if ($.client.os == 'Mac') {
        // Override template.
        $("#smc-links a.link").css('margin-left', '75px');
    }

    $("#navigation ul li").hover(
      function() {
          $(this).children("a").css('color', '#27364A');
      },
      function() {
          if (!$(this).hasClass('active')) {
              $(this).children("a").css('color', '#FFF');
          }
      }
    );
});
