Use $.map instead of Array.prototype.map