﻿var divs= new Array();

$(document).ready(function()
{
   //This animation is for the small "group boxes" that are at the bottom
   $('div.DivGroup').each(function()
   {
       $(this).slideToggle('slow',function(){
        $('#HomePageBottom div.DivGroup a.DivGroupTitle').fadeIn('1000',function(){
                $('#HomePageBottom div.DivGroup div.DivGroupContent').fadeIn(500);
            });
       });
   });
   
   
    $('#MainBannerMessage div.MainPart').hide().delay(800).fadeIn('slow',function()
    {        
        
        $('div.Message > div').each(function(){
            divs.push($(this));            
        });
        
        AnimateDiv(0);
               
    });
    
})


function AnimateDiv(position)
{
    if(position < divs.length)
    {
        var element = divs[position];
        $(element).css("font-size","30px");
        $(element).delay(300).fadeIn(1000,function(){
            $(this).fadeOut(1000,function()
            {
                AnimateDiv(position+1);
                $(this).css("font-size","Large");
            });
        });
    }else
    {
        $('div.Message > div').fadeIn(1000);
    }
}
