function onBefore(curr, next, opts) {
	var index = opts.currSlide;
	var total = opts.slideCount;
	if(index == 2 && index != total-1)  {
		$("#menuTop, #menuHome, #offersHome").hide();
		$("#lineBottomHome").show();
		$("#endLink").show();
	}
}

function onAfter(curr, next, opts) {
	var index = opts.currSlide;
	var total = opts.slideCount;
	//alert(index+" AFTER");
	if(index == total-1)  {
		$('#slideshow').cycle('pause');
		$("#menuTop, #menuHome, #offersHome").fadeIn(100);
		$("#lineBottomHome").hide();
		$(".inner-slideshow").cycle('resume');
		$("#endLink").hide();
	}else{
		$('#slideshow').cycle('resume'); 
		$("#menuTop, #menuHome, #offersHome").hide();
		$("#lineBottomHome").show();
		$(".inner-slideshow").cycle('pause');
		$("#endLink").show();
	}
}

function onAfterNews(curr, next, opts) {
    var index = opts.currSlide;
	var total = opts.slideCount;
	
	$('#prevNews, #nextNews').removeClass("hide");
    if(index == 0) $('#prevNews').addClass("hide");
	if(index == total - 1)  $('#nextNews').addClass("hide");
	
	$("#paginSlides .currentSlides").html(index+1);
	$("#paginSlides .totalSlides").html(total);
	
}

function onAfterRecipes(curr, next, opts) {
    var index = opts.currSlide;
	var total = opts.slideCount;
	
	$('#prevRecipes, #nextRecipes').removeClass("hide");
    if(index == 0) $('#prevRecipes').addClass("hide");
	if(index == total - 1)  $('#nextRecipes').addClass("hide");
	
	$("#paginSlidesR .currentSlides").html(index+1);
	$("#paginSlidesR .totalSlides").html(total);
	
}

function onAfterPress(curr, next, opts) {

	var index = opts.currSlide;
	var total = opts.slideCount;
	
	$('#prevPress, #nextPress').removeClass("hide");
    if(index == 0) $('#prevPress').addClass("hide");
	if(index == total - 1)  $('#nextPress').addClass("hide");
	
	$("#paginSlidesP .currentSlides").html(index+1);
	$("#paginSlidesP .totalSlides").html(total);
	
	$(".pressItem .pressInfo .dLong").hide();
	$(".pressItem .pressInfo .dShort").show();
	$(".pressItem .pressInfo a em").each(function(){
		$(this).html($(this).parent().attr("name"));											  
	});
	
	var hPress =  0;
	$("#slideshowPress .slidePress").each(function(){
		if($(this).height() > hPress) hPress = $(this).height();
	});
	
	$("#slideshowPress .slidePress").each(function(){
		$(this).parent().height(hPress);
	});

}

function hideAboutZoom (){
	$(".aboutDetail").hide();
	$(".aboutHelp").show();
	return false;
}
