String.prototype.supplant = function (o) {
    return this.replace(/{([^{}]*)}/g,
        function (a, b) {
            var r = o[b];
            return typeof r === 'string' || typeof r === 'number' ? r : a;
        }
    );
};

var sbw = function() {
  function fixnav() {
    var hp = window.location.pathname,
      select = "#nav a[href='{where}']".supplant({where: hp});
    $(select).parents("#nav li").remove();
  }
  
  return {
    fixnav: fixnav,
  }
}();
