base document.readyState
dropped IE8-, removed Modernizr, used addEventListener for dom ready