On a side note, using jQuery.each in this case might affect onto the performance. My recommendation is to either use a standard for loop or jQuery map method which is faster.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!