Generalize radio button visibility toggling JS a little bit