// default javascript file

	$(document).ready(function(){
	
		//Infobox
		$('.accordion> *').not("h2").hide();
		$('.accordion> h2').click(function() {

			$(".accordion h2").not($(this)).toggleClass("exp");
			$(this).toggleClass("exp");
			$(".accordion h2").not($(this)).toggleClass("exp");
			
			
			//erst mal werden alle Nachbarn davor des angeklickten h2s zugeklappt
			$(this).prevAll().not("h2").slideUp('fast');
			
			//Jetzt identifizieren wir alle nŠchsten nachbarn...
			var mysiblings = $(this).nextAll();
			var i = 0;
			while(i < mysiblings.length) {
			//bis zum ersten folgenden h2 und klappen diese in die umgekehrte Richtung	
				if (mysiblings[i].tagName == "H2") {
					$(mysiblings[i]).nextAll().not("h2").slideUp('fast');
					break;
					}
				//und klappten Sie aus
				$(mysiblings[i]).slideToggle('fast');
				i++
				}
			
			})

		$("dd").not($("#left,.news-dd")).hide(); /* #left ist der Contentbereich unter dem Menü */
		$("dt.act").next().slideDown("slow");
		
		$("dd#menu2 dt").not($("dt.menu-h1")).hide();
		
		/* ueber "dt.menu-h1-bb a" werden die unteren Links ausgeschlossen */		
		$("#menu1 dt a").not($("dt.menu-h1-bb a")).click(function(){
			$("dd:visible").not($("#left")).slideUp("slow");
			//$(this).parent().not(".act").next().slideDown("slow");
			$(this).parent().next().slideDown("slow");
			return false;
		});
		
		// wird über typo ein Frame zugewiesen,
		// wird bildern automatisch die imagebox-Kennung hinzugefügt
		$("#product a.download").attr("rel","imagebox-header");
		$("#product a.download").addClass("thickbox");
		//$("#contentarea .csc-frame-gallery a").attr("rel","imagebox-content");
		//$("#contentarea .csc-frame-gallery a").addClass("thickbox");
		$("a.gallery").attr("rel","imagebox-content");
		$("a.gallery").addClass("thickbox");
		$("a.popup").attr("rel","imagebox-content");
		$("a.popup").addClass("thickbox");
		
		// Newslticker
/*
		var options = {
			newsList: "#news",
			startDelay: 15,
			placeHolder1: ""
			}
		$().newsTicker(options);
*/
	});
