code: function namespace(ns) {
    var names = ns.split('.');
    var owner = window;
    for (var i = 0; i < names.length; i++) {
      var name = names[i];
      owner[name] = owner[name] || {};
      owner = owner[name];
    }
    return owner;
  }
docs: Declare a namespace from a string:
  
  namespace('Rexxar.Widget.AlertDialog') => Rexxar.Widget.AlertDialog = {}
  
  @param {string} ns
  @returns {object}