 $(document).ready(function() {
						
	var $trigger		= $('div#main-nav  ul li');
	var $oe_menu        = $('#oe-menu');
	var $oe_overlay     = $('#oe-overlay');
	var $oe_menu_items  = $oe_menu.children('li');
		
	$trigger.hover(function() {

		$('ul', this).stop(true, true).show();
		$(this).addClass('selected');
		
	}, function() {

		$('ul', this).stop(true, true).hide();
		$(this).removeClass('selected');
	});

	$oe_menu.bind('mouseenter',function(){
		$oe_overlay.stop(true,true).show().fadeTo(200, 0.6);
	}).bind('mouseleave',function(){

		$oe_overlay.stop(true,true).fadeTo(200, 0, function(){ $oe_overlay.hide(); } );
	})

	
	/*
	// seminars select boxes

	$.viewMap = {
		'0' : $([]),
		'Gas 1' : $('#powermaildiv_uid135'),
		'Gas 2' : $('#powermaildiv_uid136'),
		'Gas 3' : $('#powermaildiv_uid137'),
		'Gas 4' : $('#powermaildiv_uid138'),
		'Training Geraete Gas' : $('#powermaildiv_uid139'),
		'Leitungsortung' : $('#powermaildiv_uid140'),
		'Wasser 1' : $('#powermaildiv_uid141'),
		'Wasser 2' : $('#powermaildiv_uid142'),
		'Wasser 3' : $('#powermaildiv_uid143'),
		'Wasser 4' : $('#powermaildiv_uid144'),
		'Schulung nach G 465-4' : $('#powermaildiv_uid145'),
		'Geraeteschulung vor Ort' : $('#powermaildiv_uid146')
	};

	$('#uid134').change(function() {
		// hide all
		$.each($.viewMap, function() { this.hide(); });
		// show current
		$.viewMap[$(this).val()].show();
	});

	$.viewMap2 = {
		'0' : $([]),
		'Gas 1' : $('#powermaildiv_uid64'),
		'Gas 2' : $('#powermaildiv_uid65'),
		'Gas 3' : $('#powermaildiv_uid66'),
		'Gas 4' : $('#powermaildiv_uid67'),
		'Training Geraete Gas' : $('#powermaildiv_uid68'),
		'Leitungsortung' : $('#powermaildiv_uid69'),
		'Wasser 1' : $('#powermaildiv_uid70'),
		'Wasser 2' : $('#powermaildiv_uid71'),
		'Wasser 3' : $('#powermaildiv_uid72'),
		'Wasser 4' : $('#powermaildiv_uid73'),
		'Schulung nach G 465-4' : $('#powermaildiv_uid74'),
		'Geraeteschulung vor Ort' : $('#powermaildiv_uid75')
	};

	$('#uid46').change(function() {
		// hide all
		$.each($.viewMap2, function() { this.hide(); });
		// show current
		$.viewMap2[$(this).val()].show();
	});


	// weitere Teilnehmer

	$('#powermaildiv_uid147 input').click(function(){
		$('#powermaildiv_uid131, #powermaildiv_uid132, #powermaildiv_uid133').show();
		$(this).hide();
	});
	*/

	// Floating Bug Seminare
	$('div.content-seminar-left > div.csc-default').each(function(k,v) {
		   if ((k + 1) % 4 == 0) {
				  $(v).after('<div style="clear:left" />');
		   }     
	});
	

	/*********************************************************/
	/** Seminare JS											 */
	/*********************************************************/
	

	$('.seminar_termin').hide();
	$('.seminar_termin_selector select').change(function(i, el) {
		var index = $(this).attr('selectedIndex');

		//First index is nothing
		if(index == 0) {
			$('.seminar_termin select').each(function(i, el) {
				$(el).find('option:selected').attr('selected', false);
				$(this).parent().hide();
			});
		} 
		else {
			$('.seminar_termin select').each(function(i, el) {
				if(i+1 == index) $(this).parent().show();
				else {
					$(el).find('option:selected').attr('selected', false);
					$(el).parent().hide();
				}
			});
		}
	});
	
	$('.seminar_more_participants').hide();
	$('.seminar_more_participants_button').click(function() {
		$('.seminar_more_participants').show();
		$(this).hide();
	});
	

	// document ready END
 });
 
 
