window.onload = function() {
	//スクロール
	new SmoothScroll({
		duration: 1000,
		transition: Fx.Transitions.Back.easeInOut,
		fps: 70
	});
}

	//スライド
var SlideIn = {
  start: function () {
    var delay = 10;
    $$('h1').each(function (el) { 
      el.setStyles({
        'position': 'relative',
        'top': 200,
        'opacity': 0
      });
      var fx = el.effects({duration:1000, transition:Fx.Transitions.Bounce.easeOut});
      fx.start.delay(delay, fx, {
        'opacity': 1,
        'top': 0
      });
      delay += 200;
    });
  }
};
 
window.addEvent('load', SlideIn.start);

	//ギャラリー
window.addEvent("domready", function() {
	var Carousel = new iCarousel("content", {
		idPrevious: "previous",
		idNext: "next",
		idToggle: "undefined",
		item: {
			klass: "item",
			size: 400
		},
		animation: {
			type: "scroll",
			duration: 1000,
			amount: 1
		}
	});

	$("thumb0").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(0)});
	$("thumb1").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(1)});
	$("thumb2").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(2)});
	$("thumb3").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(3)});
	$("thumb4").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(4)});
	$("thumb5").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(5)});
	$("thumb6").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(6)});
	$("thumb7").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(7)});
	$("thumb8").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(8)});
	$("thumb9").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(9)});
	$("thumb10").addEvent("click", function(event){new Event(event).stop();Carousel.goTo(10)});
});

		//アコーディオン
window.addEvent("domready", function() {
var accordion = new Accordion('h4.atStart', 'div.atStart', {
	opacity: false,
	onActive: function(toggler, element){
		toggler.setStyle('color', '#ff3300');
	},
 
	onBackground: function(toggler, element){
		toggler.setStyle('color', '#222');
	}
}, $('accordion'));
});