document.observe("dom:loaded", function() {


});

var setUpBubble = function(hoverID, bubbleID){
	var lock = false;
		Event.observe(hoverID, 'mouseover', function(event){
		inEffect = new Effect.Parallel([
			new Effect.Appear(bubbleID, {sync:true}),
			new Effect.Move(bubbleID, { x: 0, y: -10, mode: 'relative', sync:true})
			],	 { 
			  duration: 0.15,
			  delay: .1 ,
			  beforeStart: function(){ $(bubbleID).setStyle({ top: '-75px'}); }
		});
	} .bind(this));
	
	Event.observe(hoverID, 'mouseout', function(event){
		inEffect.cancel(); // Cancel the "in" animation in case we are still waiting for it to happen
		new Effect.Parallel([
			new Effect.Fade(bubbleID, {sync:true}),
			new Effect.Move(bubbleID, { x: 0, y: -10, mode: 'relative', sync:true})
			],	 { 
			duration: 0.15
		});		
	} .bind(this));
}

bioDur = '.2';

var showFullBio = function(e) {
	Effect.Fade('twitter-and-blog', {duration: bioDur});
   	Effect.BlindDown('rest-of-bio', {duration: bioDur, queue: 'end'});
    setTimeout(function(){
    	Element.hide($('show-full-bio-link'));
    	Element.show($('hide-full-bio-link'));     	
    },400);
	Event.stop(e);
}

var hideFullBio = function(e) {
    Element.hide($('hide-full-bio-link'));    
    Element.show($('show-full-bio-link'));    	
    new Effect.BlindUp('rest-of-bio', {duration: bioDur});
	Effect.Appear('twitter-and-blog', {duration: bioDur, queue: 'end'});
	Event.stop(e);
}