var aktuelles_bild = null;
var stop_dimm = null;
$(document).ready(function(){
    var alt_tmp = "";
    $("#spalte1.b66o a").tooltip({track:true,delay:0,
        bodyHandler: function() {
            alt_tmp = $(this).children()[0].alt;
            if ($.browser.msie) { $(this).children()[0].alt = ""; }
            return alt_tmp;
        },fade: 250,showURL:false,top:20,left:-2
    });

    $("#spalte1.b66o img").mouseover(function() {
        //window.clearTimeout(stop_dimm);
        $("#tooltip").css({'backgroundColor':$(this).parent().next("div.legende").css('color')});
        $("div.legende").hide();
        $(this).removeClass("dimm").parent().next("div.legende").show();
        $("#spalte1.b66o img").not(this).addClass("dimm");
        aktuelles_bild = this;
        //stop_dimm = window.setTimeout("remove_dimm()", 3000);
    });

    $("#spalte1.b66o img").mouseout(function() {
    	remove_dimm();
    	//stop_dimm = window.setTimeout("remove_dimm()", 300);
    	this.alt = alt_tmp;
    });

    if (($.browser.msie && parseInt($.browser.version) < 8) || $.browser.opera) {
        $("div.legende").css("marginTop", "250px");
        $("div.z3").css("marginTop", "-60px");
        $("#spalte1.b66o img").mouseout(function() {
            this.alt = alt_tmp;
        });
    }
});

function remove_dimm() {
    if (aktuelles_bild != null) {
        $(aktuelles_bild).parent().next("div.legende").hide();
    }
    $("div.legende").hide();
    $("#spalte1.b66o img").removeClass("dimm");
}