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xiw62P0gUqEW0FbDim4nVikFJbU2zZXybUEaxhCqOQqyh5/G0wpWICUwthyqwD4InOMuXJ7/gs7WkoPdVg1vykF8CDACEFanKO3aSYwAAAABJRU5ErkJggg==';
  
  
    $('.github-widget').each(function(){
  
      if(i == 0) $('head').append(
        '<style type="text/css">'
        +'.github-box{font-family:helvetica,arial,sans-serif;font-size:13px;line-height:18px;background:#fafafa;border:1px solid #ddd;color:#666;border-radius:3px}'
        +'.github-box a{color:#4183c4;border:0;text-decoration:none}'
        +'.github-box a:hover{text-decoration:underline}'
        +'.github-box .github-box-title{position:relative;border-bottom:1px solid #ddd;border-radius:3px 3px 0 0;background:#fcfcfc;background:-moz-linear-gradient(#fcfcfc,#ebebeb);background:-webkit-linear-gradient(#fcfcfc,#ebebeb);}'
        +'.github-box .github-box-title h3 {line-height:40px;font-family:helvetica,arial,sans-serif;font-weight:normal;font-size:16px;color:gray;margin:0;padding:0 0 0 30px;background:url('+box_title_png+') 7px center no-repeat}'
        +'.github-box .github-box-title h3 .repo{font-weight:bold}'
        +'.github-box .github-box-title .github-stats{position:absolute;top:8px;right:10px;background:white;border:1px solid #ddd;border-radius:3px;font-size:11px;font-weight:bold;line-height:21px;height:21px}'
        +'.github-box .github-box-title .github-stats a{display:inline-block;height:21px;color:#666;padding:0 5px 0 18px;background: url('+stats_png+') no-repeat}'
        +'.github-box .github-box-title .github-stats .watchers{border-right:1px solid #ddd}'
        +'.github-box .github-box-title .github-stats .forks{background-position:-4px -21px;padding-left:15px}'
        +'.github-box .github-box-content{padding:10px;font-weight:300}'
        +'.github-box .github-box-content p{margin:0}'
        +'.github-box .github-box-content .link{font-weight:bold}'
        +'.github-box .github-box-download{position:relative;border-top:1px solid #ddd;background:white;border-radius:0 0 3px 3px;padding:10px;height:24px}'
        +'.github-box .github-box-download .updated{margin:0;font-size:11px;color:#666;line-height:24px;font-weight:300}'
        +'.github-box .github-box-download .updated strong{font-weight:bold;color:#000}'
        +'.github-box .github-box-download .download{position:absolute;display:block;top:10px;right:10px;height:24px;line-height:24px;font-size:12px;color:#666;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.9);padding:0 10px;border:1px solid #ddd;border-bottom-color:#bbb;border-radius:3px;background:#f5f5f5;background:-moz-linear-gradient(#f5f5f5,#e5e5e5);background:-webkit-linear-gradient(#f5f5f5,#e5e5e5);}'
        +'.github-box .github-box-download .download:hover{color:#527894;border-color:#cfe3ed;border-bottom-color:#9fc7db;background:#f1f7fa;background:-moz-linear-gradient(#f1f7fa,#dbeaf1);background:-webkit-linear-gradient(#f1f7fa,#dbeaf1);}'
        +'.github-box .github-box-download .travis { position:absolute;top:13px;right:135px;}'
        +'.github-box *,.github-box *:before,.github-box *:after {-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}'
        +'</style>'
      );
      i++;
  
      var $container = $(this), $widget,
        repo = $container.data('repo'),
        travis = $container.data('travis'),
        vendorName = repo.split('/')[0],
        repoName = repo.split('/')[1],
        vendorUrl = "http://github.com/" + vendorName,
        repoUrl = "http://github.com/" + vendorName + '/' + repoName;
        travisImgUrl = "https://travis-ci.org/"+vendorName+"/"+repoName+".png?branch=master",
        travisUrl = "https://travis-ci.org/"+vendorName+"/"+repoName+"/builds";
  
      $widget = $(
        '<div class="github-box repo">'
          +'<div class="github-box-title">'
          +'<h3>'
          +'<a class="owner" href="' + vendorUrl + '">' + vendorName + '</a>'
          +'/'
          +'<a class="repo" href="' + repoUrl + '">' + repoName + '</a>'
          +'</h3>'
          +'<div class="github-stats">'
          +'<a class="watchers" href="' + repoUrl + '/watchers">?</a>'
          +'<a class="forks" href="' + repoUrl + '/network/members">?</a>'
          +'</div>'
          +'</div>'
          +'<div class="github-box-content">'
          +'<p class="description"><span></span> &mdash; <a href="' + repoUrl + '#readme">Read More</a></p>'
          +'<p class="link"></p>'
          +'</div>'
          +'<div class="github-box-download">'
          +'<p class="updated"></p>'
          +(travis
            ? '<a href="'+travisUrl+'"><img class="travis" src="'+travisImgUrl+'" alt="Build status" /></a>'
            : ''
          )
          +'<a class="download" href="' + repoUrl + '/zipball/master">Download as zip</a>'
          +'</div>'
          +'</div>'
      );
  
      $widget.appendTo($container);
  
      // Cache that to prevent running into a rate limit
      (function(url) {
        var callback = function(results) {
          var repo = results.data, date, pushed_at = 'unknown';
          if (repo.message && (/Rate Limit/i).test(repo.message)) {
            if (cachedData) { //closure
              callback({data: JSON.parse(cachedData)}); // try again, ignoring freshness of cache
            }
            return; // This may happen if there are lots of widgets and caching does not trigger enough
          }
          if (repo.pushed_at) {
            date = new Date(repo.pushed_at);
            pushed_at = (date.getMonth() + 1) + '-' + date.getDate() + '-' + date.getFullYear();
          }
          $widget.find('.watchers').text(repo.watchers);
          $widget.find('.forks').text(repo.forks);
          $widget.find('.description span').text(repo.description);
          $widget.find('.link').append($('<a />').attr('href', repo.homepage).text(repo.homepage));
          $widget.find('.updated').html('Latest commit to the <strong>master</strong> branch on ' + pushed_at);
          if (typeof localStorage != 'undefined') {
            repo._cachedAt = (new Date()).getTime(); //Unix epoch (ms since 1970)
            localStorage.setItem(url, JSON.stringify(repo));
          }
        };
  
        var cachedData = localStorage.getItem(url);
        var elapsedMinutes;
        if (typeof localStorage != 'undefined' && cachedData) {
          // check for stale cache (20 minutes)
          var cachedAtUnix = cachedData._cachedAt; // Unix epoch
          var elapsed = (new Date()).getTime() - cachedAtUnix;
          elapsedMinutes = elapsed / 1000 / 60; //ms -> s -> min
        }
        // fresh cache
        if (elapsedMinutes && elapsedMinutes < 20) {
          callback({data: JSON.parse(cachedData)});
        }
        // no cache or stale cache
        else {
          $.ajax({
            url: url,
            dataType: 'jsonp',
            success: callback
          });
        }
  
      })('https://api.github.com/repos/'+repo);
  
      $(this).removeClass("github-widget"); // only once
    }); //end $.each
  
  }); // end document.ready
  