$(document).ready(function(){
		
		$('.arriba_button').click(function () { 
		  window.scrollTo(0,0);
		  return false;
		});
		
		$('#nav li').hover(function(){
		  $(this).find('div').show();
		},function(){
		  $(this).find('div').hide();
		});
		
		$('.list_products_photos li').hover(function(){
		  $(this).find('div').addClass('hover');
		},function(){
		  $(this).find('div').removeClass('hover');
		});
		
		$('.list_download h3').toggle(
		  function () {
			$(this).parent('li').find('.more_download').show();
			$(this).parent('li').find('h3 a').addClass('on');
			return false;
		  },
		  function () {
			$(this).parent('li').find('.more_download').hide();
			$(this).parent('li').find('h3 a').removeClass('on');
			return false;
		  }
		);
		
		/*$('.list_download h3').click(function () { 
			 if( $('.download_item').css('display') == 'block' ){
			  $('.download_item').hide();
			  return false;
			}

		});*/
		
		$('.list_download h3').click(function () {
			$('.download_item:visible').hide();
		});
		
		$('.sub_list li .first_level').click(function () { 
			 if( $(this).parent('li').find('.download_item').css('display') == 'none' ){
			  $(this).parent('li').find('.download_item').show();
			  return false;
			} else {
			  $(this).parent('li').find('.download_item').hide();
			  return false;
			}
		});
		
		$('.first_level').click(function () { 
			 if( $(this).parent('li').find('.download_item').css('display') == 'none' ){
			  $(this).parent('li').find('.download_item').show();
			  return false;
			} else {
			  $(this).parent('li').find('.download_item').hide();
			  return false;
			}
		});
		
		$('.onlyLi h3').each(function () { 
			$(this).click(function(){
				if( $(this).parent('li').find('.download_item_aux').css('display') == 'none' ){
					$(this).parent('li').find('.download_item_aux').show();
					return false;
				} else {
				  	$(this).parent('li').find('.download_item_aux').hide();
				  	return false;
				}
			});
		});
		
		$('.liNew a').each(function () { 
			$(this).click(function(){
				if( $(this).parent('li').find('.download_item_aux').css('display') == 'none' ){
					$(this).parent('li').find('.download_item_aux').show();
					return false;
				} else {
				  	$(this).parent('li').find('.download_item_aux').hide();
				  	return false;
				}
			});
		});
		
		$('.list_spec a.t').each(function () { 
			$(this).click(function(){
				if( $(this).parent('li').find('.download_item').css('display') == 'none' ){
					$(this).parent('li').find('.download_item').show();
					return false;
				} else {
				  	$(this).parent('li').find('.download_item').hide();
				  	return false;
				}
			});
		});
		
		$('.list_0 a.f').each(function () { 
			$(this).click(function(){
				if( $(this).parent('li').find('.list_spec').css('display') == 'none' ){
					$(this).parent('li').find('.list_spec').show();
					return false;
				} else {
				  	$(this).parent('li').find('.list_spec').hide();
				  	return false;
				}
			});
		});
		
		$('.list_eas a.hook').each(function () { 
			$(this).click(function(){
				if( $(this).parent('li').find('.download_item').css('display') == 'none' ){
					$(this).parent('li').find('.download_item').show();
					return false;
				} else {
				  	$(this).parent('li').find('.download_item').hide();
				  	return false;
				}
			});
		});
		
	});

