/* Fancybox */
$(document).ready(function() {

    /* Apply fancybox to multiple items */
    
    $("a#zoom-bild").fancybox({
        'hideOnContentClick': true,
        'titleShow': false
        /*'transitionIn' : 'elastic',
        'transitionOut' : 'elastic',
        'speedIn' : 600, 
        'speedOut' : 200, 
        'overlayShow' : false*/
    });
    
    $("a.zoom-bild").fancybox({
        'hideOnContentClick': true,
        'titleShow': false
    });
    
    $("a.zoom-bildstrecke").fancybox({
        'transitionIn' : 'none',
        'transitionOut' : 'none',
        'titlePosition' : 'over',
        'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
            return '<span id="fancybox-title-over">Bild ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
        }
    });
    
    $('.zoom-bildstrecke').wrap('<div class="mod-zoom" />');
    $('.zoom-bildstrecke').before('<div class="m-zoom-gallery-icon">Zum Vergrößern klicken</div>');
    
    $('.zoom-bild').wrap('<div class="mod-zoom" />');
    $('.zoom-bild').before('<div class="m-zoom-icon">Zum Vergrößern klicken</div>');
    
});
