/*
  $Id: denkvooruit.js,v 1.18 2009-07-02 11:41:25 bram Exp $
  $Name:  $
*/

// CSS selectors
$("html").addClass("js");
if ($.browser.msie) $("html").addClass("msie");
else if ($.browser.mozilla) $("html").addClass("mozilla");
else if ($.browser.safari) $("html").addClass("safari");
else if ($.browser.opera) $("html").addClass("opera");

// Meer info
$("#crisis-nl span").before("<a id=crisis-nl-info href=javascript://Lees%20meer>Lees meer</a>").hide();
$("#crisis-nl").click(function(){
  $("#crisis-nl-info").remove();
  $("#crisis-nl span").slideDown("fast");
  $("#crisis-nl").css("cursor", "default");
});
$("#crisis-nl").hover(
  function(){ if ($("#crisis-nl-info").length > 0){ $(this).css("cursor", "pointer"); } }
, function(){ $(this).css("cursor", "default"); }
);

// MSIE helpen
if ($.browser.msie) {
  $("ul li:first-child").addClass("eerste");
}

// Menu volledig aanklikbaar maken
$("#subinhoud li").hover(function(){ $(this).addClass("hover"); }, function(){ $(this).removeClass("hover"); });
$("#subinhoud li").click(function(){ $("a", this).each(function(){ this.focus(); document.location.href = this.href; }); });

// Focus zetten bij springen naar navigatie
$("#naar-navigatie a").click(function(){ $("#subinhoud a")[0].focus(); return false; });

// Popup
$("a.popup").after("&nbsp;(nieuw venster)").click(function(){
  var popup = window.open(this.href +"?popup=true", "popup", "width=790,height=590,scrollbars=yes");
  popup.focus();
  return false;
});
$("body.popup a").attr("target", "_blank");

