have to change $.click() to $.change() for the radio buttons in bootstrap 3; fix some other bugs