$(function()
{	
	var obj = $("#submain");
	
	obj.css({minHeight: obj.parent().height() + parseInt(obj.css("top"))});	

	//A little hack to get rid of the » inside dropdown menu items.
	$(".sf-sub-indicator").empty();
	$(".sf-menu li:last a").css("border","0px");
	

		//ShowCase Support
	$("div[data-showcase-id]").each(function(){
		$(this).simpleSlideshow({showcaseID: $(this).data("showcase-id"), showCaptions: true});
	});
	
	//Image Support
	$("div[data-photo-img-path]").each(function(){
		$(this).css("background-image","url('" + $(this).data("photo-img-path") + "')");
	});
	//Video manipulation
	$('iframe.video#comm').hide();
	$('iframe.video#int').hide();
	$('iframe.video#serv').hide();

	$('div#vidselect h1.comm').click(
		function(){
			$('iframe.video#faith').hide();
			$('iframe.video#int').hide();
			$('iframe.video#serv').hide();
			$('iframe.video#comm').fadeIn(1000);
			
		}
	);
	$('div#vidselect h1.serv').click(
		function(){
			
			$('iframe.video#faith').hide();
			$('iframe.video#int').hide();
			$('iframe.video#comm').hide();
			$('iframe.video#serv').fadeIn(1000);
		}
	);
	$('div#vidselect h1.int').click(
		function(){
			$('iframe.video#faith').hide();
			$('iframe.video#comm').hide();
			$('iframe.video#serv').hide();
			$('iframe.video#int').fadeIn(1000);
			
		}
	);
	$('div#vidselect h1.faith').click(
		function(){
			$('iframe.video#comm').hide();
			$('iframe.video#int').hide();
			$('iframe.video#serv').hide();
			$('iframe.video#faith').fadeIn(1000);
			
		}
	);
	
});



function initiate_slideshow(sid)
{
	$("#slideShow").simpleSlideshow({showcaseID: sid, showCaptions: true});
}
