var uebergang = 1500
var dauer = 5000


function nextImage() {

    jQuery('.headerImageItem:last').addClass('imageRotation');
    jQuery('.imageRotation').fadeOut(uebergang, function () {
        jQuery('#imageRotatorBox').prepend(jQuery('.imageRotation'));
        jQuery('.headerImageItem').css('display','block');
        jQuery('.imageRotation').removeClass('imageRotation');
    });

}

jQuery(document).ready(function(){

    if( jQuery(".headerImageItem").size() > 1 ){
        jQuery(this).everyTime(dauer, 'controlled', function() {
            nextImage();
        });
    }

  
    /* !fold */
    jQuery('.foldTitle').bind('click', function(){
        var open = jQuery(this).parent().next().css('display');
        if (open == "block") {
            jQuery('.foldContent').slideUp();
        } else {
            jQuery('.foldContent').slideUp();
            jQuery(this).parent().next().slideDown();
        }
    });
  
});
