function    bookmark() {
    if (navigator.appName == 'Microsoft Internet Explorer') {
        window.external.AddFavorite(document.location.href, document.title);
    }
    else {
        window.sidebar.addPanel(document.title, document.location.href, '');
    }
}

$(document).ready(function() {
    var i = 0;
    $('#nav>li').each(function() {
        /*
        this.style.margin = 0;
        this.style.padding = 0;
        this.style.height = '25px';
        */
		$('#nav>:nth-child(3n+1)').addClass("red");
		$('#nav>:nth-child(3n+2)').addClass("yellow");
		$('#nav>:nth-child(3n)').addClass("green");
		
        var a = $(this).children('a');
        var text = a.text();

        a.text('');
        a.append(
            '<img src="/image/nav/' +
            i +
            '-trans.png" width="139" height="30" alt="' +
            text +
            '" />'
        );

        i += 1;
    });

    $('#nav>li').hover(
        function() {
			/*
            var img = $(this).find('img');
            var src = img.attr('src').replace('/image/nav/', '/image/nav/on/');
            img.attr('src', src);
			*/

            var ul = $(this).find('ul');
            ul.slideDown('fast');
            //ul.fadeIn(200);
        },
        function() {
			/*
            var img = $(this).find('img');
            var src = img.attr('src').replace('/image/nav/on/', '/image/nav/');
            img.attr('src', src);
			*/

            var ul = $(this).find('ul');
            ul.slideUp(300);
            //ul.fadeOut(400);
        }
    );
});

