code: function(url) {
  		if (url.match(/^http/i)) {
  			return url;
  		}
  		if (url.substr(0,2) === '//') {
  			return window.location.protocol + url;
  		}
  		var root = window.location.protocol + '//' + window.location.host,
  			reg  = /[^\/]+\/\.\.\//,
  			ret;
  		if (url.substr(0, 1) === '/') {
  			ret = root + url;
  		} else {
  			ret = root + window.location.pathname.replace(/\/[^\/]+$/, '/') + url;
  		}
  		ret = ret.replace('/./', '/');
  		while(reg.test(ret)) {
  			ret = ret.replace(reg, '');
  		}
  		return ret;
  	}
docs: Convert from relative URL to abstract URL based on current URL
  
  @param  String  URL
  @return String