code: function(url){
  			var rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
  				urlLower = url.toLowerCase(),
  				parts = rurl.exec( urlLower ),
  				ajaxLocation,
  				ajaxLocParts;
  
  			try {
  				ajaxLocation = location.href;
  			} catch( e ) {
  				// Use the href attribute of an A element
  				// since IE will modify it given document.location
  				ajaxLocation = document.createElement('a');
  				ajaxLocation.href = '';
  				ajaxLocation = ajaxLocation.href;
  			}
  
  			ajaxLocation = ajaxLocation.toLowerCase();
  
  			// uh oh, the url must be relative
  			// make it fully qualified and re-regex url
  			if (!parts){
  				urlLower = _absolutizeURI(ajaxLocation,urlLower).toLowerCase();
  				parts = rurl.exec( urlLower );
  			}
  
  			// Segment location into parts
  			ajaxLocParts = rurl.exec( ajaxLocation ) || [];
  
  			// do hostname and protocol and port of manifest URL match location.href? (a "local" request on the same domain)
  			var matched = !(parts &&
  					(parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
  						(parts[ 3 ] || (parts[ 1 ] === 'http:' ? '80' : '443')) !==
  							(ajaxLocParts[ 3 ] || (ajaxLocParts[ 1 ] === 'http:' ? '80' : '443'))));
  		
  			return matched;
  		}
docs: Tests a URL to see if it's on the same domain (local) or not
  @method isLocalRequest
  @param {URL to test} url
  @returns {bool} Whether the URL is local or not
  Derived from: https://github.com/jquery/jquery/blob/master/src/ajax.js