jQ(document).ready(function() {	
	// Variablen
	var divAnsprechpartnerToggle = true;
	var divAnsprechpartnerDisplay = false;	
  
	jQ("div.toggle h2.mehr").click(function (e) {
		jQ(this).next("div.readmore").slideToggle();
		return false;
	}); 

       jQ("div.toggle div.close-readmore").click(function (e) {
		jQ(this).parent("div.readmore").slideToggle();
		return false;
	});
	
// ========= Beginn Ansprechpartner ================================================	
	
	jQ("div.ansprechpartner div.banner").click(function (e) {
		if(divAnsprechpartnerToggle != false) {
			if(!divAnsprechpartnerDisplay) {
				divAnsprechpartnerDisplay = true;	
					
                               jQ(this).parent().parent("div.divansprechpartner").animate({"width": "246px"}, 500);
				jQ(this).parent().next("div").animate({"right": "0px"}, 500);
			
			} else {
				divAnsprechpartnerDisplay = false;
                                jQ(this).parent().parent("div.divansprechpartner").animate({"width": "24px"}, 500);				
				jQ(this).parent().next("div").animate({"right": "-227px"}, 500);
			}
		} else {
			return true;
		}
		
		return false;
	});
	
	// ========= Beginn Podcast ================================================
	
		// Variablen	
	var divPodcastLinkButtonLeft = "-260px";	
	
	
	// Danke IE
	if(jQ.browser.msie && parseInt(jQ.browser.version) == 6) {
		var divPodcastButtonSmallWidth = "162px";
		var divPodcastButtonWidth = "330px";
		var divPodcastWidth = "330px";
		//var divPodcastHeight = "auto";
	}
	
	jQ("div.anhoeren").click(function() {

				jQ(this).animate({"left":divPodcastLinkButtonLeft}, 300);

	});
	
	// ========= Beginn Menü Toogle ================================================

		jQ("div#nav_sub span.leer").mouseover(function (e) {
			jQ(this).toggleClass("active");
		 }).mouseout(function(){
			jQ(this).toggleClass("active");
	}); 
	
		jQ("div#nav_sub span.leer").click(function (e) {
		jQ(this).toggleClass("open");
		jQ(this).next("ul").slideToggle();
		return false;
	}); 

	// ========= Beginn Events ================================================	
	
	jQ("tr.teaser_events").click(function (e) {
		jQ(this).next("tr.readmore_events").toggle();
		return false;
	}); 

/*	jQ("tr.teaser_events").click(function (e) {
                alert(jQ(this).next("tr.readmore_events"));
		jQ(this).next("tr.readmore_events").toggleClass("active");
		return false;
	}); 
*/
//      jQ("tr.readmore_events").click(function (e) {
//		jQ(this).toggleClass("active");
//		return false;
//	});	
	

	// ========= Beginn Q&A Popup-Box ================================================
     jQ("._lightwindow").click(function () {
        boxcontent = jQ("#floatbox").html();
        
        jQ.floatbox({

          ajax: { 
          url: relPathToFaqSwf // request url
          },

          //content:"",
          fade: true,
          boxConfig : {
            position : (jQ.browser.msie) ? "absolute" : "fixed",
            zIndex: 9,
            width: "950px",
            marginLeft: "-" + 500 + "px",
            height: "auto",
            top: "50%",
            left: "50%",
            backgroundColor: "#fff",
            display: "none"
          }
        });
      });

});	


