  
      $(document).ready(function() {
  
          $("#nav a").each(function() {
if(this.href == window.location || this.href == document.location.protocol + "//" + window.location.hostname + window.location.pathname)
     $(this).addID("active");
});
  
      });


