function initReferenz(){
	$("#main").find(".tableContent").each(function(){
		$(this).attr("value", $(this).height()+100);
		$(this).attr("height", $(this).height()+100);
		if ($(this).hasClass("benefitsTable")){
			$(this).hide();
		}
	});
	
	$(".printThisLink").click(function(){
		
		$("#col1").find(".referenceContainer").each(function(){
			$(this).addClass("doNotPrint");
		});
		$(this).parents(".referenceContainer:first").removeClass("doNotPrint");
		window.print();
		
		/*if(checkBrowserName('MSIE')){  
			
		}  	
		$(".reference").find("img").each(function(){
			var srcPath = $(this).attr("src");
			var absoluteSrcPath = "http://dev4.itao.de/"+srcPath;
			$(this).attr("src", absoluteSrcPath);
		});
		$("iframe").css("display", "none");
		
		$(this).parents(".reference:first").printElement(
        {
            overrideElementCSS:[
			'http://dev4.itao.de/printElement.css',
			{ href:'http://dev4.itao.de/printElement.css',media:'print'}]
        });*/
	});
	
	$(".openFacts").click(function(){
		//remove class "active"
		$(this).parents(".referenceNav:first").find("li").each(function(){
			$(this).removeClass("active");
		});
		//get the new active li
		$(this).parents("li").addClass("active");
		//set Vars
		//the now active Project-Table
		var $activeData = $(this).parents(".projectData:first");
		//the now active hidden-Content
		var $activeContent = $(this).parents(".hiddenContent:first");
		//the Difference of the Height of the Projecttable and the hiddenContent
		var addHeight = $activeData.find(".factsTable:first").attr("value") - $activeContent.attr("value");
		//raise the height of the hidden Content if the Projecttable is to big
		if(addHeight > 0){
			//store the original heigt in the height-Attribute
			$activeContent.attr("height", $activeContent.height());
			$activeContent.animate({height: '+='+addHeight+''}, {duration:300, complete:function(){
				//Store the new Height in the value-Attribute 
				//For the reopening-Prozess
				$activeContent.attr("value", $activeContent.height());
			} });
		}else{
			//Get the original height from the height-Attribute
			$activeContent.attr("value", $activeContent.attr("height"));
			//Animate to the original Height
			$activeContent.animate({height: $activeContent.attr("value")}, {duration:300});
		}
		$activeData.find(".referenceBenefits:first .tableContent").fadeOut(300, function(){
			//show Facts-Table
			$activeData.find(".factsTable").fadeIn(300);
		});
	});
	
	$(".openBenefits").click(function(){
		//hide all Tables 
		$(this).parents(".referenceNav:first").find("li").each(function(){
			$(this).removeClass("active");
		});
		//get the new active li
		$(this).parents("li").addClass("active");
		//set Vars
		//the now active Project-Table
		var $activeData = $(this).parents(".projectData:first");
		//the now active hidden-Content
		var $activeContent = $(this).parents(".hiddenContent:first");
		//the Difference of the Height of the Projecttable and the hiddenContent
		var addHeight = $activeData.find(".benefitsTable:first").attr("value") - $activeContent.attr("value");
		//raise the height of the hidden Content if the Projecttable is to big
		if(addHeight > 0){
			//store the original heigt in the height-Attribute
			$activeContent.attr("height", $activeContent.height());
			$activeContent.animate({height: '+='+addHeight+''}, {duration:300, complete:function(){
				//Store the new Height in the value-Attribute 
				//For the reopening-Prozess
				$activeContent.attr("value", $activeContent.height());
			} });
		}else{
			//Get the original height from the height-Attribute
			$activeContent.attr("value", $activeContent.attr("height"));
			//Animate to the original Height
			$activeContent.animate({height: $activeContent.attr("value")}, {duration:300});
		}
		$activeData.find(".referenceFacts:first .tableContent").fadeOut(300, function(){
			//show Benefits-Table
			$activeData.find(".benefitsTable").fadeIn(300);
		});
	});
}
function checkBrowserName(name){  
	var agent = navigator.userAgent.toLowerCase();  
	if (agent.indexOf(name.toLowerCase())>-1) {  
		return true;  
	}  
	return false;  
}  
