Localize scope of 'event' when looping over 'available_events' to fix in IE10