add auto option

* add auto option (selected option is obtained from 'selected property of option tags)
* some indentation and jshint compatibility