code: function getLocation(url){
      var m = url.toLowerCase().match(reURI);
      var proto = m[2], domain = m[3], port = m[4] || "";
      if ((proto == "http:" && port == ":80") || (proto == "https:" && port == ":443")) {
          port = "";
      }
      return proto + "//" + domain + port;
  }
docs: Returns  a string containing the schema, domain and if present the port
  @param {String} url The url to extract the location from
  @return {String} The location part of the url