function clickButton() {
	var dropDown = jQuery("#main1");
	dropDown.next().slideToggle('slow');
}
jQuery(document).ready(function(){
	/* This code is executed after the DOM has been completely loaded */

	/* Changing thedefault easing effect - will affect the slideUp/slideDown methods: */
	jQuery.easing.def = "easeOutBounce";

	/* Binding a click event handler to the links: */
	jQuery('li.button a').click(function(e){

		/* Finding the drop down list that corresponds to the current section: */
		var dropDown = jQuery(this).parent().next();

		/* Closing all other drop down sections, except the current one */
		jQuery('.dropdown').not(dropDown).slideUp('slow');
		dropDown.slideToggle('slow');

		/* Preventing the default event (which would be to navigate the browser to the link's address) */
		e.preventDefault();
	});

	jQuery("#home").click(function(event)
	{
		switchToContent2("#igang_content");
		event.preventDefault();
		runSlides();
	});
	jQuery("#kurzprofil").click(function(event)
	{
		switchToContent2("#kurzprofil_content");
		event.preventDefault();
	});
	jQuery("#historie").click(function(event)
	{
		switchToContent2("#historie_content");
		event.preventDefault();
	});
	jQuery("#stellefant").click(function(event)
	{
		switchToContent2("#stellefant_content");
		event.preventDefault();
	});
	jQuery("#termine").click(function(event)
	{
		switchToContent2("#termine_content");
		event.preventDefault();
	});
	jQuery("#events").click(function(event)
	{
		switchToContent2("#events_content");
		event.preventDefault();
	});
	jQuery("#videos").click(function(event)
	{
		switchToContent2("#videos_content");
		event.preventDefault();
	});
	jQuery("#audio").click(function(event)
	{
		switchToContent2("#audio_content");
		event.preventDefault();
	});
	jQuery("#sponsoren").click(function(event)
	{
		switchToContent2("#sponsoren_content");
		event.preventDefault();
	});
	jQuery("#weblinks").click(function(event)
	{
		switchToContent2("#weblinks_content");
		event.preventDefault();
	});
	jQuery("#kontakt").click(function(event)
	{
		switchToContent2("#kontakt_content");
		event.preventDefault();
	});
	jQuery("#impressum").click(function(event)
	{
		switchToContent2("#impressum_content");
		event.preventDefault();
	});
	jQuery("#symposium").click(function(event)
	{
		switchToContent2("#symposium_content");
		event.preventDefault();
	});
	jQuery("#symposium2").click(function(event)
	{
		switchToContent2("#symposium_content");
		//event.preventDefault();
	});

/*
	if (Modernizr.audio && Modernizr.audio.wav) {
		alert("mp3 available");
	} else {
		alert("mp3 not available");
	}
	if (Modernizr.canvas) {
		alert("canvas available");
	} else {
		alert("canvas not available");
	}
*/


	clickButton();
	switchToContent2("#igang_content");

	jQuery(function(){
	  jQuery.mb_videoEmbedder.defaults.width=500;
	  jQuery("#videos_content").mb_embedMovies();
	  jQuery("#audio_content").mb_embedAudio();
	});
});
function switchToContent2(id)
{
	jQuery("#resultElement").css("margin-left","0px");
	//$("#termine_content").css("margin-left","-2000px");
	jQuery("#resultElement").slideUp("slow", function()
	{
		//$("#the_content").text(id);
		jQuery("#resultElement").html(jQuery(id).html());
	});
	jQuery("#resultElement").slideDown("slow");
}
function runSlides()
{
	jQuery(function(){
		jQuery("#slides").slides(
			{
				play: 2500,
				generatePagination: false,
				slideSpeed: 800
			}
		);
	});
}




