/**
 * Maxx News Slider and Slide Show (PHP-Fusion v6)
 * It slide five latest news
 * @author: anderson <http://sml2008.free.fr> <joeserpa@gmail.com>
 * @version 0.1.0
 * 
 * Release under the terms & conditions of v3 or higher
 * of the GNU General Public License. For details refer 
 * to the included gpl.txt file or visit http://gnu.org
 *
 */

	window.addEvent('domready',function(){
	
		var hs = new maxxSlide({
			box: $('maxx_box'),
			startItem: 1,
			items: $ES('h3','maxx_box'),
			size: 600,
			handles: $ES('span','handles'),
			buttons: {previous: $('prev'), play: $('play'), stop: $('stop'), playback: $('playback'), next: $('next') },
			onWalk: function(currentItem,currentHandle){
				//style for handles
				this.handles.extend(handles_more).removeClass('active');
				$$(currentHandle,handles_more[this.currentIndex]).addClass('active');
				//text for "previous" and "next" default buttons
				$('prev').setHTML('&lt;&lt; '+this.items[this.previousIndex].innerHTML);
				$('next').setHTML(this.items[this.nextIndex].innerHTML+' &gt;&gt;');
			}
		});
		//more "previous" and "next" buttons
		hs.addActionButtons('previous',$ES('.prev','maxx_box'));
		hs.addActionButtons('next',$ES('.next','maxx_box'));
		//more handle buttons
		var handles_more = $ES('span','handles_more');
		hs.addHandleButtons(handles_more);
		//
		hs.walk(0)

	});
