fix errors in IE 8

This pull request fixes the following issues in IE 8:

-> IE 8 does not have .getElementsByClassName(). This has been replaced with .querySelectorAll(), which is available in IE 8+. This will not work in IE 7, but IE 7 has a whole other host of problems.

-> IE 8 does not have Array#indexOf. It does, however have String#indexOf. Instead of Array and Array#join, this changes it to a String and uses the += String concatenation operator. As a side benefit, this is faster in tests posted on the web.

http://www.sitepoint.com/javascript-fast-string-concatenation/
http://jsperf.com/string-concatenation/28
http://jsperf.com/concat-vs-plus-vs-join