jQuery.preloadImages = function()
{
	for(var i = 0; i<arguments.length; i++)
	{
		jQuery("<img>").attr("src", arguments[i]);
	}
}

// Preload images
$.preloadImages(
	"images/topright/contacts_over.gif", 
	"images/topright/faqs_over.gif",
	"images/topright/home_over.gif",
	"images/topright/i9p_over.gif",
	"images/topright/mailto_over.gif",
	"images/topright/sitemap_over.gif"
);


$(document).ready(function() 
{
	// Switch images on hover
	$("IMG.rollover").hover(function()
	{
		this.src = this.src.replace(/\.(gif|png|jpg)$/, "_over.$1");
	},
	function()
	{
		this.src = this.src.replace(/_over\.(gif|png|jpg)$/, ".$1");
	});
	
	// inner fade news
	$("DIV.newsdiv DIV.contentsection UL").innerfade({
		animationtype: 'fade', speed: 'slow', timeout: 4000, type: 'sequence', containerheight: 'auto'
	});
});
