setInterval ("rotateImage()", 500 );
			
function rotateImage(){
	var curSlide = parseInt($('#currentSlide').html());
	var maxSlide = parseInt($('#maxSlide').html());
	var nextSlide = (curSlide+1);
	var nextDiv = 'map-'+nextSlide;
	$('#currentSlide').html(nextSlide);
	$('#'+nextDiv).fadeIn(0);
	if(curSlide==maxSlide){
		hideMapParts();
		$('#currentSlide').html(0);
	}
}

function hideMapParts(){
	var maxSlide = parseInt($('#maxSlide').html());
	for(i=2;i<=maxSlide;i++){
		var mapToHide = 'map-'+i;
		$('#'+mapToHide).hide();
  }
}

$(document).ready(function () {
    /* about function for swapping tabs and content */

    $('.aboutNavButton').click(function () {
        $('.aboutNavButton').removeClass('active');
        $(this).addClass('active');
        var className = $(this).attr('id');
        classNameParts = className.split("-");
        $('.aboutContentBody').hide();
        $('#' + classNameParts[0]).show();
    });

    $('.associate').click(function () {
        $('#emptyModalDialogue').show();
        $('.modalHeader').html('Associate');
        var description = $(this).find('.associateDescription').html();
        $('#emptyModalWindowBody').html(description);
    });

});
