/* ////////////////////////////
SUBMENU Setup:

	Unter Module 
		> MenuName 
		>> Parameter 
		>>> Untermenüs immer Anzeigen
	"JA" einstellen!
//////////////////////////// */



$(function() {

	
/* //////////////////////////// 
	LOGIN BOX show
//////////////////////////// */
	$('.login_open').click(function(e){
		e.preventDefault();
		$('#login_box').animate({width: 'toggle'}, 'fast');	
	});

	/* hintergrund verändern */
	$('#login_box input[type=text], #login_box input[type=password]').change(function(){
		$(this).css('background', '#9e8b7a');	
	});

	/* wenn eingelogged */
	if($('#login_box form').hasClass('log')){
		$('.login_open').text('Logout')

	}
	
/* //////////////////////////// 
	SUBMENU dropdown
//////////////////////////// */


	$('#navi_main .parent .parent').removeClass('parent') //.css('background','blue')
	//$('#navi_main ul').hide();	
	$('#navi_main .parent').each(function(){
		var orgW = $(this).width();
		$(this).hover(function(){
			$(this).css('width', orgW).css('overflow', 'hidden');
			$(this).children().slideDown('fast');
		},function(){
			$('#navi_main .parent ul').slideUp('fast')
		});
	});
	
/* //////////////////////////// 
	NAVI_SIDE active hack
//////////////////////////// */
	
	$('#navi_side li').each(function(){
		$(this).click(function(){
			$(this).parent().children().removeClass('active')
			$(this).addClass('active');
		});
	});

/* //////////////////////////// 
	KALENDER TOOLTIP
//////////////////////////// */

	$('.jevtt_text').hide();
	$('.jevtt_title').hide();

	$('.hasjevtip').hover(function(){
			$(this).append('<div class="jev_tooltip">' + $(this).attr('title') + '</div>');
			$(this).attr('title','');
		}, function(){ 
			$(this).attr('title', $('.jev_tooltip').html())
			$('.jev_tooltip').remove();
			
		});
	});
