
//id und id_block müssen aus Persistenzgründen global definiert sein
var id,id_block;
var w_h; //Höhe des Fensters
var active_layer;

$(document).ready(function(){
		
   // jQuery-Beispiele hier einfügen
   $("window").load=init();

 })

$(function()
			{
				// this initialises the demo scollpanes on the page.
				//$('#col1_content_breit').jScrollPane({scrollbarWidth:3});
				$('#scrollbereich').jScrollPane({scrollbarWidth:4,dragMaxHeight:10,showArrows:true});
				
			});
			
		
function my_Click(src){
	
	//im title-Attribut des a-Tags (=src) wird die Page-ID via Typoscript:ATagTitle übergeben 
	//Code wenn die Subseite ein direkter Link sein soll
	
	id='#'+src.getAttribute('title');
	//####################################################################	
	//Code f�r Download
	if($(id).attr('class')=='download'){
		//alert(id);
		//alert($(id).children().attr('href'));
		window.open($(id).children().attr('href'),"_blank");
		
		//alert(ziel);
	}
	//####################################################################
	pr_h=$(id).parent().parent().height();
	//alert(pr_h);
	h=$(id).height();
	//alert(h);
	if( $(id_block) != null){
		$(id_block).animate({top:pr_h},10);
	}
	
	
	cl=$(id).attr('class');
	//alert(cl);
	if(cl != "full"){
		$(id).css("top",pr_h);
		$(id).css("display","block");
		$(id).animate({top:pr_h - h},1000);
	}else{
		$(id).animate({top:0},1);
		$(id).css("display","block");
	}
	
	//$(id).css("z-index",1);
	
	id_block = id;
}

function text_layer_close(){
	$('#hidden_content > span').animate({top:pr_h},10);
}



function init(){
	  
	  
	  $('#hidden_content > #dl_dummy').css('display','none');
	  //  $('#col1_content_1').css('display','none');
	  $("#hidden_content > span").css("display","none");
	  $("#hidden_content").css("display","block");
	 // $("#col1_content_breit").addClass("jScrollPaneContainer jScrollPaneScrollable");
	 
	  $("#col1_4_content").css("overflow","hidden");
	  $("#col1_content_breit").css("overflow","hidden");
	  $("#col1_content_service").css("overflow","hidden");
	  $("#col1_content").css("overflow","hidden");
	//  $("#col3_3").css("overflow","auto");
	   
	  $('#scrollbereich').addClass("scroll-pane");	
	  $('#scrollbereich').css('overflow','hidden');
}



