$('document').ready(function() {
	$('#menu li.l1').mouseenter(function() {
		$(this).addClass('active');
		var flashvars = null;
		var params = null;
		var attributes = null;
		var playerWidth = 174;
		var playerHeight = 138;
		var animationFile = $(this).attr('longdesc');
		if(typeof(animationFile) != 'undefined' && animationFile != '') {
			$(this).find('a:first').append('<div id="animation-wrap"><div id="animation"><\/div><\/div>');
			swfobject.embedSWF('uploads/media/'+animationFile, 'animation', playerWidth, playerHeight, '9.0.0', '../images/menuebild.png', flashvars, params, attributes);
		}
		$(this).find('li.l2:first').addClass('firstactive');
		$(this).find('li.l2.first .info').addClass('showme');
	});
	
	$('#menu li.l1').mouseleave(function() {
		$(this).removeClass('active');
		$(this).find('#animation-wrap').remove();
		$(this).find('li.l2:first').removeClass('firstactive');
		$(this).find('li.l2.first .info').removeClass('showme');
	});
	
	$('#menu li.l2').mouseenter(function() {
		$('#menu li.l2').removeClass('firstactive');
		$('#menu li.l2 .info').removeClass('showme');
		$(this).find('.info').addClass('showme');
	});
	
	$('#menu li.l2').mouseleave(function() {
		$(this).find('.info').removeClass('showme');	
	});
});

function slideSwitch() {
	var $active = $('#header-slideshow IMG.active');
	if ( $active.length == 0 ) $active = $('#header-slideshow IMG:last');
	var $next =  $active.next().length ? $active.next()
		: $('#header-slideshow IMG:first');
	$active.addClass('last-active');
	$next.css({opacity: 0.0})
	.addClass('active')
	.animate({opacity: 1.0}, 1000, function() {
		$active.removeClass('active last-active');
	});
}
$(function() {
	setInterval( "slideSwitch()", 3000 );
});

$(function() {
	$(".newsticker-jcarousellite-de").jCarouselLite({
		vertical: true,
		hoverPause:false,
		visible: 1,
		auto:4000, // Sekunden Pause
		hoverPause: true,
		speed:600 // Geschwindigkeit
	});
});

$(function() {
	$(".newsticker-jcarousellite-en").jCarouselLite({
		vertical: true,
		hoverPause:false,
		visible: 1,
		auto:4000, // Sekunden Pause
		hoverPause: true,
		speed:600 // Geschwindigkeit
	});
	
});


/* default typo3 js */
var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);var version="";var msie4=(browserName=="Microsoft Internet Explorer"&&browserVer>=4);if((browserName=="Netscape"&&browserVer>=3)||msie4||browserName=="Konqueror"||browserName=="Opera"){version="n3";}else{version="n2";}
function blurLink(theObject){if(msie4){theObject.blur();}}
function decryptCharcode(n,start,end,offset){n=n+offset;if(offset>0&&n>end){n=start+(n-end-1);}else if(offset<0&&n<start){n=end-(start-n-1);}
return String.fromCharCode(n);}
function decryptString(enc,offset){var dec="";var len=enc.length;for(var i=0;i<len;i++){var n=enc.charCodeAt(i);if(n>=0x2B&&n<=0x3A){dec+=decryptCharcode(n,0x2B,0x3A,offset);}else if(n>=0x40&&n<=0x5A){dec+=decryptCharcode(n,0x40,0x5A,offset);}else if(n>=0x61&&n<=0x7A){dec+=decryptCharcode(n,0x61,0x7A,offset);}else{dec+=enc.charAt(i);}}
return dec;}
function linkTo_UnCryptMailto(s){location.href=decryptString(s,-1);}

/* ie6reminder */
var $buoop = {reminder:24} 
$buoop.ol = window.onload; 
window.onload=function(){ 
 var e = document.createElement("script"); 
 e.setAttribute("type", "text/javascript"); 
 e.setAttribute("src", "http://browser-update.org/update.js"); 
 document.body.appendChild(e); 
 if ($buoop.ol) $buoop.ol(); 
} 

/* =slider-ticker */

