public function link($destination, array $params = array())
	{
		if (($pos = strrpos($destination, '#')) !== FALSE) {
			$fragment = substr($destination, $pos);
			$destination = substr($destination, 0, $pos);
		} else {
			$fragment = '';
		}

		if (strncmp($destination, '//', 2) === 0) {
			$absoluteUrl = TRUE;
			$destination = substr($destination, 2);
		} else {
			$absoluteUrl = FALSE;
		}

		$pos = strrpos($destination, ':');
		$presenter = substr($destination, 0, $pos);
		if ($pos + 1 < strlen($destination)) {
			$params['action'] = substr($destination, $pos + 1);
		}

		$request = new Nette\Application\Request($presenter, 'GET', $params);
		$url = $this->router->constructUrl($request, $this->refUrl);
		if ($url === NULL) {
			throw new InvalidLinkException("Router failed to create link to '$destination'.");
		}

		if (!$absoluteUrl && strncmp($url, $this->refUrlHost, strlen($this->refUrlHost)) === 0) {
			$url = substr($url, strlen($this->refUrlHost));
		}

		if ($fragment) {
			$url .= $fragment;
		}

		return $url;
	}