$(function() {
    $("#navigation li").removeClass("highlight").find("a#top").append('<span class="hover" />').each(function() {
        var a = $("> span.hover", this).css("opacity", 0);
        $(this).hover(function() {
            a.stop().fadeTo(300, 1)
        },
        function() {
            a.stop().fadeTo(600, 0)
        })
    });
    $("#head_images").find("a").removeClass("highlight").prepend('<span class="hover" />').each(function() {
        var a = $("> span.hover", this).css("opacity", 0);
        $(this).click(function() {
            var b = "#" + this.id + "_main";
            if ($(b).css("opacity") <= 0) {
                $("#main_image").find("img").fadeTo(300, 0)
            }
            $(b).fadeTo(500, 1)
        });
        $(this).hover(function() {
            a.stop().fadeTo(200, 1)
        },
        function() {
            a.stop().fadeTo(1000, 0)
        })
    })
});
jQuery.preloadImages = function() {
    for (var a = 0; a < arguments.length; a++) {
        jQuery("<img>").attr("src", arguments[a])
    }
};