  var switch_timeout = 5000;
  var current_image = 0;
  var current_at_front = 1;
  var fade_time = 1000;
  

  function rotate_images () {
    current_image++;

    if (current_image >= num_images ) current_image = 0;

    if(current_at_front == 1) {
      $("#rotate2").fadeIn(fade_time);
      $("#rotate1").fadeOut(fade_time, function() {
        $(this).attr("src", 'images/galleries/9/' + rotation_array[current_image]);
      });

      current_at_front = 2;
    } else {
      $("#rotate1").fadeIn(fade_time);
      $("#rotate2").fadeOut(fade_time, function() {
        $(this).attr("src", 'images/galleries/9/' + rotation_array[current_image]);
      });

      current_at_front = 1;
    }

    setTimeout( function()
      {
        rotate_images();
     }, switch_timeout);


  } // end function rotate_images
  
  function equalise_columns() {
    var min_height = 700;
    var h1 = document.getElementById("main_content_container").offsetHeight;
	var h2 = document.getElementById("right_col").offsetHeight;
	
	var common_height = Math.max(h1, h2);
	if (common_height < min_height) common_height = min_height;
	document.getElementById("main_content_container").style.height = common_height + "px";
    document.getElementById("right_col").style.height = common_height + "px";
  }

  $(document).ready(function() {
    rotate_images();
  });

