crossbrowser setClass function