//the draggable head
			
window.addEvent('load', function(){
	
	var head = $('the-head').getElement('h1');
	var headfx = new Fx.Morph(head, {duration: 1000, 'transition': Fx.Transitions.Elastic.easeOut});
	new Drag(head, {
		onComplete: function(){
			headfx.start({'top': 0, 'left': 0});
		}
	});
	
});
			
// Fade on hover

window.addEvent('domready',function() {

	var opacity = 0.2, toOpacity = 1;
	
	Element.implement({
		'hover': function(fn1,fn2) {
			this.addEvents({
				'mouseenter': function(e) {
					fn1.attempt(e,this);
				},
				'mouseleave': function(e) {
					fn2.attempt(e,this);
				}
			})
		}
	});
	
	$$('#social li').hover(function(e) {
		$$('.fade').tween('opacity',opacity);
	}, function(e) {
		$$('.fade').tween('opacity',toOpacity);
	});
});
