﻿$(function () {
    $('#slides').slides({
        preload: true,
        preloadImage: '/img/loading.gif',
        play: 5000,
        pause: 3500,
        slideSpeed: 900,
        hoverPause: true,
        animationStart: function (current) {
            $('.caption').animate({
                bottom: -73
            }, 200).delay(400);
            if (window.console && console.log) {
                // example return of current slide number
                // console.log('animationStart on slide: ', current);
            };
        },
        animationComplete: function (current) {
            $('.caption').animate({
                bottom: 0
            }, 700);
            if (window.console && console.log) {
                // example return of current slide number
                // console.log('animationComplete on slide: ', current);
            };
        },
        slidesLoaded: function () {
            $('.caption').animate({
                bottom: 0
            }, 700);
        }
    });
    $('#slides').hover(function () { $('.next, .prev').animate({ opacity: 0.5 }, 500); }); ;
    $('#slides').mouseleave(function () { $('.next, .prev').animate({ opacity: 0.0 }, 500); }); ;
    $('.prev, .next').hover(function () {
        $(this).animate({ opacity: 0.7 }, 200);
        $('.prev, .next').mouseleave(function () { $(this).animate({ opacity: 0.5 }, 200); });
    });
});
