text: var Github = require('./../js/github.js').githubModule;
  
  var displayUser = function(info, repos) {
    $('h2').show();
    $('#error').empty();
    $('#user-info').empty();
    $('#user-repos').empty();
    var img = info[3];
    var username = info[0];
    var name = info[1];
    var location = info[2];
    if(name !== null && location !== null){
      $('#user-info').append("<img src='" + img + "'><h3>" + username + "</h3><p>" + name + "<br>" + location +  "</p>");
    } else {
      $('#user-info').append("<img src='" + img + "'>" + "<h3>" + username + "</h3>");
    };
  
    for (var i = 0; i < repos.length; i++) {
      var title = repos[i][0];
      var description = repos[i][1];
      var language = repos[i][2];
      if(description === null){
        description = "";
      };
      $('#user-repos').append("<br><div class='col-md-11 well'><h4>" + title + "</h4><h5 class='bold'>Language: "+ language + "</h5><h5>" + description + "</h5></div>");
    };
  };
  
  $(document).ready(function() {
    var newGithub = new Github();
    $('#form').submit(function(event) {
      event.preventDefault();
      var username = $('#username').val();
      newGithub.getUser(username, displayUser);
    });
  });
  