To be consistent:

(function(window) {
  function HB() { ... };
  window.HB = HB;
}(this));