Cufon.replace("#main_menu li, #first li, #second li a, #service li, #claim");



$.noConflict();

jQuery(document).ready(function($) {
		$('body').removeClass('no-js');
		// tx-itawyoutoubeembed ist eine doofe Extension, workaround für das Accordion
		$('.tx-itawyoutoubeembed-pi1').addClass("content-wrap").css('padding', '0px')
		// Accordion Funktion über Layout zu aktivieren!
		if ($('body.accordion').hasClass('open')) {
	    $('.content-wrap:gt(0)').hide();
		} else {
			$('.accordion .csc-default .content-wrap').hide();
		}
    $('.accordion .csc-header').click(function() {
        $('.accordion .content-wrap').each(function() {
            $(this).slideUp();
        });
        if ($(this).next('.content-wrap').css('display') == 'none') {
            $(this).next('.content-wrap').slideDown();
        };
    });

    // das Menü verstecken, um flackern zu verhindern.
    $('#main_menu').hide();
    // $('#main_menu ul').each(function(index) {
    // 	$(this).css('display', 'none')
    // });
    $(function() {
        $.fn.supersized.options = {
            startwidth: 1280,
            startheight: 900,
            vertical_center: 0,
            slideshow: 0,
            navigation: 0,
            transition: 0,
            //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
            pause_hover: 0,
            slide_counter: 1,
            slide_captions: 0,
            slide_interval: 3000
        };
        $('#supersize').supersized();
    });

    $('#menu_wrapper a').each(function() {
        if ($(this).text().length > 16) {
            $(this).addClass('twoline');
        } else {
            $(this).addClass('oneline');
        }
    });

    var activeItem = $('#main_menu ul').children().find('.active');
    activeItem.each(function() {
        var clickedItem = ($(this).parent().prevAll().length);
        var offset = (7 - clickedItem) * 37;
        $(this).closest('ul').css('margin-top', offset + 'px');
    });
    // $('#main_menu ul').slideDown("slow");
    $('#main_menu').slideDown();
});

jQuery(function() {
		jQuery('body').fadeIn("slow");
		}
);


