function addLoadEvent(func){
	var oldonload=window.onload;
	if(typeof window.onload!='function'){
		window.onload=func;
	}else{
		window.onload=function(){
			if(oldonload){
				oldonload();
			}
			func();
		}
	}
}
function hide() {
	if (document.getElementById('featuredlinks')) {
		if (document.getElementById('reciprocallinkform')) { document.getElementById('reciprocallinkform').style.display = 'none'; }
		if (document.getElementById('featuredlinkform')) { document.getElementById('featuredlinkform').style.display = 'none'; }
		document.getElementById('featuredlinks').onclick = function() {
			document.getElementById('reciprocallinkform').style.display = 'none'; 
			document.getElementById('featuredlinkform').style.display = 'block'; 
		}
		document.getElementById('reciprocallinks').onclick = function() {
			document.getElementById('featuredlinkform').style.display = 'none'; 
			document.getElementById('reciprocallinkform').style.display = 'block'; 
		}
		document.getElementById('freelinks').onclick = function() {
			document.getElementById('featuredlinkform').style.display = 'none'; 
			document.getElementById('reciprocallinkform').style.display = 'none'; 
		}
	}
}
addLoadEvent(hide);
var $j = jQuery.noConflict();
$j(document).ready(function() {
	$j("#categorymenu .subcats").hide();
	$j("#categorymenu h2").click(function() {
		if ($j(this).hasClass("selected")) {
			$j(this).removeClass("selected");
			$j(this).next(".subcats").slideUp("normal");
		} else {
			$j(this).addClass("selected");
			$j(this).next(".subcats").slideDown("normal").siblings(".subcats").slideUp("normal");
			$j(this).siblings().removeClass("selected");
		}
	});
});
