Fix link behavior by replacing them with <spans>

The <a href="#">-style links were borking SmartGraphs for
some reason.

Now we substitute the anchor tags with spans, and style them
to look like links.