$(document).ready(function() {
 
	//ACCORDION BUTTON ACTION	
	$('#accordion a.btn').click(function() {
		/*
		$('div.accordion_container').slideUp('normal');	
		$(this).next().slideDown('normal');
		*/
		// Abgeändert, dass man das Accordion auh wieder zu schieben kann. mse
		if((!jQuery.browser.msie) || (jQuery.browser.version*1>6)) // Nur Aktion, wenn kein MSIE6
			{
			$('div.accordion_container').slideUp('normal');	
			if($(this).hasClass('opened')) 
				{
				$(this).removeClass('opened');
				}
			else	
				{
				$('a.btn').removeClass('opened');
				$(this).addClass('opened');
				$(this).next().slideDown('normal');
				}
			}
	});
 
	//HIDE THE DIVS ON PAGE LOAD	
	if((!jQuery.browser.msie) || (jQuery.browser.version*1>6)) // Nur schließen, wenn kein MSIE6
		$("div.accordion_container").hide();
		
		$("a.lasche").click(function(){
				borderMap = 50;
				if($(this).hasClass('closed')) 
					{
					widthMap = 690;
					timeMap = 0;
					$(this).removeClass('closed');
					$(this).addClass('opened');
					$(this).css({backgroundPosition: "right"});
					$('#contentBlock h1').animate({opacity: "0.3"});
					$('#contentBlock p').animate({opacity: "0.3"});
					$('#contentBlock li.email').animate({opacity: "0.3"});
					}
				else	
					{
					widthMap = 320;
					timeMap = 500;
					$(this).removeClass('opened');
					$(this).addClass('closed');
					$(this).css({backgroundPosition: "left"});
					$('#contentBlock h1').animate({opacity: "1"});
					$('#contentBlock p').animate({opacity: "1"});
					$('#contentBlock li.email').animate({opacity: "1"});
					}
				
				$("#overlayMap").animate({width: widthMap + "px"}, 500);
				$("#overlayMap .map").animate({width: widthMap + "px"}, timeMap);
				$("#overlayMap .tr").animate({width: (widthMap-borderMap) + "px"}, timeMap);
				
		});

	// Text rollo/slider
	$("#overlayRollo a.rollo").click(function(){
		$(this).blur();
		if($(this).hasClass('closed')) 
			{
			$(this).removeClass('closed');
			$(this).addClass('opened');
			$(this).prev().slideDown('normal');
			}
		else	
			{
			$(this).removeClass('opened');
			$(this).addClass('closed');
			$(this).prev().slideUp('normal');
			}
		return false;
		});

});

