Replaced array.map with jQuery.map for IE8 compatible