$(document).ready(function()
{
	var count = 1;
	
	for(var i = 1; i < $('#navUL > li').size(); i++)
	{
		$('#navUL > li').eq(i).find(">:first-child").click(function()
		{
			//alert(this.getAttribute('id'))
			count = this.getAttribute('id').split("_")[1];
			$('#mover').animate({left: '0'},200,function(){});
			$('#mover').animate({bottom: this.getAttribute('id').split("_")[1] * 360},200,function(){});
			$('#moveInfo').animate({left: -1 * (Number(count) * 140)},200,function(){});
		});
	}
	
	//$('#rt img').hide();
	//$('#lt img').hide();
	
	
	$('#rt').mouseover(function() 
	{
		//$('#rt img').show();
		$("#rt").addClass('button-bar');
	});
	
	$('#rt').mouseout(function() 
	{
		//$('#rt img').hide();
		$("#rt").removeClass('button-bar');
	});
	
	$("#rt").click(function()
	{
		if($('#mover').css('left').split("px")[0] > (($('#mover > div').eq(count).css('width').split("px")[0] - 620) * -1) )
		{
			$('#mover').animate({left: '-=620'},200,function(){});
		}
	});
	
	$('#lt').mouseover(function() 
	{
		//$('#lt img').show();
		$("#lt").addClass('button-bar');
	});
	
	$('#lt').mouseout(function() 
	{
		//$('#lt img').hide();
		$("#lt").removeClass('button-bar');
	});
	
	$("#lt").click(function()
	{	
		//alert($('#mover').css('left'));
		if($('#mover').css('left').split("px")[0] < 0)
		{
			$('#mover').animate({left: '+=620'},200,function(){});
		}
	});
		
});

