$(document).ready(function(){
	$('img[@src$=.png], div#planet').ifixpng();
	
	// preload images
	// adapted from http://www.mattfarina.com/2007/02/01/preloading_images_with_jquery
	jQuery.preloadImages = function() {
		for(var i = 0; i<arguments.length; i++) {
			jQuery("<img>").attr("src", arguments[i]);
		}
	}
	
	 // preload menu images
	$("#nav a img").load(function() {
		$.preloadImages($(this).attr("src").replace("up", "over"));
	});
	// rollovers
	$("#nav a img").hover(function(){
		$(this).attr("src", $(this).attr("src").replace("out", "over"));
		return false;
	},function(){
		$(this).attr("src", $(this).attr("src").replace("over", "out"));
		return false;
	});
});