var activeRotatorNode=null;
$(document).ready(function(e)
{
	$("#CenterContent").height($(window).height());
	$(window).resize(function()
	{
		$("#CenterContent").height($(window).height());
	});
	$("#leftBorder").height($("#SiteHolder").height());
	$("#leftBorder").show();
	$("#rightBorder").height($("#SiteHolder").height());
	$("#rightBorder").show();
	$("#SectionLinks a").click(function(e)
	{
		if($(this).attr("rel")=="non_tab")
		{	
			return;
		}
		if($(this).hasClass("Active"))
		{
			return false;
		}
		
		var activeLink = $(".Active", $("#SectionLinks"));
		activeLink.removeClass("Active");
		var hideID ="Content_"+activeLink.attr("id");
		
		$("#"+hideID).hide();
		
		
		$(this).addClass("Active");
		
		var showID= "Content_"+this.id;
		$("#"+showID).show();
		
		
		$("#leftBorder").height($("#SiteHolder").height());
	$("#leftBorder").show();
	$("#rightBorder").height($("#SiteHolder").height());
	$("#rightBorder").show();
		
		return false;
		
	});
	
	activeRotatorNode = $("#RotatorContents div:first");
	
	$("#SatisfiedClients a.Next").click(function(e)
	{
		
		activeRotatorNode.hide();
		activeRotatorNode = activeRotatorNode.next("div");
		if(!activeRotatorNode.html())
		{
			activeRotatorNode = $("#RotatorContents div:first");
		}
		activeRotatorNode.show();
		
		return false;
	});
	$("#SatisfiedClients a.Previous").click(function(e)
	{
		activeRotatorNode.hide();
		activeRotatorNode = activeRotatorNode.prev("div");
		if(!activeRotatorNode.html())
		{
			activeRotatorNode = $("#RotatorContents div:last");
		}
		activeRotatorNode.show();
		return false;
	});
	
	if($("a.dhtml:first").html())
	{
		$("a.dhtml").click(function(event)
		{
			var tgt = $(this).attr("rel");
			$("#"+tgt).modal();
			return false;
		});
	}
	
	
	
});

