footer links / refactor js popup function