fixed bugs for ie7 and ie8, added support for resizing