put popup init functions in the order they are in html.