// JavaScript Document
<!-- 
	$(document).ready(function() {
		$('#secondNavBg').removeClass('no-script');
		$('.homeSubNavBox').height(0);				
		$('.homeSubNavBox').hide();
		// Untermenue 01 ausblenden
		$('#mainNav li').click(function(el,e){
        	el.preventDefault();
			var index = $("#mainNav li").index(this);
			var subNav = $('.homeSubNavBox');
			jQuery.each(subNav, function(idx) {
				//ie6 blendet nur ein und aus, ohne animation
				if($.browser.msie && $.browser.version=="6.0"){
					if(idx == index && $(this).is(':hidden')){
						$(this).show("slow");
					} else {
						$(this).hide();
					}				
				} else {
					$(this).animate({ 
						height: 0
					}, 500 );
					if(idx == index && $(this).is(':hidden')){
						$(this).animate({ 
							height: "37px"
						}, 500 );
					}
				}
			});
		})
		/*$("#mainNavItem634").click( function() {
			
			console.log($("#openCloseIdentifier634"));
			
			if ($("#openCloseIdentifier634").is(':visible')) {
				$("#subNavBox634").animate({ 
					height: "37px"
					}, 500 );
				$("#openCloseIdentifier634").hide();
				
			}else if ($("#openCloseIdentifier634").is(':hidden')) {				
				$("#subNavBox634").animate({ 
					height: "0px"
					}, 500 );
				$("#openCloseIdentifier634").show();
			}
		});  

		// Untermenue 02 ausblenden
		$("#mainNavItem635").click( function() {
			
			console.log($("#openCloseIdentifier635"));
			
			if ($("#openCloseIdentifier635").is(':visible')) {
				$("#subNavBox635").animate({ 
					height: "37px"
					}, 500 );
				$("#openCloseIdentifier635").hide();
			}else if ($("#openCloseIdentifier635").is(':hidden')) {				
				$("#subNavBox635").animate({ 
					height: "0px"
					}, 500 );
				$("#openCloseIdentifier635").show();
			}
		});
		
		// Untermenue 02 ausblenden
		$("#mainNavItem636").click( function() {
			
			console.log($("#openCloseIdentifier636"));
			
			if ($("#openCloseIdentifier636").is(':visible')) {
				$("#subNavBox636").animate({ 
					height: "37px"
					}, 500 );
				$("#openCloseIdentifier636").hide();
			}else if ($("#openCloseIdentifier636").is(':hidden')) {				
				$("#subNavBox636").animate({ 
					height: "0px"
					}, 500 );
				$("#openCloseIdentifier636").show();
			}
		});*/
		
	});

/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* +++++++++++++++++++++++++++++ ICHANNEL NO FLASH +++++++++++++++++++++++++++++ */
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

$(document).ready(function() {	

	$('#scroller-header').show();
	$('#panel').width(parseInt($('#mask').width() * $('#panel div').length+1));
	//Set the sub-panel width according to the #mask width (width of #mask and sub-panel must be same)
	$('#panel div').width($('#mask').width());
	
	//Get all the links with rel as panel
	$('#ichannel-nav li').click(function (e) {
		
		//e.preventDefault();	
		//Set class for the selected item
		$('#ichannel-nav li').removeClass('selected');
		
		//Set class for the next item
		$('#ichannel-nav li').removeClass('next');
		
		$(this).addClass('selected');
		
		if($(this).next().length== 0){
			$('#ichannel-nav li:first').addClass('next');
			//$('#panel div:first').insertAfter('#panel div:last');
		} else {
			$(this).next().addClass('next');
		}
        //$('#panel div:first').clone().insertAfter('#panel div:last')
		$('#mask').animate({queue:true, duration:50});	
		
		//console.log($(this).attr('href'));
		var scrollTarget = $(this).attr('id');
		var scrollTargetAnchor = scrollTarget.split("nav-");
		var scrollTargetPanelID = "#"+scrollTargetAnchor[1];

		$('#mask').scrollTo($(scrollTargetPanelID), 1500,{onAfter:function(){
			
		}});
	
		return false;
	});
	
	//interval 7500
	if(!$.hasFlash) {window.setInterval("$('li.next').click();", 6500);};
});

-->
