$j(document).ready(function() {

    // deaktiviertes Contextmenü wieder aktivieren:
    // $j("div.content").attr('oncontextmenu', '');

    $j("#t_content").tabs({
        fx: {
            opacity: "toggle"
        }
    }).tabs("rotate", 6000, true);
    
    $j("#teaser_area").mouseover(
    function() {
        $j("#t_content").tabs("rotate", 0, true);
    });
    
    $j("#teaser_area").mouseout(
    function() {
        $j("#t_content").tabs("rotate", 6000, true);
    });
    
    subMenuPoints = $j('#teaser_area div div.t_section_wrapper div:not(.t_info)');
       
    subMenuPoints.mouseover(
    function(){
    	classnames = $j(this).attr('class');
	classnames = classnames.split(' ');
    	imgSelector = "img."+classnames[0]+"_image";
    	    	
    	if ($j(this).parent().find(imgSelector).size() == 1) {
    		$j(this).parent().find("img.t_default_image").hide();
    		$j(this).parent().find("p.t_default_text").hide();
    		$j(this).parent().find(imgSelector).show();
    	}
    	
    	/* Alle nicht gehoverten Buttons auf 30% Sichtbarkeit setzen */
    	$j('.'+classnames[1]).css('opacity', '.3');
    	$j('.'+classnames[0]).css('opacity', '1');
    	
    });
     
    subMenuPoints.mouseout(
    function(){
    	classnames = $j(this).attr('class');
    	classnames = classnames.split(' ');
    	
    	imgSelector = "img."+classnames[0]+"_image";
    	
    	if ($j(this).parent().find(imgSelector).size() == 1) {
    		$j(this).parent().find(imgSelector).hide();
    		$j(this).parent().find("img.t_default_image").show();
    		$j(this).parent().find("p.t_default_text").show();
    	}
    	
    	/* alte Opacity-Werte wiederherstellen */
    	$j('.'+classnames[1]).css('opacity', '');
    	
    });
});
