﻿/// <reference path="jquery-1.4.1-vsdoc.js" />

//Moet niet in $(document).ready
Cufon.replace("h1, #menu a");

$(document).ready(function() {

    //Achtergrond menu hoogte berekenen
    var MaxHoogte = 0;

    $("#menu ul").each(function() {
        var Hoogte = $(this).outerHeight()
        if (Hoogte > MaxHoogte) { MaxHoogte = Hoogte; }
    });

    $("#subachterg").height(MaxHoogte - 2);
    $("#menu ul ul").height(MaxHoogte - 7);


    //Achtergrond Menu over gehele breedte
    $("#menu > li").hover(function() {
        if ($(this).has("li").length > 0) {
            $("#subachterg").show();
        }
    }, function() {
        $("#subachterg").hide();
    });


    //Menu hover
    $("#menu li").hover(function() {
        $("> ul", this).show();
    }, function() {
        $("> ul", this).hide();
    });

});



function ThumbPopup(url) { 
  Popup("ThumbPopup.aspx?" + url);
}



function Popup(url, naam, details) { 
  if (details == undefined) { details = "resizable=0,height=200,width=200"}
  if (naam == undefined) {
    now = new Date()
    naam = "" + now.getDate() + now.getMonth() + now.getFullYear() + now.getHours() + now.getMinutes() + now.getSeconds()
  }
  window.open(url, naam, details);
}