jQuery post-1.6 requires using prop() to access selectedIndex, not attr()