// MFB JavaScript Document

$(document).ready(function(){

	// png fixes
	$('img[@src$=.png]').pngfix();
	
	
	/*$(".panelB").hide();
	$(".panelC").hide();
	$(".panelB").fadeIn(700,function(){
		$(".panelC").fadeIn(500);		
	});*/
	
	$(".twoColLayout .panelC").fadeIn(500);		

	// button hover
	$(".transparentHover").mouseover(function(){$(this).css({opacity: ".65"})});
	$(".transparentHover").mouseout(function(){$(this).css({opacity: "1"})});	

	// nav hover
	$("#mainNav>ul>li").mouseover(function(){
		$(this).addClass("sfhover");
	});
	$("#mainNav>ul>li").mouseout(function(){
		$(this).removeClass("sfhover");
	});

	
	// home tabs
	$('#homeTabs').tabs({ fxFade: true, fxSpeed: 'fast' });
	$('#homeTabs//h3').hide();	
	
	
	// accordian menu
	// un-comment this if you want the 1st item to expand
	//$('.rightNav li:first').addClass('on');
	$('.rightNav>li').each(function(){
		$(this).click(function(){
			$('.rightNav//ul').hide(150);
			$('ul',this).show(300);
			$('.rightNav li').removeClass('on');
			$(this).addClass('on');
		});
	});
	
	//home info
	$('#newsAlerts').jScrollPane({showArrows:true,scrollbarWidth:17, scrollbarMargin:10});
	
	// item list hover
	$('.imageItem,.newsItem').click(function(){
		window.location.href=""+$('a:first',this).attr('href')+""
	});
	$(".imageItem,.newsItem").hover(
		function(){$(this).addClass('hover')},
		function(){$(this).removeClass('hover')}
	);
	
	
	// map stuff
	$('.instructionsPopOut').css({opacity:0});
	$('.instructionsLink').hover(function(){
		$('.instructionsPopOut').animate({height: 146, opacity: .9},200)
	},function(){
		$('.instructionsPopOut').animate({height: 1, opacity: 0},300)
	});

	$('.instructionsLink').click(function(){return false});
		
});









