function initMenu() {
		
  $('.accordion .jquery-content').hide();
	$('.accordion .jquery-content:eq(0)').show().prev().addClass('active');
  $('.accordion h2').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('.accordion .jquery-content')) && (checkElement.is(':visible'))) {
				//$('.accordion .jquery-content:visible').slideUp('normal');
        return false;
        }
      if((checkElement.is('.accordion .jquery-content')) && (!checkElement.is(':visible'))) {
        $('.accordion .jquery-content:visible').slideUp(200).prev('h2').removeClass('active');
        checkElement.slideDown('normal').prev('h2').addClass('active');
        return false;
        }
      }
    );
  }
	

$(document).ready(function(){		
													 
	$(".aktualita > ul, .aktualita2 > ul").tabs({ fx: { opacity: 'toggle' } });
	$(".dietologove-content > ul").tabs({ fx: { height: 'toggle' } });
	$(".inner > ul").tabs({ fx: { height: 'toggle' } });
	
	$(".zobrazregistraci").toggle(function() {
		$('.registrace-form').slideDown("slow");
		$(this).html("REGISTRACE").addClass("obrat");
		return false;
	}, function() {
		$('.registrace-form').slideUp("slow");
		$(this).html("Pro urychlení dalších objednávek máte možnost se zaregistrovat <span>(nepovinné)</span>").removeClass("obrat");
		return false;
	});
	
	var width = $(".zobrazlogin").width();
	$(".login-form").css("width",width+ 30 + "px");
	
	$(".zobrazlogin").toggle(function() {
		$('.login').slideDown("slow");
		$(this).addClass("active");
		return false;
	}, function() {
		$('.login').slideUp("slow");
		$(this).removeClass("active");
		return false;
	});
	
	$(".nahledy a").hover(function() {
		$(".nahledy a").each(function() { $(this).removeClass("active"); });														 	
		$(this).addClass("active");
		var src = $(this).attr("name");
	/*	$("#detail").html('<img src="'+ src +'" alt="" />'); */
		$("#detail").html('<img src="images'+ src +'" alt="" />');
    $("#detail").html('<img src="images/'+ src +'" alt="" />');
		return false;
		}, function() {
	});
	
	$("a[rel^='fancybox']").fancybox({ 'zoomSpeedIn': 1000, 'zoomSpeedOut': 0, 'overlayShow': true });
														
	initMenu();

});