/*  GitHub Badge, version 1.2.3
 *  (c) 2008 Dr Nic Williams
 *
 *  GitHub Badge is freely distributable under
 *  the terms of an MIT-style license.
 *  For details, see the web site: http://github.com/drnic/github-badges/tree/master
 *
 *--------------------------------------------------------------------------*/

  GITHUB_USERNAME="alno";
  GITHUB_LIST_LENGTH=10;
  GITHUB_HEAD="h2";
  GITHUB_TITLE = "GitHub"
  GITHUB_SHOW_ALL = "Показать все"

var GithubBadge = {
  Version: '1.2.3'
};

GitHubBadge = {};

GitHubBadge.Launcher = new function() {

  this.init = function() {
	this.path = 'http://drnic.github.com/github-badges/dist/';

	this.requestContent( this.path + 'ext/jquery.template.js' );
	this.requestContent( this.path + 'github-badge.js', 'GitHubBadge.Launcher.loadedLibraries' );
  }

  this.loadedLibraries = function() {
    if(typeof jQuery == 'undefined' || typeof jQuery.template == 'undefined')
      throw("GitHub Badge requires jQuery and jQuery.template");
    
    GitHubBadge.buildUserBadge(GITHUB_USERNAME);
  }

  this.requestContent = function( url, callback ) {
    onLoadStr = (typeof callback == "undefined") ? "" : 'onload="' + callback + '()"';
    document.write('<script ' + onLoadStr + 'type="text/javascript" src="'+url+'"></script>');
  }
}

GitHubBadge.Launcher.init();