function set_height() {
	Cufon.replace('h1');
	Cufon.now();
	
	setTimeout(function() {
		if (subpage == "1") {
			$("#subpage_2").html("");
			$("#rightcontent_body").animate({height: $("#subpage_1").height()+20+"px"}, 1000);
			$("#body").animate({height: $("#subpage_1").height() + 175 + "px"}, 1000);
			$("#subpage").height($("#subpage_1").height()+"px");
		}
		else if (subpage == "2") {
			$("#subpage_1").html("");
			$("#rightcontent_body").animate({height: $("#subpage_2").height()+20+"px"}, 1000);
			$("#body").animate({height: $("#subpage_2").height() + 175 + "px"}, 1000);
			$("#subpage").height($("#subpage_2").height()+"px");
		}
		$("#rightcontent_bottom").css("z-index", 1);
	}, 1000);
}

function chk_hash() {
	var currentHash = document.location.hash.split("#")[1];
	
	checkHash = setInterval(function(e){
		var gethash = document.location.hash;
		var pagehash = gethash.split("#")[1];
		
		if (pagehash != currentHash) {
			currentHash = pagehash;		
		}
	}, 500);
}

function clear_pg(type) {
	setTimeout(function() {
		switch (type) {
			case "pg":
				if (page == "1") {
					$("#page2").html("");
				}
				else {
					$("#page1").html("");
				}
				break;
			case "subpg":
				if (subpage == "1") {
					$("#subpage_2").html("");
				}
				else {
					$("#subpage_1").html("");
				}
				break;
		}
	}, 1000);
}