use $.map instead of native .map

This will work in IE7/8 where the native .map function is not supported.