$(function(){
      
  
  /**
   * Github clone-url replacement
   *
   */
  var clone_box = $("<div id=\"darkplain\"><div id=\"clonebox\"><h1>Clone Url</h1><textarea></textarea></div></div>")        
                    .hide()
                    .appendTo('body')
                    .find('#clonebox').click(function() { return false; })
                    .end();
        
  $('a[href$=".git"]').click(function() {          
    
    var el = $(this),
        textarea = clone_box.find('textarea');
    
    textarea.val(el.attr('href'));
    
    clone_box.fadeIn();
    textarea.focus().get(0).select();
    $(document.body).one('click', function(){ clone_box.fadeOut(); });
                    
    return false; 
  });
  
  // kickoff animation
  animation();
  
});

