﻿function getheaderandfooter(tabchoice)
{

	//header code
	var activetab = '#' + $("title").attr('id'); 
	
	$('#topnavigation').load('headertabs.html', function() {
	
		if(tabchoice != "noactivetab"){
		 		  
				$("#topnavigation").find(activetab).addClass("active");
				$("#topnavigation").find(activetab).css("opacity", .5);
				$("#topnavigation").find(activetab).find("a").click(function(event){return false;});
				
				
				$("#topnavigation li").not(activetab).hover(function() {
				$(this).addClass("active");
				},function(){
				$(this).removeClass("active");		
				});
		  
		}
		else{
		 		$("#topnavigation li").hover(function() {
				$(this).addClass("active");
				},function(){
				$(this).removeClass("active");		
				});		
		
		};

	});     
	
		
		
		//footer code
	$('#bottomcopyright').load("footercopyright.html", function() {		
		
		$('#bottomcopyright').find(".thickbox").click(function(hyperlink){
			hyperlink.preventDefault();
			var title = $(this).html();
			var href =  $(this).attr("href") + "?KeepThis=true&TB_iframe=true&height=500&width=600"
			tb_show(title, href);	
		});	
		
   	});	
				
 

}




