window.addEvent('domready', function(){
	var showDuration = 7000; 
	var animation_type = 'pow' ;
	// Pre-defined Animation Styles ===================================== [ DO NOT EDIT ] ===========
	if(animation_type=='pow'){
		animation_type = 'pow:in' ;
		scrollDuration = 1000 ;
	} else if (animation_type=='bounce'){
		animation_type = 'bounce:out' ;
		scrollDuration = 600 ;
	} else if (animation_type=='basic'){
		animation_type = 'linear' ;
		scrollDuration = 800 ;
	}
	var mooshows = $$('.mooshow') ;
	var i = 0 ;
	mooshows.each(function(each_show){
		var items = each_show.getElements('img') ;
		var index = 0; 
		var width = items[0].getSize().x; 
		each_show.innerHTML = '<div id="mooshow_inner'+i+'" class="mooshow_inner" >' + each_show.innerHTML + '</div>' ;
		$('mooshow_inner'+i).setStyles({'position':'absolute','width':width * items.length}) ;
		/* action func */ 
		var move = function() { 
			each_show.getElement('div').set('tween',{ 
			duration: scrollDuration,
			transition: animation_type,
				onComplete: function() { 
					if(index == items.length - 1) { 
						index = 0 - 1; 
					}
				}
			}).tween('left',0 - (++index * width)); 
		}; 
		var alreadyRun = false;
		if(alreadyRun!=true){
			alreadyRun = true ;
			move.periodical(showDuration) ; 
		}
		i++ ;
	});
	
});
