function equalHeight(group) {
  var tallest = 0;
  group.each(function() {
	  var thisHeight = jQuery(this).height();
	  if(thisHeight > tallest) {
		  tallest = thisHeight;
	  }
  });
  group.height(tallest);
}
function remove_equalHeight(group) {
  group.height("auto");
}

jQuery(window).load(function() {
	jQuery('#navigation ul.menu').superfish({
    delay: 1000,
    speed: 0,
    autoArrows: false
  });        
  jQuery('#slider').nivoSlider({
    pauseOnHover:false, // Stop animation while hovering
    controlNav:false,
    slices:15,
    animSpeed:1500,
    effect: "fold",
    pauseTime:5000 // How long each slide will show
  })
});

jQuery(document).ready(function() {
  jQuery("area[rel^='prettyPhoto']").prettyPhoto();
  jQuery(".gallery a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true, social_tools: '' });

  equalHeight(jQuery("#header-wrapper > div > div > div"));
  equalHeight(jQuery("#content-wrapper > div > div > div"));
  jQuery("#main-wrapper").height("auto");
});

