function dom_init() {

    /* --- Fullscreenr --- */
     if( !( ($('body').hasClass('ie6')) | ($('body').hasClass('ie7')) | ($('body').hasClass('ie8')) ) )
     {
       // initialize fullScreenr
       // since this function causes an error in IE this part is only executed for GOOD browsers
       // You need to specify the size of your background image here
       var FullscreenrOptions1 = {  width: sprengelBackgroundWidth, height: sprengelBackgroundHeight, bgID: '#bgimg1' };
       var FullscreenrOptions0 = {  width: 1, height: 1, bgID: '#bgimg0' };
       // This will activate the full screen background!
       jQuery.fn.fullscreenr(FullscreenrOptions1);
       jQuery.fn.fullscreenr(FullscreenrOptions0);
    }

    /* --- Background-Gallery --- */
    bggCount = $('#bgGallery div.bgItem').length;
    bggToggle = 1;
    if(bggCount > 1){
        // unhide the gallery navigation
        $('#bgGalleryPrev').show();
        $('#bgGalleryNext').show();

        // initial setup
        bggCurrentIndex = 1;
        bggNewIndex = null;

        // bind events
        $('#bgGalleryPrev').click(bggDoPrev);
        $('#bgGalleryNext').click(bggDoNext);
    }

    function bggDoPrev(){
        bggNewIndex = ((bggCurrentIndex - 1) == 0) ? bggCount : (bggCurrentIndex - 1) % bggCount;
        bggDoTransition('right');
    }

    function bggDoNext(){
        bggNewIndex = ((bggCurrentIndex + 1) % bggCount == 0) ? (bggCurrentIndex + 1) : (bggCurrentIndex + 1) % bggCount;
        bggDoTransition('left');
    }

    function bggDoTransition(direction){
        bggToggle++;
        var newBG = bggToggle%2;
        var activeBG = (bggToggle+1)%2;

        // get the new content
        var nextBgItem = $('#bgGallery div:nth-child('+bggNewIndex+')');

        // set the new content to the next #bgimgX-Element
        $('#bgimg'+newBG).attr('src', nextBgItem.find('img').attr('src'));

        if( !( ($('body').hasClass('ie6')) | ($('body').hasClass('ie7')) | ($('body').hasClass('ie8')) ) )
        {
           // apply fullScreenr:
           // since this function causes an error in IE this part is only executed for GOOD browsers
           fsOptions = (newBG == 0) ? FullscreenrOptions0 : FullscreenrOptions1;
           fsOptions.width = nextBgItem.find('img').attr('width');
           fsOptions.height = nextBgItem.find('img').attr('height');
           jQuery.fn.fullscreenr(fsOptions);
        }

        // perform the transitioning effect
        $('#bgimg'+activeBG).fadeOut(800);
        $('#bgimg'+newBG).fadeIn(500);

        // switch infoText
        $('#infoText').html(nextBgItem.find('div').html());

        bggCurrentIndex = bggNewIndex;
    }

    // register keyboard navigation
    $(document).keydown(function(event){
        switch(String.fromCharCode(event.keyCode)){
          case '\'':
            $('#bgGalleryNext').click();
            break;
          case '%':
            $('#bgGalleryPrev').click();
            break;

        }
    })

    /* --- Initialize Lightbox --- */
    if ($("a[rel^='prettyPhoto']").length){
        $("a[rel^='prettyPhoto']").prettyPhoto({theme:'sprengels'});
    }

    /* --- Register close-button handlers --- */
    $('a.close').click(function(){
        $(this).parents(".closeable:first").fadeOut();
    })


}