// ADD CLASS TO CURRENT PAGE AND LINKS
$('header ul#mainnav li').each(function(){
var pathname = window.location.pathname;
var currentPage = pathname.substr(pathname.lastIndexOf('/') + 1);
var anchorLink = $(this).find('a').attr('href');
var currentLink = anchorLink.substr(anchorLink.lastIndexOf('/') + 1);
if (currentLink === currentPage) {
$(this).addClass('you-are-here');
}
});