function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		var relvalue = anchor.getAttribute("rel");
		if (anchor.getAttribute("href")) {
			var external = /external/;
			var relvalue = anchor.getAttribute("rel");
			if (external.test(relvalue)) { anchor.target = "_blank"; }
		}
	}
}

function AnimaAereo() {
$('#aereo').animate({
	"left": '-=1400px',
	"top": '-=450px'
	}, 8000, function() {
		$('#aereo').css('left', '990px');
		$('#aereo').css('top', '258px');
		setTimeout('AnimaAereo()', 10000);
	});
}

var clock = new clock();

function remove_three(node) {
	if (node && node.firstChild) {
		while(node.firstChild) {
			remove_three(node.firstChild)
			node.removeChild(node.firstChild)
		}
	} 
	return;
}

$(document).ready(function() {
	AnimaAereo();

	$('#headerimgs').innerfade({   
        speed: 5000,   
        timeout: 10000,   
        type: 'sequence',   
        containerheight: '258px'  
    });

	startClock(clock);

	externalLinks();
});
