
function filterPath(pathString) {
  return pathString.replace(/^\//,'').replace(/\/(index\.\w{3,4})?$/,'')
}

var selectedMenuItem = function() {
$('a').filter(function() {
  return filterPath(this.pathname) == filterPath(location.pathname);
}).addClass('selected');
}

$(document).ready(function() {
	selectedMenuItem();
});

