
$(window).load(function() {
//$(document).ready(function() {
   usingEffects();
   triggerPanel();
});

function triggerPanel() {
    //Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click
	$("p.trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("p.trigger").click(function(){
		$(this).next(".toggle_container").slideToggle("fast");
	});
}
function usingEffects() {
    /*
    * Allgemeine MenŸgestaltung
    **/
    $("#menu").addClass("menu");
    
    var t = $('#menu > li')
    $('ul', t).css('display', 'none');
    
    $('#menu > li').hover(
    	function() {
    		var t = $(this);
    		if(t.children('ul').length > 0)
    		{
	    		$('ul', t).css('display', 'block');
	    	}
    	},
    	function() {
    		var t = $(this);
    		if(t.children('ul').length > 0)
    		{
	    		$('ul', t).css('display', 'none');
	    	}
    	}
	)
	$('li ul li.current_page_item', '#menu-1').parent().parent().addClass('current_page_item');
}

function auswahl(select)
{
   switch(select.options[select.selectedIndex].value)
   {
       case "Produkte":
		document.getElementById('contact2-2-2').style.display = 'inline';
		document.getElementById('contact2-2-3').style.display = 'none';
           break;
       case "Dienstleistungen":
		document.getElementById('contact2-2-2').style.display = 'none';
		document.getElementById('contact2-2-3').style.display = 'inline';
           break;
       default:
		document.getElementById('contact2-2-2').style.display = 'none';
		document.getElementById('contact2-2-3').style.display = 'none';
           break;
   }
}


