$(function() {
    $("#slides").jCarouselLite({
        btnNext: ".nextImg",
        btnPrev: ".prevImg",
		speed: 1000,
		visible: 5,
		circular: false
    });
	var $images = $("#slides li");
	$("#text_block").hide();
	$("#imgNav").hide();
	$(".prevImg").css('opacity', 0).addClass('disabled');
	if ($images.length < 6) {
		$(".nextImg").css('opacity', 0).addClass('disabled');	
	}
	$("#block2").hide();
	$block = 1;
	for (i=1; i< ($images.length+1); i++) {
		$("#image"+i).hide();
	}
});

$(document).ready(function(){
	$("#imgNav").customFadeIn("slow", function() {$("#image1").customFadeIn("slow", function() {$("#image2").customFadeIn("slow", function () {$("#image3").customFadeIn("slow", function () {$("#image4").customFadeIn("slow", function () {$("#image5").customFadeIn("slow", function () {
								for (i=6; i< ($("#slides li").length+1); i++) {
									$("#image"+i).show();
								} }); }); }); }); });	});			

	$(".next").click(function () {						  
		$("#block"+$block).hide();
		$block++;
		$("#block"+$block).customFadeIn("fast");
		
    });
	$(".prev").click(function () {						  
		$("#block"+$block).hide();
		$block--;
		$("#block"+$block).customFadeIn("fast");
		
    });
});