jQuery().ready(function(){
	$(".on_off").mouseover(function()
	{
		var bactive = $(this).attr('name');
		$('.on_off').each(function(){

			if($(this).attr('name') != bactive) {
				this.src = this.src.replace("off", "on")
			}
		})
	});

	$(".on_off").mouseout(function()
	{
		$('.on_off').each(function(){

			this.src = this.src.replace("on", "off")

		})
	});

	$(".off_on").mouseover(function()
	{
		this.src = this.src.replace("on", "off")

	});

	$(".off_on").mouseout(function()
	{
		this.src = this.src.replace("off", "on")
	});

	$("#career_ladder_list a").click(function(event){
		var bactive = $(this).attr('class');
		var bg_image = 'url(/images/' + bactive + '.gif)';


		$("#career_ladder_list a").each(function(){

			if($(this).attr('class') != bactive) {
				$(this).fadeTo("slow", 0.2);
			} else {
				$(this).fadeTo("slow", 1);
				$("#career_ladder_text div").fadeOut(1);
				setTimeout("fadeTextIn('"+bactive+"')", 200);
			}

		})
		$("#career_ladder_images").css('backgroundImage',bg_image) ;

	   	event.preventDefault();

	  // $(this).hide("slow");
	  return false;
	});

	$("#career_ladder_list a").mouseover(function(event){
		var bactive = $(this).attr('class');

		$("#career_ladder_list a").each(function(){

			if($(this).attr('class') != bactive) {
				$(this).fadeTo(1, 0.2);
			} else {
				$(this).fadeTo(1, 1);
			}

		})
	   event.preventDefault();
	  // $(this).hide("slow");
	 // return false;
	});

	$('ul#nav_list li a.submit').click(function(){
		var sUrl = $(this).attr('href');
		if( sUrl.indexOf('mailto:') < 0 )
		{
			window.open(sUrl.replace(/&amp;/g,'&'),"cva","width=529,height=435");
			return false;
		}
	});

});

function fadeTextIn(bactive) {
	$("#career_ladder_" + bactive + "_text div").css('display','block');
	$("#career_ladder_" + bactive + "_text").fadeIn("slow");
}