// Generated by CoffeeScript 1.6.3
(function() {
  $(".navbar").click(function() {
    return $('body').animate({
      scrollTop: 0
    });
  });

  $.getJSON('https://my-card.in/links.json', function(data) {
    var link, _i, _len, _results;
    _results = [];
    for (_i = 0, _len = data.length; _i < _len; _i++) {
      link = data[_i];
      _results.push($('<li/>').append($('<a />', {
        href: link.url,
        rel: "nofollow"
      }).append($('<img />', {
        title: link.name,
        alt: link.name,
        src: "https://my-card.in/links/" + link.id + ".png"
      }))).appendTo('#links'));
    }
    return _results;
  });

  if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
    $('#download_android').removeClass('hidden');
  } else {
    $('#download_desktop').removeClass('hidden');
  }

  $.getJSON('https://my-card.in/duelists.json', function(data) {
    var duelist;
    $('#duelist_lastest_issue').html(data[data.length - 1].issue);
    $('#duelist_lastest_issue').removeClass('hidden');
    return $('#duelists').html((function() {
      var _i, _len, _results;
      _results = [];
      for (_i = 0, _len = data.length; _i < _len; _i++) {
        duelist = data[_i];
        _results.push($('<li/>').append($('<a/>', {
          href: duelist.url,
          text: duelist.title
        })));
      }
      return _results;
    })());
  });

}).call(this);

/*
//@ sourceMappingURL=index.map
*/
