
$(document).ready(function(){
  rotatePics(1);
});


function rotatePics(currentPhoto) {
  var numberOfPhotos = $('#mm_slide img').length;
  currentPhoto = currentPhoto % numberOfPhotos;
	
  $('#mm_slide img').eq(currentPhoto).fadeOut(function() {
		// re-order the z-index
    $('#mm_slide img').each(function(i) {
      $(this).css(
        'zIndex', ((numberOfPhotos - i) + currentPhoto) % numberOfPhotos
      );
    });
    $(this).show();
    setTimeout(function() {rotatePics(++currentPhoto);}, 4500);
  });
}


$(function() {
	$("#main li").css("opacity","1");
	 
	// ON MOUSE OVER
		
	$("#main li").hover(function () {
		$(this).stop().animate({opacity: .7	}, "fast");	
	},
		 
	// ON MOUSE OUT
	function () {
	$(this).stop().animate({
	opacity: 1}, "fast")}
	);
	
	});
	
	
/*	 $(this).css("color","#6e9db7"); 
	$("#main li").css("color","white") */



