$(document).ready(function() {
    $('#logo').click(function() {
      window.location.href="index.php";
    });
});
function redimen(){
    var ancho = document.body.clientWidth;
    if(ancho<="600"){
        document.getElementById("bgimg").style.width="600px";
    }else{
        document.getElementById("bgimg").style.width="100%";
    }
}
$(function(){
    $('#slides').slides({
            preload: true,
            preloadImage: 'img/loading.gif',
            effect: 'slide, fade',
            play: 6000,
            pause: 4000,
            //hoverPause: true,
            animationStart: function(current){
                    $('.caption').animate({
                            bottom:-200,
                            opacity:0.1
                    },100);
                    if (window.console && console.log) {
                            // example return of current slide number
                            console.log('animationStart on slide: ', current);
                    };
            },
            animationComplete: function(current){
                    $('.caption').animate({
                            bottom:10,
                            opacity: 1
                    },500);
                    if (window.console && console.log) {
                            // example return of current slide number
                            console.log('animationComplete on slide: ', current);
                    };
            },
            slidesLoaded: function() {
                    $('.caption').animate({
                            bottom:10,
                            opacity: 1
                    },500);
            }
    });
});
