$(document).ready(function (){
							
	$(function(){
		$('#rightItems a')
		.css( {backgroundPosition: "0 45"} )

		.mouseover(function(){
		$(this).stop().animate({backgroundPosition:"(0 35)"}, {duration:300})
		})
		.mouseout(function(){
		$(this).stop().animate({backgroundPosition:"(0 45)"}, {duration:300, complete:function(){
		$(this).css({backgroundPosition: "0 35"})
		}})
		
		});	
	});

	$(function (){
		$("#rightItems a").fadeTo("slow", 0.5);
		/*$("#rightItems a").hover(function(){
		$(this).fadeTo("fast", 0.9);
		},function(){
		$(this).fadeTo("slow", 0.5);
		});*/
	})
	
	$("#categories a img").fadeTo("slow", 1.0); // This sets the opacity of the thumbs to fade down to 60% when the page loads
	$("#categories a img").hover(function(){
	$(this).fadeTo("fast", 0.6); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("slow", 1.0); // This should set the opacity back to 60% on mouseout
	});

	$("#ocultarCategorias").click(function (evento){
		evento.preventDefault();
		$("#categories").slideUp('slow', function (){
		$("#ocultarCategorias").fadeOut('slow', function (){
		$("#mostrarCategorias").fadeIn('slow');
			});
		});
	});
	
	$("#mostrarCategorias").click(function (evento){
	evento.preventDefault();
	$("#categories").slideDown('slow', function (){
	$("#mostrarCategorias").fadeOut('slow', function (){
	$("#ocultarCategorias").fadeIn('slow');
			});
		});
	});
	
})					


jQuery(document).ready(function(){
  jQuery('a[href*=#]').click(function() {
  var name = jQuery(this).attr('href');
  var no = new Array ('#otro', '#otro');
  var  total = no.length;
  var velocidad = 2000;
 
  for (i=0;i<=total;i++) {
	   if(no[i] == name){
	   return false;
  		}
	} 
 
 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
 && location.hostname == this.hostname) {
   var target = jQuery(this.hash);
   target = target.length && target
 
   || jQuery('[name=' + this.hash.slice(1) +']');
   if (target.length) {
  var targetOffset = target.offset().top;
  jQuery('html,body')
  .animate({scrollTop: targetOffset}, velocidad);
    return false;
   }}
  });
});