Use jQuery.each instead of "for (i in Array)" (#1489988)