window.resizeTo(680,500);
function openInParent(url) {
	window.opener.location.href = url;
}
$(document).ready(function() {
	$("#mainContent .termscontent").hide();
	$("#mainContent .termscat").hide();
	loc = window.location.href;
	anchor = loc.split("#");
	if(anchor[1] != null){
		$("#term" + anchor[1]).show();
		$("#term" + anchor[1]).parent().parent().show();
	}
	$(".toggleLink").live("click",function(){
	    $($(this).attr("rel")).slideToggle();
		return false;
	});
	$(".closeToggle").live("click",function(){
	    $($(this).attr("rel")).slideUp();
	});
	$(".toggleCatLink").live("click",function(){
	    $($(this).attr("rel")).slideToggle();
		return false;
	});
	$(".printTerms").live("click",function(){
	    $("#printArea").html($($(this).attr("rel")).html());
	    //alert($("#printArea").html());
	    window.print();
	});
	$(".printAll").live("click",function(){
	    $("#printArea").html($("#mainContent").html());
	    $("#printArea .termscontent").show();
	    $("#printArea .termscat").show();
	    //alert($("#printArea").html());
	    window.print();
	});
});