javascript to pick up external links and create modal