﻿var _currentSection = 1;
$(document).ready(function() {
    setInterval("fadeSection()", 8000);
    var _html = $('#fadingContentHeader1').html();
    $('#fadingContentHeader2').html(_html);
    $('#fadingContentHeader3').html(_html);
});

function fadeSection() {
    var fadeInSection = "";
    var fadeOutSection = "";
    var _newSection = 1;
    if (_currentSection == 1) {
        _newSection = 2;
    }
    else if (_currentSection == 2) {
        _newSection = 3;
    }
    else if (_currentSection == 3) {
        _newSection = 1;
    }
    fadeOutSection = "#fadingContent" + _currentSection;
    fadeInSection = "#fadingContent" + _newSection;

    $(fadeOutSection).fadeOut(2000, function() { $(fadeInSection).fadeIn(1500)});
    
    
    
    _currentSection = _newSection;
}