	// initialize
	Event.observe(window,'load',function(){
//Google Analytics Downloads & External Links
	
	$$('a').each(function(inItem){
		if (inItem.href.substr(0,9) == 'mailto://'){
			Event.observe(inItem, 'click', function(){
				var theHref = $(this).readAttribute('href');
				pageTracker._trackPageview('/mailto/'+theHref);
			});
		}
		
		if ($(inItem).hasClassName('download') ||
		    $(inItem).hasClassName('download_button') ||
		    $(inItem).hasClassName('download_link_mit_pfeil') ||
		    $(inItem).hasClassName('download_link_mit_kleinen_pfeil')){
			
			Event.observe(inItem, 'click', function(){
				var theHref = $(this).readAttribute('href');
				theHref = (theHref.substr(0,1) == '/' ? theHref : '/'+theHref);
				pageTracker._trackPageview('/download'+theHref);
			});
			
		}
	
		if ($(inItem).hasClassName('external_button') ||
		    $(inItem).hasClassName('external_link_mit_pfeil') ||
		    $(inItem).hasClassName('external_link_mit_kleinen_pfeil')){

			Event.observe(inItem, 'click', function(){
				var theHref = $(this).readAttribute('href');
				pageTracker._trackPageview('/outgoing/'+theHref);
			});
		}

	
	});
	
	$$('dl.news-single-files').each(function(inItem){
		Event.observe(inItem.down('a'), 'click', function(){
			var theHref = $(this).readAttribute('href');
			theHref = (theHref.substr(0,1) == '/' ? theHref : '/'+theHref);
			pageTracker._trackPageview('/download'+theHref);
		});
	});
	
		

	
		
		var timer = null;
		$$('.submenu').each(function(item){
			
			if (item.parentNode.offsetWidth > item.getWidth()){
				item.style.width = (item.parentNode.offsetWidth+10) + 'px';
			}
	item.parentNode.onmouseover = item.parentNode.firstChild.onmouseover;
	  item.parentNode.firstChild.onmouseover = null;
	  item.parentNode.onmouseout = item.parentNode.firstChild.onmouseout;
	  item.parentNode.firstChild.onmouseout = null;		
	  
			Event.observe(item.parentNode,'mouseover',function(){
				var theParentNodeChild = $(item.parentNode.firstChild);
				var theParentHref = theParentNodeChild.readAttribute('href');
				
				if ($(item).down('li').readAttribute('id') != theParentHref && theParentHref.indexOf('void(') < 1){
				
					var theParentData = theParentNodeChild.firstChild.data;
					var theLi = new Element('li', {id:theParentHref }).update('<a href="'+theParentHref+'">'+theParentData+'</a>');
					$(item).insert({top:theLi});
				}
				Element.show(item);
				theParentNodeChild.addClassName('r_active');	
				$$('.submenu').each(function(other){
					if(item != other){
						Element.hide(other);
					}
				});
			},false);
		});
		Event.observe($$('.linksBottom')[0],'mouseout',function(){
			$$('.submenu').each(function(item){
				var theParentNodeChild = $(item.parentNode.firstChild);
				theParentNodeChild.removeClassName ('r_active');
				Element.hide(item);
			});
		},false);
},false);