Fixes for IE8

for...in loops changed to $.each