added support for ie7 and ie8