function DetectWindowsize ()
{
    var fensterbreite;
     // Netscape-Methode
    if (window && window.innerWidth) {
        fensterbreite = window.innerWidth;
    // Internet-Explorer-Methode
    } else if (document && document.body && document.body.offsetWidth) {
        fensterbreite = document.body.offsetWidth;
    // Browser unterstützt das nicht
    }    
    
    // diese Breite nehmen
    // falls keine Breite gefunden wurde (gef_breite == -1)
    // wird automatisch die Defaultbreite genommen
    // (wg. -1 * 2 + 2 = 0)
 
	if (fensterbreite < 250) {
	var fensterbreite = 800;
		}
	document.write ('<h2>' + fensterbreite + '</h2>');
	var fensterbreite = fensterbreite - 200;





var ow = 0;

var oh = 0;

var s = fensterbreite;

var onload_blows = 0;
}

function scale(img)

{

    if (!onload_blows)

    scale_load(img);

                   

    i = document.getElementById(img);

    if (i.width > s) 

    {

          i.style.cursor = "pointer";

                   i.width = s;

          i.height = s / (ow / oh);      

    }

    else if (i.width == s)

    {

          i.width = ow;

          i.height = oh;

    }

}

function scale_load(img)

{

    onload_blows = 1;

    t = 0;

    if (navigator.appName == "Netscape")

          t = window.innerWidth;

    else if (navigator.appName.indexOf("Microsoft") != -1 ||

                    navigator.appName.indexOf("Opera") != -1)

        t = document.body.offsetWidth;

    if (t > 64 && t < s)

          s = t - 60;
          

    i = document.getElementById(img);

    ow = i.width;

    oh = i.height;

    scale(img);

}




//jQuery(document).ready(function(){
this.testbegriff = function(){	
//function testbegriff(){					
	jQuery(" .nav ul ").css({display: "none"}); // Opera Fix
	jQuery(" .nav li ").hover(function(){
		jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		jQuery(this).find('ul:first').css({visibility: "hidden"});
	});
};


jQuery(document).ready(function() {
	tooltip();
	testbegriff();
  jQuery('div.accordion> div').hide();  
  jQuery('div.accordion> h3').click(function() {
    jQuery(this).next('div').slideToggle('fast')
    .siblings('div:visible').slideUp('fast');
  });
});


this.tooltip = function(){
//function tooltip() {	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	jQuery("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<p id='tooltip'>"+ this.t +"</p>");
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		jQuery("#tooltip").remove();
    });	
	jQuery("a.tooltip").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

// starting the script on page load
/*jQuery(document).ready(function(){
	tooltip();
});
*/



//
// Verschachteltes Mootools-Accordion
// Nested Mootools Accordion
// 
// von / by Bogdan Günther
// http://www.medianotions.de
