﻿$(function () {
    $('#slides').slides({
        preload: true,
        preloadImage: '../slides/rotatorimages/loading.gif',
        play: 8000,
        pause: 2500,
        hoverPause: true,
        animationStart: function (current) {
            $('.caption').animate({
                bottom: -35
            }, 100);
            if (window.console && console.log) {
                // example return of current slide number
                console.log('animationStart on slide: ', current);
            };
        },
        animationComplete: function (current) {
            $('.caption').animate({
                bottom: 0
            }, 200);
            if (window.console && console.log) {
                // example return of current slide number
                console.log('animationComplete on slide: ', current);
            };
        },
        slidesLoaded: function () {
            $('.caption').animate({
                bottom: 0
            }, 200);
        }
    });
});


/** nav **/

$(document).ready(function () {
    $('#nav li').hover(function () {
        $('ul', this).slideDown(200);
        $(this).children('a:first').addClass("hov");
    }, function () {
        $('ul', this).slideUp(100);
        $(this).children('a:first').removeClass("hov");
    });
});
