var synapsis_jheadline_count;
var synapsis_jheadline_interval;
var synapsis_jcurrent_headline = 0;
var synapsis_jold_headline = 0;
var synapsis_jscrollup_height = 220;
addLoadEvent_Syn(function() {
    if (document.getElementById("scrollup")) {
        synapsis_jscrollup_height = $("#scrollup").height();
        synapsis_jheadline_count = $("#scrollup div.aktuelles_item").size();
        $("#scrollup div.aktuelles_item:eq(" + synapsis_jcurrent_headline + ")").css('top', '5px');
        synapsis_jheadline_interval = setInterval(jheadline_rotate, 8000);
        $('#scrollup').hover(function() {
            clearInterval(synapsis_jheadline_interval);
        }, function() {
            synapsis_jheadline_interval = setInterval(jheadline_rotate, 8000);
            jheadline_rotate();
        });
    }
});
function jheadline_rotate() {
    synapsis_jcurrent_headline = (synapsis_jold_headline + 1) % synapsis_jheadline_count;
    $("#scrollup div.aktuelles_item:eq(" + synapsis_jold_headline + ")").animate({ top: 0-synapsis_jscrollup_height }, 1000, function() {
        $(this).css('top', synapsis_jscrollup_height+'px');
    });
    $("#scrollup div.aktuelles_item:eq(" + synapsis_jcurrent_headline + ")").show().animate({ top: 5 }, 1000);
    synapsis_jold_headline = synapsis_jcurrent_headline;
}
