﻿function showRegion(index) {
    index = index % $('#regionrotator h2').length;
    $('#regionrotator h2:visible').fadeOut(500, function () {
        $('#regionrotator h2').eq(index).fadeIn(500, function () {
            setTimeout(function () {
                showRegion(index + 1);
            }, 3000);
        });
        $('.introrotator').each(function () {
            $(this).children('p').eq(index).fadeIn(500);
        });
    });
    $('.introrotator p:visible').fadeOut(500);
}

$(document).ready(function () {
    $('#regionrotator h2:first-child').show();
    $('.introrotator p:first-child').show();
    setTimeout(function () {
     //   showRegion(1);
    }, 3000);
});
