- + '<h3 class="title">'
- + '<a href="' + hit['location'][0]['md-electronic-url']
- + '" target="_blank" >'
- + hit["md-title"] + '</a></h3>';
+ + '<h3 class="title">';
+ if (link) html += '<a href="'+link+'" target="_blank" >';
+ html += hit["md-title"];
+ if (link) html += '</a>';
+ html += '</h3>';