Using prop instead of attr to fix compatibility with jQuery.serializeArray()
Use jQuery's :selected selector
Use jQuery's :selected only for switching selected status
Merge pull request #9 from wjohnald/master

Fix compatibility with jQuery.serializeArray()