function initCallbackFunction(carousel, state) {
	// Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });
    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });
	
    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

	
function load_facts_content() {
  if(jQuery('#facts_content_outer').hasClass('facts_loaded')){  }else{
	 // jQuery('#facts_content_outer').html('<p><img src="/fileadmin/templates/img/main/ajax-loader.gif" width="16" height="16" /></p>');
	  jQuery('#facts_content_outer').hide('fast', function(){
			 //jQuery('#facts_content_outer').load('fdg.htm');
			 jQuery('#facts_content_outer').addClass('facts_loaded');
	  });
  }
 	jQuery('#facts_button').toggleClass('on');
	jQuery('#facts_content_outer').slideToggle('slow');
}





function load_contact_content() {
	
  if(jQuery('#contact_content').hasClass('facts_loaded')){  }else{
	  jQuery('#contact_content').html('<p><img src="/fileadmin/templates/img/main/ajax-loader.gif" width="16" height="16" /></p>');
	  jQuery('#contact_content').hide('fast', function(){
		 
			 jQuery('#contact_content').load('/fileadmin/templates/inc/php/top_contact.php');
			 jQuery('#contact_content').addClass('facts_loaded');
		
	  });
  }
 	jQuery('#contact_button').toggleClass('on');
	jQuery('#contact_content').slideToggle('slow');
	jQuery('.tx-astcountdown-pi1').slideToggle('slow');
	jQuery('#boxex_anmeldung').slideToggle('slow');
	

jQuery( 'html, body' ).animate( { scrollTop: 0 }, 0 );
}


function getUrlVars() {
	var vars = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
		vars[key] = value;
	});
	return vars;
}

	


jQuery(function() {
		//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
		var contact_send = getUrlVars()["contact_send"];

	    
	    jQuery('a[href=#top]').click(function(){
	        jQuery('html, body').animate({scrollTop:0}, 'slow');
	        return false;
	    });
	 


if(jQuery('#facts_content').html()==null){ 

 jQuery('#footer_inner').addClass('hideit');
}

    setTimeout(function(){ 
 jQuery('#contact_content').load('/fileadmin/templates/inc/php/top_contact.php');
 jQuery('#contact_content').hide('fast');
 jQuery('#contact_content').addClass('facts_loaded');
 }, 1); 
	if(contact_send==1){
		 jQuery('#contact_content').hide('fast', function(){
			 jQuery('#contact_content').load('/fileadmin/templates/inc/php/top_contact.php?contact_send=1');
			 jQuery('#contact_content').addClass('facts_loaded'); 	load_contact_content();
	  });

	
	
	}
	jQuery('.menu').initMenu();

	jQuery('#facts_content_outer').hide(0);
	/*jQuery('#subnav').hoverAccordion();*/
	jQuery('#nav_level_1 ul li ul').css('opacity', '0');

	jQuery('#nav_level_1 ul li').hover(

		function () {
			//show submenu
			jQuery('ul', this).stop().fadeTo(1000, 1);
		}, 
		function () {
			//hide submenu
			jQuery('ul', this).stop().fadeTo(1000, 0);
		}
	);
	 /*  $("#reset").click(function () {
	  location.reload();
    });*/


    if ('#facts_content_outer'.length == 0) {
      jQuery("#facts_button").remove();
    }


/** Carousel deaktiviert
		jQuery('#mycarousel').jcarousel({
      wrap: 'circular',
      visible: 5,
      auto: 0,
      animation: 'slow',
      easing: 'linear',
      scroll: 5,
      start: 1,
      vertical: false,
	  rtl: 1,
      initCallback: initCallbackFunction
   });
/* END */


});


jQuery.fn.initMenu = function() {  
    return this.each(function(){
        var theMenu = jQuery(this).get(0);
        jQuery('.acitem', this).hide();
        jQuery('li.expand > .acitem', this).show();
        jQuery('li.expand > .acitem', this).prev().addClass('active');
        jQuery('li a', this).click(
            function(e) {
				// Erweiterung: Deaktivierung des Accordion-Effektes
				window.location.href = this.href;
                return false;
				// Erweiterung Ende
				e.stopImmediatePropagation();
                var theElement = jQuery(this).next();
             var parent = this.parentNode.parentNode;
                if(jQuery(parent).hasClass('noaccordion')) {
                    if(theElement[0] === undefined) {
                        window.location.href = this.href;
                    }
                    jQuery(theElement).slideToggle('normal', function() {
                        if (jQuery(this).is(':visible')) {
                            jQuery(this).prev().addClass('active');
                        }
                        else {
                            jQuery(this).prev().removeClass('active');
                        }    
                    });
                    return false;
                }
                else {
                    if(theElement.hasClass('acitem') && theElement.is(':visible')) {
                        if(jQuery(parent).hasClass('collapsible')) {
                            jQuery('.acitem:visible', parent).first().slideUp('normal', 
                            function() {
                                jQuery(this).prev().removeClass('active');
                            }
                        );
                        return false;  
                    }
                    return false;
                }
                if(theElement.hasClass('acitem') && !theElement.is(':visible')) {         
                    jQuery('.acitem:visible', parent).first().slideUp('normal', function() {
                        jQuery(this).prev().removeClass('active');
                    });
                    theElement.slideDown('normal', function() {
                        jQuery(this).prev().addClass('active');
                    });
                    return false;
                }
            }
        }
    );
});
};











<!--
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2008 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
function ControlVersion()
{
	var version;
	var axo;
	var e;
	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}
	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";
			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";
			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}
	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}
	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}
	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }
  document.write(str);
}
function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    
    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
// -->



var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var base64DecodeChars = new Array(
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
    -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
    -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);

function base64encode(str) {
    var out, i, len;
    var c1, c2, c3;
    len = str.length;
    i = 0;
    out = "";
    while(i < len){
            c1 = str.charCodeAt(i++) & 0xff;
            if(i == len){
            out += base64EncodeChars.charAt(c1 >> 2);
            out += base64EncodeChars.charAt((c1 & 0x3) << 4);
            out += "==";
            break;
            }
            c2 = str.charCodeAt(i++);
            if(i == len){
            out += base64EncodeChars.charAt(c1 >> 2);
            out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
            out += base64EncodeChars.charAt((c2 & 0xF) << 2);
            out += "=";
            break;
            }
            c3 = str.charCodeAt(i++);
            out += base64EncodeChars.charAt(c1 >> 2);
            out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
            out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
            out += base64EncodeChars.charAt(c3 & 0x3F);
    }
    return out;
}
function base64decode(str){
    var c1, c2, c3, c4;
    var i, len, out;
    len = str.length;
    i = 0;
    out = "";
    while(i < len){
        /* c1 */
            do{
                c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
            }while(i < len && c1 == -1);
            if(c1 == -1)
            break;
        /* c2 */
            do{
            c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
            }while(i < len && c2 == -1);
            if(c2 == -1)
            break;
            out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
        /* c3 */
            do{
            c3 = str.charCodeAt(i++) & 0xff;
            if(c3 == 61)
                    return out;
            c3 = base64DecodeChars[c3];
            }while(i < len && c3 == -1);
            if(c3 == -1)
              break;
            out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
        /* c4 */
            do{
            c4 = str.charCodeAt(i++) & 0xff;
            if(c4 == 61)
                    return out;
                c4 = base64DecodeChars[c4];
            }while(i < len && c4 == -1);
            if(c4 == -1)
            break;
            out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
    }
    return out;
}







