fixed ie8 bugs, merge existing html classes, support 'no-js' class

also added anonymous function to prevent global variables