            $(function() {
                var d=1000;
                $('#menu span').each(function(){
                    $(this).stop().animate({
                        'top':'-40px'
                    },d+=250);
                });

                $('#menu > li').hover(
                function () {
                    var $this = $(this);
                    $('a',$this).addClass('hover');
                    $('span',$this).stop().animate({'top':'-80px'},300).css({'zIndex':'-1'});
                },
                function () {
                    var $this = $(this);
                    $('a',$this).removeClass('hover');
                    $('span',$this).stop().animate({'top':'-40px'},800).css({'zIndex':'-1'});
                }
            );
            });





            $(function() {

		$('#sidemenu li').hover(
		function(){
			$('a:not(:animated)',this).animate({
				marginRight :'10px'
			},'fast','swing');
		},function(){
			$('a',this).animate({
				marginRight :'0px'
			},'fast','swing');
		});


            });



	$(function () {
	    if (! $.browser.safari) {
	        $('#link_to_top').click(function () {
	            $(this).blur();

	            $('html,body').animate({ scrollTop: 0 }, 'slow');

	            return false;
	        });
	    }
	});




