Fix resolution of 'this' within $.each