var abdebc_akt_bild = 0;
var abdebc_akt_show = 0;
var wp_slideshow_text_style = "width: 100%; text-align: center; position: relative; top: 0px; color: black; background: white";
/* TODO:
-Sortierung
-Selektoren auf das Galeriediv anpassen (für mehrere Slideshows!)
*/
function abdebc_bild_wechseln() {
//Das obere Bild ausblenden während das untere angezeigt wird. (1/3 der anzeigezeit übergangseffekt)
$("#abdebc_slideshow_"+(1-abdebc_akt_show)).css("display", "block");
$("#abdebc_slideshow_"+abdebc_akt_show).fadeOut(Math.floor(abdebc_dauer*1000/3.25), abdebc_cache_new);
//Anzeige wechseln
abdebc_akt_show = 1-abdebc_akt_show;
}
function abdebc_cache_new() {
//Diese Funktion wird erst aufgerufen, wenn das obere Bild komplett ausgeblendet ist!
//Das ausgeblendete Bild wird nach unten geschoben
$("#abdebc_slideshow_"+(1-abdebc_akt_show)).css("z-index", 1);
$("#abdebc_slideshow_"+abdebc_akt_show).css("z-index", 2);
var abdebc_size_x = abdebc_groessen[abdebc_akt_bild]["x"];
var abdebc_size_y = abdebc_groessen[abdebc_akt_bild]["y"];
//Neues Bild cachen und in den inaktiven div laden, wenn fertig geladen (die Funktion wird vom div aufgerufen, deswegen this!)
var abdebc_bild_cache = "
";
// wenn alt_text_show=1, dann zeige auch den Alternativtext unter dem Bild an (muss nicht gecacht werden)
if (abdebc_alt_text_show == 1) {
abdebc_bild_cache = abdebc_bild_cache + "
" + abdebc_alt_text[abdebc_akt_bild] + "
";
}
$(this).html(abdebc_bild_cache);
abdebc_akt_bild = (abdebc_akt_bild + 1) % (abdebc_bilder.length -1);
$(this).ready(function() {setTimeout("abdebc_bild_wechseln()", abdebc_dauer*1000);});
}
$(document).ready(function() {
//alert("init mit abdebc_");
//Die ersten 2 Bilder laden und in die divs setzen. Wenn das zweite Bild geladen ist, den Timer starten.
var abdebc_size_x = abdebc_groessen[0]["x"];
var abdebc_size_y = abdebc_groessen[0]["y"];
var abdebc_bild = "
";
// wenn alt_text_show=1, dann zeige auch den Alternativtext unter dem Bild an
if (abdebc_alt_text_show == 1) {
abdebc_bild = abdebc_bild + "" + abdebc_alt_text[0] + "
";
}
var abdebc_size_x = abdebc_groessen[1 % (abdebc_bilder.length -1)]["x"];
var abdebc_size_y = abdebc_groessen[1 % (abdebc_bilder.length -1)]["y"];
var abdebc_bild_cache = "
";
// wenn alt_text_show=1, dann zeige auch den Alternativtext unter dem Bild an (muss nicht gecacht werden)
if (abdebc_alt_text_show == 1) {
abdebc_bild_cache = abdebc_bild_cache + "" + abdebc_alt_text[1 % (abdebc_bilder.length -1)] + "
";
}
abdebc_akt_bild = (abdebc_akt_bild + 2) % (abdebc_bilder.length -1);
$("#abdebc_slideshow_0").html(abdebc_bild).css("backgroundColor", abdebc_farbe);
$("#abdebc_slideshow_1").html(abdebc_bild_cache).css("backgroundColor", abdebc_farbe);
$("#abdebc_slideshow_1").ready(function() {setTimeout("abdebc_bild_wechseln()", abdebc_dauer*1000);});
});