	function mycarousel_initCallback(carousel)
	{
	    // Disable autoscrolling if the user clicks the prev or next button.
	    carousel.buttonNext.bind('click', function() {
	        carousel.startAuto(0);
	    });
	 
	    carousel.buttonPrev.bind('click', function() {
	        carousel.startAuto(0);
	    });
	 
	    // Pause autoscrolling if the user moves with the cursor over the clip.
	    carousel.clip.hover(function() {
	        carousel.stopAuto();
	    }, function() {
	        carousel.startAuto();
	    });
	};
	 
	jQuery(document).ready(function() {
	    jQuery('#mycarousel').jcarousel({
	        //auto: 3,
	        //wrap: 'last',
	        //initCallback: mycarousel_initCallback
	    });
	});	
	
	var currentPic = 0;
	var totalPic;
	var animDelay = 8; //nr sec
	function animatePic() {
		var nextPic;
		if(totalPic>1) {
			nextPic = currentPic+1;
			if(nextPic>=totalPic)
				nextPic = 0;
			
			$("#banner img:eq("+currentPic+")").fadeOut(1200, function() {
				$("#banner img:eq("+nextPic+")").fadeIn(1200, function() {
					currentPic = nextPic;
					setTimeout(function() {
						animatePic();
					},animDelay*1000);
				});
			});
		}
	}
	
	$(function(){
		$("a.lbox").lightBox();
		
		totalPic = $("#banner").find("img").length;
		setTimeout(function() {
			animatePic();
		},animDelay*1000);
	});
