// JavaScript Document

//rollover fade
$(function(){
$(".fade").load(function(){
	$(this).fadeTo(300, 1.0);
});
$(".fade").hover(
function(){
	$(this).fadeTo(200, 0.7);
},
function(){
	$(this).fadeTo(300, 1.0);
}
);
});


/*
function toAnchor(e){
	if($("base")){
		var base = $("base").attr("href");
		var a = e.href.replace(base,"");
		if(a.indexOf("#",0)!=0){
			e.href = a;
		}else{
			var url = document.location.toString();
			var path = url.replace(base,"");
			e.href = path+a;
		}
	}else{
		return;
	}
}
*/


$(function(){
	if($("base")){
		$(".toAnchor").each(function(){
			var base = $("base").attr("href");
			var a = $(this).attr("href").replace(base,"");
			if(a.indexOf("#",0)!=0){
				$(this).attr({href:a});
			}else{
				var url = document.location.toString();
				var path = url.replace(base,"");
				$(this).attr({href:path+a});
			}
		});
	}else{
		return;
	}
});


$(function() {
	$('#topics > ul').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 10000);
});


