window.addEvent('domready', function() {
	
	

	$('header-image1').setOpacity(1);
	$('header-image2').setOpacity(0);
	
	showHeaderGraphic(1);

});

function showHeaderGraphic(whichOne){
	var fade = 1500;
	var wait = 6000;
	
    if(whichOne == 1){
        active = "header-image1";
        inactive = "header-image2";
    }else{
        active = "header-image2";
        inactive = "header-image1";
    }
	
    $(active).fx = new Fx.Tween( active, {duration: fade});
	$(inactive).fx = new Fx.Tween( inactive, {duration: fade});

	$(active).fx.start("opacity", 0);
	$(inactive).fx.start("opacity", 1).wait(wait).chain( function() { showHeaderGraphic( whichOne*-1); });
}