/* --------------------------------------------*/
/* -----------------FUNKTIONEN-----------------*/
/* --------------------------------------------*/

function popup(url, breite, hoehe, scroll,resize)
{
	zufall = Math.random()
	var jetzt = new Date();
	var seks = jetzt.getSeconds()
	var zufallszahl = Math.floor(zufall * seks)
	var picWindow = "picWindow" + zufallszahl

	var derScroll = scroll;
	if (derScroll == "1") scrolling = "yes";
	if (derScroll == undefined || derScroll > "1") scrolling = "no";
	
	var derResize = resize;
	if (derResize == "1") resizable = "yes";
	if (derResize == undefined || derResize > "1") resizable = "no";

	window.open(url, picWindow, "menubar=no,location=no,resizable=" + resizable + ",status=no,toolbar=no,scrollbars=" + scrolling + ",width=" + breite + ",height=" + hoehe + ",screenX=20,screenY=20")
}


$(document).ready(function(){
    $("#nav-main li").hover(
        function(){ $("ul", this).show(); }, 
        function() { $("ul", this).hide(); } 
    );
    if (document.all) {
        $("#nav-main li").hoverClass ("sfHover");
    }
});

$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};