code quality improvement

* remove redefinition of `var options`
* remove trailing comma of death (IE specific)
* explicit loop assignment
* ` _$li` and `selectedIndex` leak variable to global namespace (typo on `;` should be `,`)