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

$(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");
    });
});
