// Generated by CoffeeScript 1.6.3
(function() {
  $(document).ready(function() {
    $('#slider').cycle({
      fx: 'fade',
      timeout: 7200,
      random: 1
    });
    if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
      $('#download').css('background', 'none');
      $('#download_url, .download_information').remove();
      $('#download').prepend('<a href="https://play.google.com/store/apps/details?id=org.msk86.ygoroid">\
      <img alt="Get it on Google Play"\
           src="https://developer.android.com/images/brand/zh-cn_generic_rgb_wo_60.png" />\
    </a>');
    } else {
      $.get('/mycard/download.url', function(data) {
        var matched;
        if (matched = data.match(/mycard-(.*?)-(.*)\.(.*)/)) {
          return $('#download_version').html(matched[1]);
        } else {
          return $('#download_version').html('读取失败');
        }
      });
    }
    return $.getJSON('/links.json', function(data) {
      var link, _i, _len, _results;
      _results = [];
      for (_i = 0, _len = data.length; _i < _len; _i++) {
        link = data[_i];
        _results.push($('<a />', {
          href: link.url,
          rel: "nofollow"
        }).append($('<img />', {
          title: link.name,
          alt: link.name,
          src: link.logo
        })).appendTo('#links'));
      }
      return _results;
    });
  });

}).call(this);

/*
//@ sourceMappingURL=mycard.map
*/
