var contentHeight = null;

jQuery(function() {
	if (!$.browser.msie) {
		$("ul#navi").superfish();
	}
	
												
		
});

$(document).ready(function() {
	$("#sliderWrap").addClass("js");
	$(".topMenuAction").click( function() {
        if ($("#openCloseIdentifier").is(":hidden")) {
            $("#slider").animate({
                marginLeft: "-235px"
                }, 500, "easeInOutCubic" );
            $("#topMenuImage").html('<img src="http://www.media-21.ch/images/layout/open.png"/>');
            $("#openCloseIdentifier").show();
        } else {
            $("#slider").animate({
                marginLeft: "0px"
                }, 500, "easeInOutCubic" );
            $("#topMenuImage").html('<img src="http://www.media-21.ch/images/layout/close.png"/>');
            $("#openCloseIdentifier").hide();
        }
    }); 
});


$(function() {
			$("#slider2").headingslider({
				easing: 'easeInOutCubic',
				fxDuration: 2000,
				timeout: 7000,
				oninit:				function(active) {
					active.children(".info").fadeIn("slow");
				},
				onstart:				function(newActive, oldActive) {
					oldActive.children(".info").fadeOut("slow");
				},
				oncomplete:			function(newActive, oldActive) {
					newActive.children(".info").fadeIn("slow");
				}
			});
			
			$(".next").click(function(evt) {
				evt.preventDefault();
				$("#slider2").headingslider('next');
			});
			$(".prev").click(function(evt) {
				evt.preventDefault();
				$("#slider2").headingslider('prev');
			});
		});

$(function() {
		$("#news .ewcms_news_feed").cycle({ 
    		fx:     	'scrollUp', 
    		delay: 	-1000,
	 		speed:	2000,
			timeout: 4000
	});
});
