// set the page to the middle of the browser$(document).ready(function(){    centerPage();    $(window).resize(function()  { centerPage(); });    // fader für hometeils    $("li.home").hover(        function () { $(this).find("img.home2").fadeIn(50); },        function () { $(this).find("img.home2").fadeOut(50); }    );   // mail für footer   $('#contactmail').attr('href', 'mailto:info@naturgartenleben.ch');   // impressum anzeigen oder nicht   $('div#impressum').click(function()   {       if($('div#impressumBig').css("display") == "none") { $('div#impressumBig').fadeIn(100); }       else { $('div#impressumBig').fadeOut(100); }    });});// center the page function centerPage(){    var cheight  = $("div#pagecontent").innerHeight();    var wheight  = $(window).height() - ($("div#footer").height()+20); //  höhe vom footer abgezogen inklusive abstand zu footer inklusive margin top=20    // höhe des seiten inhalts ohne footer "page"    if(cheight< (wheight)) { $("div#page").css("height", wheight+"px"); }    else {$("div#page").css("height", cheight+"px"); }    // margin-top von "pagecontent";    var cmargin = Math.round(($("div#page").height()-cheight)/2) +10;    $("div#pagecontent").css("top", cmargin+"px");}// fade in out ------------------------------function fadeIn(who, speed){    speed = speed!=undefined ? speed : "normal";    $("img#"+who).fadeIn(speed);}function fadeOut(who, speed){     speed = speed!=undefined ? speed : "normal";    $("img#"+who).fadeOut(speed);}/* popup window */function popup(url, w, h, f, x, y){    if(navigator.userAgent.indexOf("Safari") != -1) { w = w - 2; }    var day = new Date();    var id = day.getTime();    var name = "ilovefu" + id;    if(x == null) { x = Math.round((screen.availWidth-w)/2); }    if(y == null) { y = Math.round((screen.availHeight-h)/2); }    var features = "width="+w+",height="+h+",left="+x+",top="+y+",screenX="+x+",screenY="+y+",toolbar=no,location=no,status=no,menubar=no,history=no,titlebar=no,alwaysRaised";    if(f != null) { features += "," + f; }    eval("var win"+id+" = window.open('"+url+"', '"+name+"', '"+features+"');");    eval("win"+id+".moveTo("+x+","+y+");");    eval("win"+id+".focus();");}