var GREY = {
		
  config : {

	
  },
		
  init : function () {
	  GREY.authorList.init();
  },
  
  authorList : {
	  
	  init : function () {
	  	
		  // create bubbles out of biography divs	
		  GREY.authorList.createBubbles();
	  
		  // add show/hide to author list
		  $('div.with-biography .name, div.with-biography .avatar').live('mouseenter', function () {
			  $(this).parent().parent().find('.biography').fadeIn("slow");
		  });
		  $('div.with-biography .name, div.with-biography .avatar').live('mouseleave', function () {
			  $(this).parent().parent().find('.biography').fadeOut("fast");  
		  });
		  
		  if ( location.href.match("\/feed-rollout-facebook\/" ) ) {
			  $('a').attr('target', '_blank');
		  }
		  		
  	  },
  	  
  	  createBubbles : function () {
  		
  		  var htmlBio = $('div.with-biography .biography').each(function () { 
  			  var htmlBio = $(this).html();
  			  $(this).html('<span class="bubble">'+htmlBio+'</span><span class="flag">&nbsp;</span>');
  			  var divHeight = $(this).parent().height();
  			  $(this).find('.bubble').css({'bottom': divHeight + 15 + 'px'});
  			  $(this).find('.flag').css({'bottom': divHeight + 'px'});
  		  });  		  

  	  }  
	  
  }

}

$(document).ready(function() {
	GREY.init();
});
