var sampleObjectItems =[{title:'', text:'',imgmargin:''},{title:'', text:'',imgmargin:''},{title:'', text:'',imgmargin:''}];

window.addEvent('domready',function(){	
	
	//Center								
	var info = $('box').getNext();
	var hs = new noobSlide({
		mode: 'vertical',
		box: $('box'),
		items: sampleObjectItems,
		size: 400,
		interval: 5000,
		autoPlay: true,
		handles: $ES('div','handles'),
		handle_event: 'mouseenter',
		onWalk: function(currentItem,currentHandle){
			info.empty();
			new Element('p').setHTML(currentItem.text).inject(info);
			new Element('h4').setHTML(currentItem.title).inject(info);	
			new Element('img',{'src':'/image/VAFC/home/arrow.gif'}).setStyle('margin-left',currentItem.imgmargin+'px').inject(info);	
			this.handles.setStyle('background-color','#E2E4E6');
			currentHandle.setStyle('background-color', '#FFF');
		}
	});
	hs.next();
	hs.previous();

    //Left
	var hsleft = new noobSlide({
		box: $('boxleft'),
		items: [1,2,3],
		size: 326,
		handles: $ES('li.btn','handlesleft'),
		buttons: { },
		onWalk: function(currentItem,currentHandle){			
			this.handles.removeClass('active');
			currentHandle.addClass('active');
		}
	});
	//
	hsleft.walk(0)
	
	//Right
	var hsright = new noobSlide({
		box: $('boxright'),
		items: [1,2,3],
		size: 362,
		handles: $ES('li.btn','handlesright'),
		buttons: {},
		onWalk: function(currentItem,currentHandle){
				this.handles.removeClass('active');
				currentHandle.addClass('active');
		}
	});
	//
	hsright.walk(0)
	
	// Photos
	var hsslide = new noobSlide({
		box: $('boxslide'),
		items: [1,2,3,4,5,6,7,8],
		size: 308,
		onWalk: function(currentItem,currentHandle){
				hsslide.addActionButtons('previous',$ES('#prevslide','modulecontent'));
				hsslide.addActionButtons('next',$ES('#nextslide','modulecontent'));
				
			if (this.nextIndex == 7){
				hsslide.addActionButtons('stop',$ES('#nextslide','modulecontent'));
			}
			if (this.nextIndex ==1){
				hsslide.addActionButtons('stop',$ES('#prevslide','modulecontent'));
			}
		}
	});
	if (hsslide.nextIndex==null){
		hsslide.addActionButtons('stop',$ES('#prevslide','modulecontent'));
		hsslide.addActionButtons('next',$ES('#nextslide','modulecontent'));
	}
});
