﻿function autorun() {
    showTime();
    oneAnimate();
    animation();
}

function oneAnimate() {
    var i = 0;
    $('#menuRightUp div').each(function() {
        if (i == 5)
            return;
        else {
            $(this).animate({ top: '+=' + i * 52 + 'px' }, 2000);
            i++;
        }
    })
}

function animation() {
    $('div#title').animate({ opacity: '1' }, 2000).animate({ opacity: '0.7' }, 1000);
    //setTimeout('animation()', 4000);
}

function showTime() {
    myDate = new Date();

    // Get time parts
    hours = myDate.getHours();
    minutes = myDate.getMinutes();
    seconds = myDate.getSeconds();

    // Just to display the time in a nice format
    if (hours < 10) hours = "0" + hours;
    if (minutes < 10) minutes = "0" + minutes;
    if (seconds < 10) seconds = "0" + seconds;

    // Change the block content
    document.getElementById("maxtime").innerHTML = hours + ":" + minutes + ":" + seconds;
    setTimeout("showTime()", 1000);
}

function thumb() {
    $('table.galleryTable tr td img').hover(function() {
        $(this).animate({ width: '+=50px', height: '+=50px' }, 1000)
        }, function() {
            $(this).animate({ width: '-=50px', height: '-=50px' }, 1000) 
        }
    )
}
