
//-------------------------------
// Equal Height Columns
function equalHeight(group) {
  tallest = 0;
  extended = 0;
  group.each(function() {
    thisHeight = $(this).height();
    if(thisHeight > tallest) {
      tallest = thisHeight;
    }
  });
  group.height(tallest);
}
//-------------------------------

$(document).ready(function() {
  // Equal Height Columns
  equalHeight($(".inner"));

  // Rotate the frontpage images
  var counter = 1;
  var num_images = 17;
  var animation_speed = 1000;
  var photo = $("#photo img");

  $(document).everyTime(40000, function(i) {
    var timestamp = new Date().getTime();
    photo.animate({opacity: 0}, animation_speed, function() {
      photo.attr('src', '/new/img/rotating/imagerotator.php?'+ counter);
    });
    photo.animate({opacity: 1}, animation_speed);
    counter++;
    if(counter == num_images) {counter = 1;}
  });
});
