$(document).ready(function() {
    
	//Links extern öffnen
    $('a.external').attr('target', '_blank');
    
	//Hauptnavi Fade
    $('#navMain > ul').fadingnav({ fadeSpeed: 650, initialPos: '0 22px', hoverPos: '0 -59px' });
    
	//replaceable
    $('select.replaceable').selectreplace();
    
	//Druckfenster aufrufen
    $('a.print').click(function(e) {
        window.print();
        e.preventDefault();
        return false;
    })
    
	//Scroll-Top Animation
    $('a.top').click(function(e) {
        $('html,body').animate({ scrollTop: 0 }, 500);
        e.preventDefault();
        return false;
    });
	
	//automatische Bildunterschrift generieren
	$('.contentLeft img:not(.nodesc)').each(function(){						   
		var altText = $(this).attr('alt');		
		if (altText != "") {
			$(this).after('<span class="imgDesc">Photo: '+altText+'</span>');
		}
	});
	
})

