function pause_banner() {
	banapi.stop();
}

function start_banner() {
	banapi.play();
}

function enableInfoboxTabbed() {
	$('.infobox-tabbed .tabset li a').attr('href', '#');
	$('.infobox-tabbed .tabset li a').each(function(i) 
	{
		$(this).click(function()
		{
			var parentId = $(this).parent().attr('id');
			var ggrandpaId = $(this).parent().parent().parent().attr('id');
			var tabId = parentId.substring(0, parentId.length-3);
			// hide all the tabs			
			$('#'+ggrandpaId+' .tab').hide();
			$('#'+ggrandpaId+' li').removeClass('active');
			$('#'+parentId).addClass('active');
			// show selected tab
			$('#'+tabId).show();

			// stop processing the click event
			return false;
		}
		);
	}
	);

}

ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})


$(document).ready(function() {

	// issues 6909, 6904
	$('.border-box:contains(Follow Us)').addClass('follow-us');
	$('.border-box:contains(Follow Us!)').removeClass('follow-us'); // http://www.welivefitchallenge.com/families
	$('.border-box:contains(Follow Us) a img').attr('src', '/var/fccu/storage/images/media/images/follow_us_button/169972-1-eng-US/follow_us_button.jpg');

	// yikes
	$('li#node_id_22744 a').attr('href','http://www.floridacommerce.org');

	$('.current_node_id_22759 input[name=LoginButton]').click(function() {
		$('form#popuplogin').submit();
	});

	$(".frontpagecolumns").equalHeights(200);
	
	ddsmoothmenu.init({
		mainmenuid: "smoothmenu1",
		orientation: 'h',
		classname: 'ddsmoothmenu',
		contentsource: "markup"
	})


	$("tr:even").addClass("even");
	$("tr:odd").addClass("odd");


	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});


Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('.class-frontpage h2');
Cufon.replace('.latest_blog_posts .flat_tab');
Cufon.replace('.latest_blog_posts .spotlight_tab');


$(function() {
	
	var body = $("body");
	
	$("a.overlay img[rel]").each(function(){
		
			body.append($(this).siblings('.simple_overlay_text'));
		
			$(this).overlay({

			// some mask tweaks suitable for modal dialogs
			expose: {
				color: '#ebecff',
				loadSpeed: 200,
				opacity: 0.9
			},

			closeOnClick: false
		});
	
	});
		
	$("a.overlay[rel]").each(function(){
		
			body.append($(this).siblings('.simple_overlay_text'));
		
			$(this).overlay({

			// some mask tweaks suitable for modal dialogs
			expose: {
				color: '#ebecff',
				loadSpeed: 200,
				opacity: 0.5
			},

			closeOnClick: false
		});
	
	});

	$('.overlay').click(function(){
		$(this).expose();
	});
});