I've been working on a form element replacement script – replacing normal form elements with divs that can be styled – but I've run into an issue with radio buttons. I cannot figure out how to remove a checked replacement button's "selected" class when another button is selected.
I've included my code in this fiddle: http://jsfiddle.net/zumwalt/eEvPE/3/
Any help is greatly appreciated!