$(function() { 


	$(".inner_jugadores ul li").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); 
		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	
	
	$(".botonentrar").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); 
		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.linkentrar").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	
	
	
	$(".next").click(function() { //On hover...
		
		if($(".inner_jugadores ul").position().left <= 0 && $(".inner_jugadores ul").position().left >= -576 ) {
			$(".inner_jugadores ul").stop();
			$(".inner_jugadores ul").animate({left: '-=64'}, 50);
			
			
			}
});

	$(".prev").click(function() { //On hover...
	if($(".inner_jugadores ul").position().left >=-768 && $(".inner_jugadores ul").position().left <=-64){
		$(".inner_jugadores ul").stop();
		$(".inner_jugadores ul").animate({left: '+=64'}, 50);
		}
	
});
	
	 
});
