fix toggle button for new jquery version (#167)

This commit should fix #167. 

In jquery 1.6 the handling of prop and attr has changed. The current jquery library returns "selected" instead of "true" for attr("selected"). This commit access attr("selected") during initialization and then uses prop instead.  Tested on current firefox and chrome browsers.