$(document).ready(function(){
    $('#header>div>span>a:first').hover(function(){
            if ($('#tags').is(':hidden')) {
                    $('#tags').css({'top': $(this).parent().parent().height() + 2}).stop(true, true).fadeIn()
                } else {
                    $('#tags').stop(true, true).show()
                }
        }, function(){
            if ($('#tags').is(':visible')) {
               $('#tags').stop(true, true).delay(250).fadeOut()
            }
        })
        $('#tags').hover(function(){
                $(this).stop(true, true).show()
            }, function(){
                $(this).stop(true, true).delay(250).fadeOut()
            })
});

(function ($) {
	$.fn.delay = function(time, callback){
	    jQuery.fx.step.delay = function(){};
	    return this.animate({delay:1}, time, callback);
	}
})(jQuery)

