// JavaScript Document


		jQuery().ready(function(){
			// simple accordion
	jQuery('#list1a').accordion(); 
	jQuery('#list1b').accordion({ 
		header: 'a.title',
		autoheight: false 
	});
			
		
			
			// bind to change event of select to control first and seconds accordion
			// similar to tab's plugin triggerTab(), without an extra method
			var accordions = jQuery('#list1a, #list1b, #list2, #list3, #navigation, #wizard');
			
			jQuery('#switch select').change(function() {
				accordions.accordion("activate", this.selectedIndex-1 );
			});
			jQuery('#close').click(function() {
				accordions.accordion("activate", -1);
			});
			jQuery('#switch2').change(function() {
				accordions.accordion("activate", this.value);
			});
			jQuery('#enable').click(function() {
				accordions.accordion("enable");
			});
			jQuery('#disable').click(function() {
				accordions.accordion("disable");
			});
			jQuery('#remove').click(function() {
				accordions.accordion("destroy");
				wizardButtons.unbind("click");
			});
		});



	window.addEvent('domready',function(){


			//SAMPLE 3 (play, stop, playback)
		var nS3 = new noobSlide({
			box: $('box3'),
			items: $$('#box3 span'),
			//items: [0,1,2,3,4,5,6,7],
			interval: 5000,
			//startItem: 0,
			autoPlay: true,
			addButtons: {
				playback: $('playback3'),
				stop: $('stop3'),
				play: $('play3')
			}
		});

	//SAMPLE 8
		var handles8_more = $$('#handles8_more span');
		var nS8 = new noobSlide({
			box: $('box8'),
			items: $$('#box8 div'),
			size: 240,
			interval: 5000,
			autoPlay: true,
			handles: $$('#handles8 span'),
			addButtons: {play: $('play8'), stop: $('stop8'), playback: $('playback8') },
			onWalk: function(currentItem,currentHandle){
				//style for handles
				$$(this.handles,handles8_more).removeClass('active');
				$$(currentHandle,handles8_more[this.currentIndex]).addClass('active');
				
			}
		});
		//more "previous" and "next" buttons
		nS8.addActionButtons('previous',$$('#box8 .prev'));
		nS8.addActionButtons('next',$$('#box8 .next'));
		//more handle buttons
		nS8.addHandleButtons(handles8_more);
		//walk to item 3 witouth fx
		nS8.walk(0,false,true);


	});
