protected function _parseUrls($text, array $paths)
    {
        $matches = array();
        $replaces = array();

        $finder = $this->getService('anahita:file.pathfinder')
                ->addSearchDirs(array_reverse($paths));
        $starting_path = $paths[0];

        if (preg_match_all('/url\((.*?)\)/', $text, $matches)) {
            foreach ($matches[1] as $match) {
                $match = str_replace(array('"', "'"), '', $match);

                if ($path = $finder->getPath($match)) {
                    $path = AnHelperFile::getTravelPath($starting_path, $path);
                    $path = str_replace(DS, '/', $path);
                    $replaces[$match] = $path;
                }
            }
        }

        $text = str_replace(array_keys($replaces), array_values($replaces), $text);

        return $text;
    }