function closediv(divtoclose) { 
    
                new Fx.Tween($(divtoclose), {
                    property: 'opacity',
                    duration: 80
                }).start(1, 0).chain(function(){
                    $(divtoclose).setStyle('display', 'none')
                    });
                    
                if(divtoclose=='step1_container') $('step1').removeClass('active');
                if(divtoclose=='step2_container') $('step2').removeClass('active');
}

function opendiv(divtoopen) {
    
            if ($(divtoopen).getStyle('display')=='none') {
            
                $(divtoopen).set('opacity', 0);
                $(divtoopen).setStyle('display', 'block');
			
                new Fx.Tween($(divtoopen), {
                    property: 'opacity',
                    duration: 800
                }).start(0, 1);
                
            }
}

function hidediv(divtoclose) {
            $(divtoclose).setStyle('display', 'none');
}

function showdiv(divtoopen) {
            $(divtoopen).setStyle('display', 'block');
}



//if(typeof addEvent == 'function') { 

window.addEvent('domready', function() {

	if ($('accordion')) {
    	var myAccordion = new Accordion($('accordion'), 'div.toggle', 'div.element', {
    	    //display: -1,
    		opacity: false,
    		onActive: function(toggler, element){
    			toggler.addClass('active');
    			if(Browser.Engine.trident) element.getElement('div').show();
    		},
    		onBackground: function(toggler, element){
    			toggler.removeClass('active');
    			if(Browser.Engine.trident) element.getElement('div').hide();
    		}
    	});
	}
	
	
	
	
    if ($('diskurs').hasClass('active')==false) {
    
        $('diskurs').addEvent('mouseover', function(event){
            $('diskurs').tween('background-color', '#E5CA92');
            if ($$('.start')==false) $('diskurs_li').tween('border-right', '1px solid #ffffff');
            //alert($$('div.start'));
        });
        $('diskurs').addEvent('mouseout', function(event){
            $('diskurs').tween('background-color', '#ffffff');
            if ($('initiative').hasClass('active')==false) $('diskurs_li').tween('border-color', '#E5CA92');
        });
    }
        
    if ($('initiative').hasClass('active')==false) {
        
        $('initiative').addEvent('mouseover', function(event){
            $('initiative').tween('background-color', '#E5CA92');
            if ($$('.start')==false) $('diskurs_li').tween('border-right', '1px solid #ffffff');
            $('initiative_li').tween('border-color', '#ffffff');
        });
        $('initiative').addEvent('mouseout', function(event){
            $('initiative').tween('background-color', '#ffffff');
            if ($('stolpersteine').hasClass('active')==false) $('initiative_li').tween('border-color', '#E5CA92');
            if ($('diskurs').hasClass('active')==false) $('diskurs_li').tween('border-color', '#E5CA92'); 
        });        
    }
        
    if ($('stolpersteine').hasClass('active')==false) {
        
        $('stolpersteine').addEvent('mouseover', function(event){
            $('stolpersteine').tween('background-color', '#E5CA92');
            $('stolpersteine_li').tween('border-color', '#ffffff');
            $('initiative_li').tween('border-color', '#ffffff');
        });
        $('stolpersteine').addEvent('mouseout', function(event){
            $('stolpersteine').tween('background-color', '#ffffff');
            if ($('kontakt').hasClass('active')==false) $('stolpersteine_li').tween('border-color', '#E5CA92');
            if ($('initiative').hasClass('active')==false) $('initiative_li').tween('border-color', '#E5CA92');            
        });
    }          
     
        
    if ($('kontakt').hasClass('active')==false) {
        
        $('kontakt').addEvent('mouseover', function(event){
            $('kontakt').tween('background-color', '#E5CA92');
            $('kontakt_li').tween('border-color', '#ffffff');
            $('stolpersteine_li').tween('border-color', '#ffffff');
        });
        $('kontakt').addEvent('mouseout', function(event){
            $('kontakt').tween('background-color', '#ffffff');
            $('kontakt_li').tween('border-color', '#E5CA92');
            if ($('stolpersteine').hasClass('active')==false) $('stolpersteine_li').tween('border-color', '#E5CA92');
        });        
	}
	
	
	
	
	
	if ($('diskurs').hasClass('active')) {
    
            $('diskurs_li').tween('border-color', '#ffffff');
    }
        
    if ($('initiative').hasClass('active')) {
        
            $('diskurs_li').tween('border-right', '1px solid #ffffff');
            $('initiative_li').tween('border-color', '#ffffff');
    }
        
    if ($('stolpersteine').hasClass('active')) {
        
            $('stolpersteine_li').tween('border-color', '#ffffff');
            $('initiative_li').tween('border-color', '#ffffff');
    }          
     
        
    if ($('kontakt').hasClass('active')) {
        
            $('kontakt_li').tween('border-color', '#ffffff');
            $('stolpersteine_li').tween('border-color', '#ffffff');
	}
	
});

//}

