// JavaScript Document$(document).ready(function(){








$(document).ready(function(){
						 
						 
			$("#menu_horizontal").slideDown('')
													
						 
						 
						 
						 
	
	$('.opcao').mouseover(function(){
								   
								   
				$('.anos').slideUp('slow')				   
								   
								   })
				 
						 
	
	$('.photos').mouseover(function(){
	
	$('.anos').slideDown('slow')
	
	
	})
	
	$('.item').mouseover(function(){
	
	$('.anos').slideUp('slow')
	
	
	})
						 
				
				// inicio id menu
				
		
				
				
$(".item_menu a").live('click',function(){
								 
								 
	cat = $(this).attr("rel")	
	
	
	
		$.ajax({
				type:"GET",
				url:"produtos1.php",
				data:{id_categ:cat},
				success: function(atual){
						
						
					$(".entrada").hide('')
					
					
					$("#ajax_conteudo").html(atual)

				
					$("#ajax_conteudo").fadeIn('slow')
					$(".entrada").hide('')
					
					$(".meio").css({'background-image' : 'none'})
					
				
					
					
				}
			})
		
		
		 
		
			$.ajax({
				type:"GET",
				url:"produtos1_pag.php",
				data:{id_categ:cat},
				success: function(pag){
					$("#paginacao").html(pag)
					
				}
			})
		
		
		
		
	//fim id menu
	
	return false
								 
								 
	})



$(".page").live('click',function(){
			
			
			id = $(this).attr("rel")	
					
				//	alert(id)
	
	
			$.ajax({
				type:"GET",
				url:"produtos1.php",
				data:""+id,
				success: function(atual){
					$("#ajax_conteudo").html(atual)
					
				}
			})
			
		
			
			$.ajax({
				type:"GET",
				url:"produtos1_pag.php",
				data:""+id,
				success: function(atual){
					$("#paginacao").html(atual)
					
				}
			})
			
		
			
		
		
		return false				
						
						})





$(".add a").live('click',function(){
								 
								 
	id_p= $(this).attr("rel")	
	
	
	//alert(id_p)
	
	$.ajax({
				type:"GET",
				url:"cart.php",
				data:{id_p:id_p,acao:"mais"},
				success: function(atual){
					$(".carrinho").html(atual)
					
				}
			})
		
	
		return false
	
	})	


$(".txtqtd").live("click",function(){
					
					$(this).blur(function(){
								 
	id= $(this).attr("id")	
	qtd= $(this).val()	


	$.ajax({
				type:"GET",
				url:"cart.php",
				data:{id_p:id,qtd:qtd,acao:"up"},
				success: function(atual){
					$(".carrinho").html(atual)
					
				}
			})
	
										  })
		return false
		
	})	





$(".photo a").live('click',function(){
								 
								 
	id= $(this).attr("rel")	
	
	
	//alert(id)
	
	
	$.ajax({
				type:"GET",
				url:"detailles.php",
				data:{id:id},
				success: function(atual){
					
					$(".3_derniers").hide('')
					$(".esquerda").html(atual)
						
						
					
					
				
					
					
					
				}
			})
		
	
		return false
	
	})	




		


		$(".remover a").live('click',function(){
								 
								 
	id_p= $(this).attr("rel")	
	//alert(id)
	
	
	
				$.ajax({
				type:"GET",
				url:"cart.php",
				data:{id_p:id_p,acao:"menos"},
				success: function(atual){
					$("#div_carrinho").html(atual)
					
				}
			})

		return false
	
	})	
		



//inicio menu dinamico

	$(".menu .dinamico a").live('click',function(){
								 
								 
	id_p = $(this).attr("rel")	
	

	
		
	
		$.ajax({
				type:"GET",
				url:"new_conteudo.php",
				data:{id_p:id_p},
				success: function(atual){
					
					
					$("#conteudo_menu").show()
					$("#conteudo_menu").html(atual)
					$(".container_detalhes").animate({opacity:0.9})
					
					
					
				}
			})
		
	
		
		
	
		return false
		
		})
	
	
	


$("#close").live('click',function(){
								 


		$(".container_detalhes").fadeOut('slow')
		
})
	
	
	





//fim home



//inicio menu dock

	$(".dock-container .dock_rel a").live('click',function(){
								 
								 
	cat = $(this).attr("rel")	

	
	

$("#container").fadeIn('slow')
	
		
	
		
	
		$.ajax({
				type:"GET",
				url:"produtos1.php",
				data:{id_categ:cat},
				success: function(atual){
					$("#ajax_conteudo").html(atual)
					
				}
			})
		
		
		 
		
			$.ajax({
				type:"GET",
				url:"produtos1_pag.php",
				data:{id_categ:cat},
				success: function(pag){
					$("#paginacao").html(pag)
					
				}
			})
		
		
	
		return false
		
		})
	
	
	
	//fim menu dock
	

							 
	});




/*
setInterval ( "torre1()", 4000 );

function torre1 ( )
{
		$(".meio").css({'background-image' : 'url(brinquedo1.png)' , 'background-repeat' : 'no-repeat' , 'background-position' :'top'})
		
		
		
}*/
