var ua = $.browser;
var userAgent = navigator.userAgent.toLowerCase(); 
ua.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); 

$(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") + "')");
	});
});

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




$(document).ready(function() {

		
	if(ua.msie){
		$("#raise h2 a").css("font-size", "20px");
		$("#raise h2 a").css("margin-left", "20px");
		$("#raise").css("left", "200px");
	} else if ( ua.msie && ua.version < 8) { //COMPATIBILITY FUNCITONS
		//Fix IE6 background image flicker
		
			
    	$("#mainContent").css( "top", "0" ); //PREVENTS menu misplacement
    	$("#center_pattern").css( "margin-top", "0" ); //PREVENTS menu misplacement
    	$(".logo").css("background-image", "none");
    	$("div.newsevents").css("top", "0px");
    	$('.tagline').css("top", '80px');
    	$("#slideShow span").css( "background-color", "#9EC0AF" ); //PREVENTS TXT DISTORTION

	} else if ( ua.msie && ua.version < 8) {
		$("#slideShow span").css( "background-color", "#9EC0AF" ); //PREVENTS TXT DISTORTION
		
	} else if (ua.chrome){
		$("#mainContent").css( "top", "35px" ); //PREVENTS menu misplacement
		$("#center_pattern").css( "top", "-28px" ); //PREVENTS menu misplacement
	}
	  
});

//JQUERY UI FUNCTIONS---------------------

$(document).ready(function(){

				// Accordion
			//	$("#accordion").accordion({ header: "h3" });
	
				// Tabs
				$('#tabs').tabs();

			/*	// Datepicker
				$('#datepicker').datepicker({
					inline: true
				});
				*/
				

});
