var Accommodation = (function() { var dataOfActivityById = {}; var routeDataBySupplierId = {}; var activityDeferredById = {}; // Once this is resolved, the corresponding dataOfActivityById and routeDataBySupplierId // values are assumed to be set. var m; var initHotels = function(supplierId, activityId, agencyId, $hotelSelect, routeSelectionContextData) { $hotelSelect.empty(); var hotelInfosOfActivity = dataOfActivityById[activityId].hotelInfos; var localResidenceHotelInfo = null; var localResidenceHotelId = null; jQuery.each(hotelInfosOfActivity, function() { if (this.special == 'localResidence') { localResidenceHotelInfo = this; localResidenceHotelId = this.id; return false; } }); if (localResidenceHotelInfo != null) { $hotelSelect.append(jQuery("