Added better support for IE8 and IE7
Bugfixes