jQuery(document).ready(function()
{	
	jQuery('.abteilungen-balken:first').each(function() {
		jQuery(this).next().css('display', 'block');
		jQuery(this).removeClass("passiv").addClass("aktiv");
	});
	
	jQuery('.abteilungen-balken').each(function() {		
		jQuery(this).mouseover(function() {			
			jQuery(this).css("cursor","pointer");					
		});	
		
		jQuery(this).click(function() {
			if(jQuery(this).hasClass('passiv'))
			{
				jQuery(this).next().slideDown('slow');
				jQuery(this).removeClass("passiv").addClass("aktiv");
			}
			else
			{
				jQuery(this).next().slideUp('slow', function() {
					jQuery(this).prev().removeClass("aktiv").addClass("passiv");
				});
			}
		});			
	});
	
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		jQuery('a.iframe').fancybox({
			'width'			:	600,
			'height'		:	190,
			'autoScale'		:	false, 
			'transitionIn'	:	'none', 
			'transitionOut'	:	'none',
			'type'			:	'iframe',
			'scrolling'		:	'no',
			'overlayShow'	:	true
		});
	}
	else
	{	
		jQuery('a.iframe').fancybox({
			'width'			:	600,
			'height'		:	190,
			'autoScale'		:	false, 
			'transitionIn'	:	'none', 
			'transitionOut'	:	'none',
			'type'			:	'iframe',
			'scrolling'		:	'no',
			'overlayShow'	:	false
		});
	}

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		jQuery('a.iframesmall').fancybox({
			'width'			:	250,
			'height'		:	190,
			'autoScale'		:	false, 
			'transitionIn'	:	'none', 
			'transitionOut'	:	'none',
			'type'			:	'iframe',
			'scrolling'		:	'no',
			'overlayShow'	:	true
		});
	}
	else
	{	
		jQuery('a.iframesmall').fancybox({
			'width'			:	250,
			'height'		:	190,
			'autoScale'		:	false, 
			'transitionIn'	:	'none', 
			'transitionOut'	:	'none',
			'type'			:	'iframe',
			'scrolling'		:	'no',
			'overlayShow'	:	false
		});
	}
	
	//jQuery('#fancybox-outer').before('<div class="schattenobenlinks"></div><div class="schattenoben"></div><div class="schattenobenrechts"></div>');
	
	jQuery('.downloadinfofile').click(function(){
		myFile =  jQuery(this).attr('title');
		//alert(myFile);
		myWin = window.open(myFile, "_blank","width=600, height=800, left=100, top=100");
		//myWin.focus();
		return(false);
	});
	jQuery('.downloadinfofile').trigger('click');
	
});

