function equalHeight(group) {
    tallest = 0;
    group.each(function() {
        thisHeight = $(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

$(document).ready(function(){
  
  $(".photorel a").lightBox({fixedNavigation:true});
  $(".reservations .presale_concerts").hide();
  
  $(".showpresales").click(function () {
    $(".presale_concerts").slideToggle("slow");
  });

  var searchtext = "Bandname or tag";
  $("#search-text").val(searchtext);

  $("#search-text").focus(function () {
    if ($(this).val() == searchtext) {
      $(this).val('');
    }
  });
  
  $("#search-text").blur(function () {
    if ($(this).val() == '') {
      $(this).val(searchtext);
    }
  });
  
  equalHeight($(".photoset_preview"));
  
  $("#tabs > li:nth-child(1) > input:radio").click(function() {
  	document.location.href = "http://www.vera-groningen.nl/reservations";
  });
  $("#tabs > li:nth-child(2) > input:radio").click(function() {
  	document.location.href = "http://www.vera-groningen.nl/reservations_zienema";
  });
  
  $("a[rel=external]").attr("target","_blank");
  
});