var $j = jQuery.noConflict();

$j(document).ready(function() {


  $j('div.faq_q a').click(function(e){
    e.preventDefault();

    var $janswer = $j(this).parent().next();
    
    if($j($janswer).is(":hidden"))
    {
      //wenn Click eine Box oeffnen soll, alle vorher offenen Boxen schlie�en lassen
      $j('div.faq_a').not(":hidden").slideToggle('fast');
    }
    
    $j($janswer).slideToggle('fast');
  });
  
    heightbg();
  
  
    

});


function heightbg () {

var max_height_contenttext = 0;
    
    $j('#middle').each(function(e) {
         
        var h = $j(this).height();
        
      
      
        if(typeof(h) != "undefined") {
            if(h > max_height_contenttext) {
                max_height_contenttext = h;
                    
            }
        }
    });
    var objecth = $j('#middle object').height();
    if (objecth > 0) {
        max_height_contenttext = max_height_contenttext + objecth;  
    }
  
    if(max_height_contenttext > 0) {
        $j('#right').height(max_height_contenttext);
        if($j('#right div.csc-default div.csc-textpic div.csc-textpic-single-image img').height() > 0){
            $j('#right').css("background","url('fileadmin/template/images/hg_rm.jpg') repeat-y scroll right top transparent");
        }
    }

}

