﻿var prodMenu = document.getElementById("prodMenu");
if (prodMenu) 
{
var currentPath = getPath(location.href);
var el = prodMenu.getElementsByTagName("a");
for (var i = 0; i < el.length; i++) { 
var href= el[i].getAttribute("href");
if (href.toLowerCase() == currentPath.toLowerCase())
{
el[i].parentNode.className = 'hl';
}
}
}

function getPath(url) {
    var a = document.createElement('a');
    a.href = url;
    return a.pathname.substr(0,1) === '/' ? a.pathname : '/' + a.pathname;
}
