text: var ships_url = '/api/ajax/iffships.json';
  var mtf_url = 'https://api.mosturflot.ru/v3/rivercruises/ships?filter[is-own]=1';
  var vdh_ships = 'https://www.cruise-volna.com/api/vdh.php?motorships';
  
  
  var ul = $('#ships-list');
  
  $.when($.getJSON(vdh_ships), $.getJSON(mtf_url), $.getJSON(ships_url))
      .done(function(vdh_ships, mtf_ships, ships) {
          renderVDHShips(vdh_ships[0]);
          renderMtfShipsList(mtf_ships[0]);
          renderIffShipsList(ships[0]);
          $(".dataloader").delay(700).fadeOut(500);
      });
  
  function renderVDHShips(vdh) {
      return $.map(vdh, function (data, i) {
          var li = $('<li>'),
              img = $('<img>', {'src': '/assets/img/vdh/' + data['code'] + '.jpg', 'width': 150}),
              span = $('<span>'),
              a = $('<a>', {'href': '/ship?c=vdh&ship=' + data['id'], 'html': data['name']}),
              ai = $('<a>', {'href': '/ship?c=vdh&ship=' + data['id'], 'html': img});
          span.append(a);
          li.append(ai);
          li.append(span);
          ul.append(li);
      });
  
  }
  function renderMtfShipsList(ships){
      return $.map(ships.data, function(ship, i) {
          //if(images[i]) {
              var li = $('<li>'),
                  img = $('<img>', {'src': '/assets/images/mosturflot/' + ship.id + '.jpg', 'width': 150}),
                  span = $('<span>'),
                  a = $('<a>', { 'href': '/ship?c=mtf&ship=' + ship.id, 'html': ship.attributes.name}),
                  ai = $('<a>', { 'href': '/ship?c=mtf&ship=' + ship.id, 'html': img});
              span.append(a);
              li.append(ai);
              li.append(span);
              ul.append(li);
         // }
      });
  }
  
  function renderDonShipsList(ships){
      //console.log(ships);
      return $.map(ships['DATA'], function(ship, i) {
          if(ship['MAIN_VIEW'][0]) {
              var li = $('<li>'),
                  img = $('<img>', {'src': ship['MAIN_VIEW'][0]['IMAGE']['URL'], 'width': 150}),
                  span = $('<span>'),
                  a = $('<a>', { 'href': '/ship?c=don&ship=' + i, 'html': ship['NAME']}),
                  ai = $('<a>', { 'href': '/ship?c=don&ship=' + i, 'html': img});
              span.append(a);
              li.append(ai);
              li.append(span);
              ul.append(li);
          }
      });
  }
  
  function renderIffShipsList(ships) {
      return $.map(ships, function (ship, i) {
          //if (ship['company'] === 'iff') {
              var li = $('<li>'),
                  img = $('<img>', {'src': ship['photo'], 'width': 150}),
                  span = $('<span>'),
                  a = $('<a>', {
                      'href': '/ship?c=iff&ship=' + ship['id'],
                      'html': ship['name']
                  }),
                  ai = $('<a>', {'href': '/ship?c=iff&ship=' + ship['id'], 'html': img});
              span.append(a);
              li.append(ai);
              li.append(span);
              ul.append(li);
          //}
      });
  }
  
  function renderVolgaShipsList(ships){
      return $.map(ships, function(ship, i) {
          //console.log(ship);
          var li = $('<li>'),
              img = $('<img>', {'src': ship['photo'], 'width': 150}),
              span = $('<span>'),
              a = $('<a>', { 'href': '/ship?c=volga' +  '&ship=' + ship['id'], 'html': ship['name']}),
              ai = $('<a>', { 'href': '/ship?c=volga' + '&ship=' + ship['id'], 'html': img});
          span.append(a);
          li.append(ai);
          li.append(span);
          ul.append(li);
  
      });
  }
  