//TDO 2009

//jquery delay empty function
$.fn.delay = function(time, callback){
    jQuery.fx.step.delay = function(){};
    // Return meaningless animation, (will be added to queue)
    return this.animate({delay:1}, time, callback);
}

$(document).ready(function () {
							
	// find the div.fade elements and hook the hover event
	$('div.fade').hover(function() {
		// on hover, find the element we want to fade *up*
		var fade = $('> div', this);
		fade.stop().fadeTo(200, 1);
		fade.fadeIn(200);
		
		}, function () {
		// on hovering out, fade the element out
		var fade = $('> div', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(500, 0);
			
		} else {
		  // fade away slowly
		   fade.fadeOut(900);
		  
		}
	});
	
	// animate lower text
	$("#takethetest").delay(2000).animate({ 
		top: "148px"
	}, 700 );

	$("#sub").delay(2000).fadeIn(1000);
});
