﻿
/* ---------------------------------------------------------------------------------- */
/* ----- Functies: onLoad ----------------------------------------------------------- */
/* ---------------------------------------------------------------------------------- */

$(document).ready(function() {
  // Lightbox activeren
  $("a[rel*=lightbox]").lightbox();
  $("#overlay").css({ "opacity": "0.6" });
  
});


/* ---------------------------------------------------------------------------------- */
/* ----- Functies: Algemeen --------------------------------------------------------- */
/* ---------------------------------------------------------------------------------- */

// Standaard-tekst in input verbergen (onFocus)
function textFieldFocus(object, defaultValue) {
  if (object.value == defaultValue) {
    object.value = "";
  }
}

// Standaard-tekst in input tonen (onBlur)
function textFieldBlur(object, defaultValue) {
  if (object.value == "") {
    object.value = defaultValue;
  }
}

// Dropdown zoeken openen/sluiten
function toggleDropdown(evt, popupId) {
 $("body").unbind();
 if (!evt || evt == "") {
 var evt = window.event;
 }
 if (popupId) {
 if ($("#" + popupId).css("display") != "block") {
 $("#top #topbar .dropdown .list").css("display", "none");
 $("#" + popupId).css("display", "block");
 evt.cancelBubble = true;
 $("body").bind("click", function() { toggleDropdown("", popupId); })
 }
 else {
 $("#" + popupId).css("display", "none");
 }
 }
} 
