//Tweening Variablen
var twUeberunsDefIn;
var twUeberUnsDefOut;
var twUeberUnsHovIn;
var twUeberUnsHovOut;

var twRechtsgebieteDefIn;
var twRechtsgebieteDefOut;
var twRechtsgebieteHovIn;
var twRechtsgebieteHovOut;

var twPruefungsrechtDefIn;
var twPruefungsrechtDefOut;
var twPruefungsrechtHovIn;
var twPruefungsrechtHovOut;

var twKontaktDefIn;
var twKontaktDefOut;
var twKontaktHovIn;
var twKontaktHovOut;

var tweenDefIn;
var tweenDefOut;
var tweenHovIn;
var tweenHovOut;






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


	initTweens();


  
});//end mootools load


function initTweens(){
	twUeberUnsDefIn = new Fx.Tween($('ueberUnsDef'),{duration: 700});	
	twUeberUnsDefOut = new Fx.Tween($('ueberUnsDef'),{duration: 450});
	twUeberUnsHovIn = new Fx.Tween($('ueberUnsHov'),{duration: 450});	
	twUeberUnsHovOut = new Fx.Tween($('ueberUnsHov'),{duration: 700});
	
	twRechtsgebieteDefIn = new Fx.Tween($('rechtsgebieteDef'),{duration: 700});
	twRechtsgebieteDefOut = new Fx.Tween($('rechtsgebieteDef'),{duration: 450});
	twRechtsgebieteHovIn = new Fx.Tween($('rechtsgebieteHov'),{duration: 450});
	twRechtsgebieteHovOut = new Fx.Tween($('rechtsgebieteHov'),{duration: 700});

	twPruefungsrechtDefIn = new Fx.Tween($('pruefungsrechtDef'),{duration: 450});
	twPruefungsrechtDefOut = new Fx.Tween($('pruefungsrechtDef'),{duration: 450});
	twPruefungsrechtHovIn = new Fx.Tween($('pruefungsrechtHov'),{duration: 450});
	twPruefungsrechtHovOut = new Fx.Tween($('pruefungsrechtHov'),{duration: 450});


	twKontaktDefIn = new Fx.Tween($('kontaktDef'),{duration: 700});
	twKontaktDefOut = new Fx.Tween($('kontaktDef'),{duration: 450});
	twKontaktHovIn = new Fx.Tween($('kontaktHov'),{duration: 450});
	twKontaktHovOut = new Fx.Tween($('kontaktHov'),{duration: 700});


}


function hide(divContainer){

	if(divContainer == $('faderUeberUns')){
		twUeberUnsHovIn.cancel();
		twUeberUnsDefOut.cancel();
		twUeberUnsHovOut.start('opacity', '0');
		twUeberUnsDefIn.start('opacity', '1');
	} else if(divContainer == $('faderRechtsgebiete')){
		twRechtsgebieteHovIn.cancel();
		twRechtsgebieteDefOut.cancel();
		twRechtsgebieteHovOut.start('opacity', '0');
		twRechtsgebieteDefIn.start('opacity', '1');
	} else if(divContainer == $('faderPruefungsrecht')){
		twPruefungsrechtHovIn.cancel();
		twPruefungsrechtDefOut.cancel();
		twPruefungsrechtHovOut.start('opacity', '0');
		twPruefungsrechtDefIn.start('opacity', '1');
	}  else if(divContainer == $('faderKontakt')){
		twKontaktHovIn.cancel();
		twKontaktDefOut.cancel();
		twKontaktHovOut.start('opacity', '0');
		twKontaktDefIn.start('opacity', '1');	
	}

	
}


function show(divContainer){

	
	if(divContainer == $('faderUeberUns')){
		twUeberUnsHovOut.cancel();
		twUeberUnsDefIn.cancel();
		twUeberUnsHovIn.start('opacity', '1');
		twUeberUnsDefOut.start('opacity', '0');
	} else if(divContainer == $('faderRechtsgebiete')){
		twRechtsgebieteHovOut.cancel();
		twRechtsgebieteDefIn.cancel();
		twRechtsgebieteHovIn.start('opacity', '1');
		twRechtsgebieteDefOut.start('opacity', '0');
	} else if(divContainer == $('faderPruefungsrecht')){
		twPruefungsrechtHovOut.cancel();
		twPruefungsrechtDefIn.cancel();
		twPruefungsrechtHovIn.start('opacity', '1');
		twPruefungsrechtDefOut.start('opacity', '0');
	}  else if(divContainer == $('faderKontakt')){
		twKontaktHovOut.cancel();
		twKontaktDefIn.cancel();
		twKontaktHovIn.start('opacity', '1');
		twKontaktDefOut.start('opacity', '0');	}

}



