more robust id naming

@jamesshedden `id`s now named for each <a/>, not for enclosing div.
ID should be on `<a>` tag inside rather than the containing `<div>`?