$(document).ready(function() {


	var link0 = $("#anchor0 .morelink").attr("href");
	$("#anchor0").click(function(){
		window.open(link0, "_self");
	});
	
	var link1 = $("#anchor1 .morelink").attr("href");
	$("#anchor1").click(function(){
		window.open(link1, "_self");
	});
	
	var link2 = $("#anchor2 .morelink").attr("href");
	$("#anchor2").click(function(){
		window.open(link2, "_self");
	});
	
	var link3 = $("#anchor3 .morelink").attr("href");
	$("#anchor3").click(function(){
		window.open(link3, "_self");
	});
	
	var link4 = $("#anchor4 .morelink").attr("href");
	$("#anchor4").click(function(){
		window.open(link4, "_self");
	});
	
	var link5 = $("#anchor5 .morelink").attr("href");
	$("#anchor5").click(function(){
		window.open(link5, "_self");
	});
	
	var link6 = $("#anchor6 .morelink").attr("href");
	$("#anchor6").click(function(){
		window.open(link6, "_self");
	});
	
	var link7 = $("#anchor7 .morelink").attr("href");
	$("#anchor7").click(function(){
		window.open(link7, "_self");
	});
	
	var link8 = $("#anchor8 .morelink").attr("href");
	$("#anchor8").click(function(){
		window.open(link8, "_self");
	});
	
	var link9 = $("#anchor9 .morelink").attr("href");
	$("#anchor9").click(function(){
		window.open(link9, "_self");
	});
	
	var link10= $("#anchor10 .morelink").attr("href");
	$("#anchor10").click(function(){
		window.open(link10, "_self");
	});
	
	var link11= $("#anchor11 .morelink").attr("href");
	$("#anchor11").click(function(){
		window.open(link11, "_self");
	});
	
	var link12= $("#anchor12 .morelink").attr("href");
	$("#anchor12").click(function(){
		window.open(link12, "_self");
	});
	
	//console.log(link0);
	
	$(".ce_slider_item").hover(function() {
		$(this).find('.link').css({'z-index' : '12', 'display' : 'block'});
		$(this).find('.description').css({'z-index' : '12', 'display' : 'block'});
		$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/ 
		$(this).find('.image').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				marginTop: '-150px', /* The next 4 lines will vertically align this image */ 
				marginLeft: '-150px',
				top: '50%',
				left: '50%',
				width: '284px', /* Set new width */
				height: '284px' /* Set new height */
			}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */
		$(this).find('img').stop()
			.animate({
				marginTop: '50px',
				marginLeft: '40px',
				top: '50%',
				left: '50%',
				width: '204px',
				height: '204px'
			}, 200);
			
			

		} , function() {
		$(this).find('.link').css({'z-index' : '0', 'display' : 'none'});
		$(this).find('.description').css({'z-index' : '0', 'display' : 'none'});
		$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
		$(this).find('.image').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				marginTop: '0', /* Set alignment back to default */
				marginLeft: '0',
				top: '0',
				left: '0',
				width: '194px', /* Set width back to default */
				height: '194px' /* Set height back to default */
			}, 400);
		$(this).find('img').stop()
			.animate({
				marginTop: '0',
				marginLeft: '0',
				top: '0',
				left: '0',
				width: '194px',
				height: '194px'
			}, 400);
	});



		
	var jQueryAccordion2Opts = {
		active:			false,
		collapsible:	true
	};

	$(".jQAccordion").accordion(jQueryAccordion2Opts);
	$(".jQAccordion2").accordion(jQueryAccordion2Opts);
	
	$(".mod_navigation.main ul.level_1").superfish({
		delay:       500,                             // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 
	});
	$(".mod_customnav.langSwitch ul.level_1").superfish({
		delay:       500,                             // one second delay on mouseout 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 
	});
	
	$('ul#startSliderLinks').innerfade({
						speed: 2000,
						timeout: 7000,
						type: 'sequence',
						containerheight: '320px'
					});
					
					
					
					
					
		var linkArray =  $(".intranet h1 a");
		jQuery.each(linkArray, function() {
			
			$("<div class='intranetWeiter'><a href='"+$(this).attr("href")+"'><img src='http://www.braehler.com/tl_files/images/ui/intranet_weiter.gif'></a></div>").appendTo($(this).parent().parent());
		});
		
		var linkArray =  $(".intranet2 h1 a");
		jQuery.each(linkArray, function() {
			
			$("<div class='intranetWeiter'><a href='"+$(this).attr("href")+"'><img src='http://www.braehler.com/tl_files/images/ui/intranet_weiter.gif'></a></div>").appendTo($(this).parent().parent());
		});
		
					
					
	
	




	
});




	

