

$(document).ready(function() {
    $(".menuoverstate").each(function(i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".jpg", "_o.jpg");

        $(this).hover(
            function() {
                if (this.src.indexOf("_o.jpg") == -1) {
                    this.src = this.src.replace(".jpg", "_o.jpg");
                }

            },

            function() {
                this.src = this.src.replace("_o.jpg", ".jpg");

            });

    }
        );
});

jQuery(document).ready(function() {
    jQuery(".tooltip").hide();
    jQuery(".loadtooltip").mouseover(function() {

        jQuery(this).parent().next(".tooltip").fadeIn(400);
        var pos = jQuery(this).position();
        jQuery(this).parent().next(".tooltip").css("left", pos.left + 90).css("top", pos.top - 81);
    });

    jQuery(".tooltip").mouseleave(function() {
        jQuery(this).fadeOut(400);
    });

    jQuery(".loadtooltip").mouseleave(function() {
    jQuery(this).parent().next(".tooltip").fadeOut(400);
    });

});
    
