$(document).ready(function(){
		
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	$("a").click(function(){
		$(this).blur();
	});
	
});

	// open all external links in new windows
	$(document).ready(function(){$("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");}); 


	// THE SUPER-GRINGOIDE-SLIDESHOW	
	function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
    : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
    .addClass('active')
    .animate({opacity: 1.0}, 1500, function() {
    $active.removeClass('active last-active');
    });
	}

	
	$(function() {
    setInterval( "slideSwitch()", 6000 );
	});


/* FadeIn */

$(function() {
	$('img.gringo').each(function() {
	$(this).load(function(){
	$(this).fadeIn("slow");
	});
	});
	});

