Frontend_Tariff_List = function() {
  var self = this;

  self.executeChangeDescription = function() {
    var init = this;
    var tariff_id = $(init).val();
    self.executeShowDescription(tariff_id);
  }

  self.executeShowDescription = function(tariff_id) {
    $('.tariff_list_description').hide();
    $('.tariff_list_description[tariff_id='+tariff_id+']').show();
  }

  self.updateDescriptionList = function(service_id) {
    var tariff_list = $('.tariff_list_select[service_id='+service_id+']');
    $.each(tariff_list, function(id, object) {
      var tariff_id = $(object).val();
      self.executeShowDescription(tariff_id);
    });
  }

  self.__init__ = function() {
    $('.tariff_list_select').change(self.executeChangeDescription);
    $('.tariff_list_init').click(parent.selectTariffForService);
  }

  self.__init__();
}
