// 2010.06.20 - For Central Florida Behavioral Health Network
// Grendelfly - A Division of SC&G Technology Solutions
//
// Requires JQuery: jquery-1.3.2.min.js or above



$(function(){
$(document).ready(function() {

// Header Rotator
// Fade in first image
var target = '#idHd_Wrp div.hero img'
var pnl = 0;
var lng = $(target).length;
var fTimer = setInterval(function(){fRotate()}, 5000); // timed at 5 seconds per rotation

$(target).each( function(x,e){
	if(x == pnl){ $(e).fadeIn(800) };
	});
						
function fRotate(){
	pnl++; if(pnl == lng){pnl = 0};
	$(target).fadeOut(1800);
	$(target).each( function(x,e){
		if(x == pnl){ $(e).fadeIn(1800) };
		});
	}; // function fRotate()


$('div.str').css({'display':'none'});
$('a.lnk').click( function(){
	var g_id = $(this).attr('id').replace('lnk_','');
	$('div#str_mn').hide();
	$('div.str').hide();
	$('div#str_' + g_id).show();
	});

}); // $(document).ready(function()
}); // $(function()


