// Downloadbox
function init_DownloadList(){

    $(".download_list li a.download_opener").removeAttr('href');

    $(".download_list li").click( function(){
        $('span.download_info',this).slideToggle(300);
        $(this).toggleClass('clicked');
    });

    $(".download_list a.download").mouseover( function(){
        $(this).parents('li').eq(0).unbind("click");
    });

    $(".download_list a.download").mouseout( function(){
        $(this).parents('li').eq(0).bind("click", function(){
            $('span.download_info',this).slideToggle(300);
            $(this).toggleClass('clicked');
        });
    });
}

$(function () {

    $('#nav1 ul:first').children('li:gt(2)').addClass('bottom');
    $("#nav1 a:contains('Unternehmenssteuerung')").html('Unternehmens-steuerung');

    $('#template_4 h1:first').each(function() {
            $(this).addClass('open');
            $(this).next().show();
    });


    $('#template_4 h1').click(function() {

        var open = $(this).is('.open');

        $('#template_4 h1').removeClass('open');
        $('#template_4 .projekt_content:not(:hidden)').slideUp('slow');

        if (!open) {
            $(this).addClass('open');
            $(this).next().slideDown('slow');
        }
    });

	var h = window.location.host.toLowerCase();
	$("a[href^='http']:not(a[href^='http://" + h + "']):not(a[href^='http://www." + h + "']), a[href$='.pdf']").attr("target", "_blank");

});