converted b-nav.js's prototype into an IIFE and did some jslint goodness