
window.addEvent("domready", function() {
console.log("start c")
	var Carousel = new iCarousel("slideShow", {
		idPrevious: "previous",
		idNext: "next",
		idToggle: "undefined",
		item: {
			klass: "item",
			size: 220
		},
		animation: {
			type: "scroll",
			duration: 1000,
			amount: 1
		}
	});

	slideshowInterval = setInterval(nextPicture,4000)	// スライドの速さ調節

	function nextPicture(){
		currentPicture++
		if(currentPicture>4){
			currentPicture=0
		}
		Carousel.goTo(currentPicture)
	}

	currentPicture=0
	$("thumb0").addEvent("click", function(event){
		new Event(event).stop();
		Carousel.goTo(0);
		currentPicture=0;
		clearInterval(slideshowInterval)
		}
	);
	$("thumb1").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(1);currentPicture=1;clearInterval(slideshowInterval)});
 	$("thumb2").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(2);currentPicture=2;clearInterval(slideshowInterval)});
 	$("thumb3").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(3);currentPicture=3;clearInterval(slideshowInterval)});
 	$("thumb4").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(4);currentPicture=4;clearInterval(slideshowInterval)});
 	$("thumb5").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(5);currentPicture=5;clearInterval(slideshowInterval)});

});
/**/
