	
$(document).ready(function() {
	
	// Preload all rollovers
	$(".header_links img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace('_inactive.gif', '_over.gif');
		newImg = new Image(); // create new image obj
		$(newImg).attr("src", rollON); // set new obj's src
	});

	$(".nav_container img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace('_inactive.gif', '_over.gif');
		newImg = new Image(); // create new image obj
		$(newImg).attr("src", rollON); // set new obj's src
	});

	
	// Navigation rollovers
	$(".header_links a").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		
		if (typeof(imgsrc) != 'undefined') {
		imgsrcON = imgsrc.replace('_inactive.gif', '_over.gif');
		$(this).children("img").attr("src", imgsrcON);
		}
		
	});
	
	$(".nav_container a").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		
		if (typeof(imgsrc) != 'undefined') {
		imgsrcON = imgsrc.replace('_inactive.gif', '_over.gif');
		$(this).children("img").attr("src", imgsrcON);
		}
		
	});
	
	// Handle mouseout
	$(".header_links a").mouseout(function(){
		if (typeof(imgsrc) != 'undefined') {
		$(this).children("img").attr("src", imgsrc);
		}
	});

	$(".nav_container a").mouseout(function(){
		if (typeof(imgsrc) != 'undefined') {
		$(this).children("img").attr("src", imgsrc);
		}
	});

});

/*preloading */
if (document.images)
{
    close_over = new Image();
    close_over.src = "img/overlay/overlay_button_close_hov.gif";
    send_over = new Image();
    send_over.src = "img/form/form_button_send_hov.gif";

    btn_enjoy_retirement_over = new Image();
    btn_enjoy_retirement_over.src = "img/results/btn_enjoy_retirement_hov.gif";
    btn_protect_savings_over = new Image();
    btn_protect_savings_over.src = "img/results/btn_protect_savings_hov.gif";
    btn_save_for_retirement_over = new Image();
    btn_save_for_retirement_over.src = "img/results/btn_save_for_retirement_hov.gif";	
}