IE8 complains, if catch block is missing
IE8 don't knows the Array.forEach function (simple version fix)
use document, not doc
fixed spacing
Merge pull request #1751 from goldquest/dev_IE8-fix

Fixing IE8 errors