moved css handling to window object