Bugfix: IE8 - replaced Array.forEach call with $.each