var about_o = new Image(); about_o.src = "images/nav-about_r.gif";
var programs_o = new Image(); programs_o.src = "images/nav-programs_r.gif";
var activities_o = new Image(); activities_o.src = "images/nav-activities_r.gif";
var publications_o = new Image(); publications_o.src = "images/nav-publications_r.gif";
var contact_o = new Image(); contact_o.src = "images/nav-contact_r.gif";
var navtmp, navabouttmp;

$(document).ready(function() {									 
	$(".nav").mouseover(function(){navtmp = false; if($(this).children("a").children("img").attr("src").lastIndexOf("_r.gif")==-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf(".gif"));tmpsrc = tmpsrc + "_r.gif";$(this).children("a").children("img").attr("src", tmpsrc);}else{navtmp = true;}$(".nav").not(".active").css({'background' : '#5e88a2', 'color':'#fff'});$(this).css({'background' : '#ba2f2f'});}).mouseout(function(){if(!navtmp && $(this).children("a").children("img").attr("src").lastIndexOf("_r.gif")!=-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r.gif"));tmpsrc = tmpsrc + ".gif"; $(this).not(".active").children("a").children("img").attr("src", tmpsrc);}$(".nav").not(".active").css({'background' : '#5e88a2', 'color':'#73655e'});});
	$("#nav_about a").mouseover(function(){$(".nav_about a").css({'background' : '#5e88a2', 'color':'#fff'});$(this).css({'background' : '#ba2f2f'});}).mouseout(function(){$(".nav_about a").css({'background' : 'none', 'color':'#73655e'});});
	$("#nav_about1 a").mouseover(function(){navabouttmp = true; if($("#nav1").children("a").children("img").attr("src").lastIndexOf("_r.gif")==-1){var tmpsrc = $("#nav1").children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf(".gif"));tmpsrc = tmpsrc + "_r.gif"; $("#nav1").children("a").children("img").attr("src", tmpsrc);}$(".nav_about1 a").css({'background' : '#5e88a2', 'color':'#fff'});$(this).css({'background' : '#ba2f2f'});$(this).parent().css({'margin-right' : '-1.5em'});}).mouseout(function(){navabouttmp = false; setTimeout('if(!navabouttmp){if($("#nav1").children("a").children("img").attr("src").lastIndexOf("_r.gif")!=-1){var tmpsrc = $("#nav1").children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r.gif"));tmpsrc = tmpsrc + ".gif"; $("#nav1").children("a").children("img").attr("src", tmpsrc);}}',50); $(".nav_about1 a").css({'background' : '#5e88a2', 'color':'#fff'});$(this).parent().css({'margin-right' : '0'});});
	$("#navSupport").mouseover(function(){if($(this).children("a").children("img").attr("src").lastIndexOf("_r_o.gif")==-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r.gif"));tmpsrc = tmpsrc + "_r_o.gif"; $(this).children("a").children("img").attr("src", tmpsrc);}}).mouseout(function(){if($(this).children("a").children("img").attr("src").lastIndexOf("_r_o.gif")!=-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r_o.gif"));tmpsrc = tmpsrc + "_r.gif"; $(this).not(".active").children("a").children("img").attr("src", tmpsrc);}});

$("#navSupporthome").mouseover(function(){if($(this).children("a").children("img").attr("src").lastIndexOf("_r_o.gif")==-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r.gif"));tmpsrc = tmpsrc + "_r_o.gif"; $(this).children("a").children("img").attr("src", tmpsrc);}}).mouseout(function(){if($(this).children("a").children("img").attr("src").lastIndexOf("_r_o.gif")!=-1){var tmpsrc = $(this).children("a").children("img").attr("src");tmpsrc = tmpsrc.substring(0, tmpsrc.indexOf("_r_o.gif"));tmpsrc = tmpsrc + "_r.gif"; $(this).not(".active").children("a").children("img").attr("src", tmpsrc);}});
});