$(document).ready(function() {
	if (window.ct) 
	{
	  $("#tabs li").append('<div class="tright"></div>');
	  $("#tabs li").prepend('<div class="tleft"></div>');
		var l=$("#tabs li").children("a").length;
		var t=(800-(l*14))/l;
		t=t-.5;
		t=Math.round(t);
		$("#tabs li a").css("width", t+"px");
		if ((t*l)+(l*14)<800)
		{
			var l2=l-1;
			$("#tabs li:nth-child("+l2+") a").css("width", t+800-((t*l)+(l*14))+"px");
		}
		$("#tabs li").mouseover(function() {
			$(this).children(".tright").css({"background":"url(/i/t_right_s.jpg) no-repeat", "height":"42px"});
			$(this).children(".tleft").css("height","42px");
			$(this).children("a").css({"background":"url(/i/t_top_s.jpg) repeat-x top #d6d7e6", "height":"42px","color":"#ffffff"});
		});
		$("#tabs li").mouseout(function() {
			if(!$(this).hasClass(ct))
			{
				$(this).children(".tright").css({"background":"url(/i/t_right.jpg) no-repeat", "height":"37px"});
				$(this).children(".tleft").css("height","37px");
				$(this).children("a").css({"background":"#d6d7e6", "height":"32px","color":"#002563"});
			}
		});
		$("#tabs li."+ct+" .tright").css({"background":"url(/i/t_right_s.jpg) no-repeat", "height":"42px"});
		$("#tabs li."+ct+" .tleft").css("height","42px");
		$("#tabs li."+ct+" a").css({"background":"url(/i/t_top_s.jpg) repeat-x top #d6d7e6", "height":"42px","color":"#ffffff"});
	}	
});
