$j(document).ready(function(){
	function formatText(index, panel) {
		return index + "";
	}	
	
	$j(function () {
		$j('.anythingSlider').anythingSlider({
			easing: "easeInOutBack", 
			autoPlay: true, 
			delay: 9000, 
			startStopped: false, 
			animationTime: 1000,  
			hashTags: true,  
			buildNavigation: true, 
			pauseOnHover: true,  
			startText: "Iniciar",  
			stopText: "Parar", 
			navigationFormatter: formatText  
		});

		$j("#slide-jump").click(function(){
			$j('.anythingSlider').anythingSlider(6);
		});
	});

			

	function sfas(){n=++n<maxN?n:0

		$j('.module_banners .boxIndent')
		.stop()
		.animate({left:-step*n}, 1200 , "easeOutBack")};
		var n=0,
		maxN=5,
		step=240,
		timer=setInterval(sfas,7000)
		$j('.next').click(function(){
			n=++n<maxN?n:0
			$j('.module_banners .boxIndent')
				.stop()
				.animate({ left:-step*n }, 1200 , "easeOutBack")
				clearInterval(timer); return false;
				timer=setInterval(sfas,7000)
		});

		$j('.prev').click(function(){
			n=--n>=0?n:maxN-1
			$j('.module_banners .boxIndent')
			.stop()
			.animate({ left:-step*n }, 1200 , "easeOutBack")
			clearInterval(timer);  return false;
			timer=setInterval(sfas,7000)
		});
		$j('.module_banners .boxIndent').hover(function(){clearInterval(timer)},function(){timer=setInterval(sfas,7000)});
});

	preloadImages([
		'images/next-active.png',
		'images/prev-active.png',
		'images/top-menu-active.gif',
		'images/search-button-active.png',
		'images/button-active.png',
		'images/button1-active.png',
		'images/button1.png',
		'images/button2-active.png',
		'images/Parent-point-active.png',
		'images/arrowUp-active.png',
		'images/arrowDown-active.png'
	]);
