$(function() {
  var $body = $('body');

  $body.find('.animated_icon').each(function() {
    $(this).html('');
    var animation_name = $(this).attr('data-icon');
    var animation = bodymovin.loadAnimation({
      container: this,
      path: '/static/animation/' + animation_name + '.json',
      renderer: 'svg',
      loop: true,
      autoplay: true
    });
  });
});
