window.addEvent('domready', function() {
	var header = $$('h1')[0];
	
	var sunAnchor = header.getFirst();
	var headerDiv = new Element('div', {'class': 'logo'});
	var headerInnerDiv = new Element('div', {style: 'position: absolute;'});
	headerInnerDiv.inject(headerDiv);
	
	var cloudAnchor = sunAnchor.clone();
	(new Element('img', {src: SITE_URI + '/images/AUCC-cloud.png', width: 394, alt: 'AUCC', style: 'left: -62px;'})).replaces(cloudAnchor.getFirst());
	var cloudDiv = new Element('div');
	cloudAnchor.inject(cloudDiv);
	cloudDiv.inject(headerInnerDiv);
	
	var sunDiv = new Element('div').set('opacity', 0);
	sunAnchor.inject(sunDiv);
	sunDiv.inject(headerInnerDiv);
	
	// Need to prep images with IEs old Alpha loader, 'cos for some reason the alpha filter doesn't work on PNGs without.
	// I don't even…
	// retards.
	// Still looks a bit funny. I don't think it multiplies the alphas, just uses the lowest one or something.
	if (Browser.ie) {
		[sunAnchor.getFirst(), cloudAnchor.getFirst()].each(function(img) {
			img.setStyle('filter', 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + img.get('src') + ',sizingMethod="scale")');
		});
	}
	
	headerDiv.replaces(header);
	
	setTimeout(function() {
		sunDiv.fade('in');
		cloudDiv.fade('out');
	}, 3000);
});

