(function($) {
$(document).ready(function(){

  // Archivmenue ausblenden
  $("ul.archiv").hide();

  $("h2.closed").toggle(
    function () {
      $(this).next("ul.archiv").slideDown("slow");
      $(this).addClass("open").removeClass("closed");
    },
    function () {
      $(this).next("ul.archiv").slideUp("slow");
      $(this).addClass("closed").removeClass("open");
    }
  );

  var picturerowheight = 0;
  var leftcolheight = $("leftcol").height();
  if ($("#picture-row").length > 0 || $("#content > .cm-picturegallery").length > 0) {
  	var picturerowheight = $("#picture-row, #content > .cm-picturegallery").height();
  }
  var navheight = $("#nav-box").height();
  var contentheight = leftcolheight + picturerowheight;

  if (navheight > contentheight) {
  	document.getElementById("leftcol").style.minHeight = navheight - picturerowheight + "px";
  }

});
})(jQuery);
