jQuery for loop code change

forEach was throwing an eception in IE8 so to make compatable switched
the loop code to $.each.
in IE8 I was getting the exception "forEach is not a function" on this line.