/* po zobrazenní průsvytný fotky skryje tu spodní doba zobrazení fotky 2000/7000 (prazdna/img) doba přechodu 8000 */ function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('#slideshow IMG:last'); var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first'); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 8000, function() { $active.animate({opacity: 0.0}, 8000, function(){ }).removeClass('active last-active'); }); } function make_15(){ slideSwitch(); wait10 = setTimeout( "make_10()", 10000 ); } function make_10(){ slideSwitch(); wait15 = setTimeout( "make_15()", 15000 ); } $(function() { wait15 = setTimeout( "make_15()", 3000 ); //prvni spusteni });