  function rotate_images () {
    current_image++;
    num_rotations++;
    if (current_image> (num_rotating-1) ) current_image = 0;

    if(current_at_front == 1) {
      jQuery("#rotate2").fadeIn(fade_time);
      jQuery("#rotate1").fadeOut(fade_time, function() {
        jQuery(this).attr("src", image_path + rot_array[current_image]);
      });

      current_at_front = 2;
    } else {
      jQuery("#rotate1").fadeIn(fade_time);
      jQuery("#rotate2").fadeOut(fade_time, function() {
        jQuery(this).attr("src", image_path + rot_array[current_image]);
      });

      current_at_front = 1;
    }

    if (num_rotations < max_rotations) setTimeout( function()
      {
        rotate_images();
     }, switch_timeout);


  } // end function rotate_images