﻿	/*
	/* Ansprechpartner Hover-Effekt der Bilder
	/*                         */	


/*	$(".hover-img").hide();
	$(".kontact-img").mouseover(function() { 
			$(this).children(".hover-img").show();
		});
		$(".kontact-img").mouseout(function() { 
			$(this).children(".hover-img").hide();
		});*/
		
$(document).ready(function() {
		/* MouseOver-Effekt der Bilder: */
		$(".hover_eff_img").mouseover(function() { 
			$(this).children(".kontakt-img").children('.org-img').hide();					   
			$(this).children(".kontakt-img").children(".hover-img").show();
		});
		$(".hover_eff_img").mouseout(function() { 
			$(this).children(".kontakt-img").children(".hover-img").hide();
			$(this).children(".kontakt-img").children('.org-img').show();
		});
		/*Bei Seitenaufruf alle Inhalte ausblenden  bis auf den ersten */
		$('h2.titel').css("cursor", "pointer");
		$('.inhalt').hide();
		
		$('#nr1').slideDown("slow", function() { 
			$(this).prev("h2").addClass('active');
		});
		
		/* Bei MouseOver Klasse vergeben für Schriftfarbe*/
		$('.titel').mouseover(function() { 
			$(this).addClass('hoverEff');
		});		
		$('.titel').mouseout(function() { 
			$(this).removeClass('hoverEff');
		});
		
		/*Akkordeon*/
		$('.titel').click( function() { 
			$(this).prev('h2').addClass('active');
			//ID vom aktuell geklickten speichern: 
			var aktuell = $(this).next().attr("id");
			$('.inhalt').each(function(){ 
				//Wenn das bereits geöffnete erneut geklickt wird, fährt es wieder ein: 
				if ($(this).attr("id") != aktuell && $(this).css("display") == "block"){
					$(this).slideUp("slow");
					$(this).prev('h2').removeClass('active');					
				}				 
			});
			
			$('#'+aktuell).slideToggle("slow"); 
			$('#'+aktuell).prev("h2").toggleClass('active');
			$(this).children(".kontakt-img").show();
			return false;
		});
});


