


	$(document).ready(function() {
		
		if($.browser.msie && jQuery.browser.version=="6.0"){
			
			$_win_height=$(window).height();
			$_win_height = $_win_height - 380;
			//alert($_win_height);
			if ($_win_height>330) $("#right_area").css("height",$_win_height);
			
			window.onresize = function () {
				$_win_height=$(window).height();
				$_win_height = $_win_height - 380;
				//alert($_win_height);
				if ($_win_height>330) $("#right_area").css("height",$_win_height);
			}	
			
			
		} else {
		
				$_win_width=$(window).width();
				
				if ($_win_width<938) {
					$("#selfBody").css("background-position",'left top');
					$("#footer_wrap, #selfBody").css("width",'938px');
					
				} else {
					$("#selfBody").css("background-position",'center top');
					$("#footer_wrap, #selfBody").css("width",'100%');
				}
			gotTheHeight();
			//$("#r_debug").html($("#wholeWrap").height() + ", " + $("#left_area").height() + " <-> " + $("#right_area").height() + "-"+ $("body").height());
			
			
			
			window.onresize = function () {
				$_win_width=$(window).width();
				
				if ($_win_width<938) {
					$("#selfBody").css("background-position",'left top');
					$("#footer_wrap, #selfBody").css("width",'938px');
				} else {
					$("#selfBody").css("background-position",'center top');
					$("#footer_wrap, #selfBody").css("width",'100%');
				}
				
				
				//Adj the Height
				gotTheHeight();
				//$("#r_debug").html($("#wholeWrap").height() + ", " + $("#left_area").height() + " <-> " + $("#right_area").height() + "-"+ $("body").height());
				
			}	
		}
		
		
		function gotTheHeight() {
			/*
			if ($("body").height() > $("#true_right_area").height()+$("#footer_wrap").height()+380) {
				$_wholewrap_height = $("body").height() - $("#footer_wrap").height();
				if ($_wholewrap_height<$("#left_area").height()+$("#footer_wrap").height()) {
					$_wholewrap_height = $("#left_area").height() + $("#footer_wrap").height();
				}
				
			} else {
				
				$_wholewrap_height = $("#right_area").height();
				if ($_wholewrap_height<$("#left_area").height()+$("#footer_wrap").height()) {
					$_wholewrap_height = $("#left_area").height() + $("#footer_wrap").height();
				}
				
			}
			*/
			
			$_wholewrap_height = $("body").height() - $("#footer_wrap").height()-380+9;
			if ($("#left_area").height()<$_wholewrap_height) $("#right_area").css("min-height",$_wholewrap_height);
		}
		
		
		
		Cufon.replace('h2, #content_site_link a, .gothic');
		
		Cufon('#navigation_area a.noneActNavi', {
			hover: {
				textShadow: '1px 1px black',
				color: '#CCCCCC'
			}
		});
		
		
		Cufon('#navigation_area a.actNavi', {
			textShadow: '1px 1px black',
			color: '#CCCCCC',
			hover: {
				textShadow: '1px 1px black',
				color: '#CCCCCC'
			}
		});
		

		Cufon('.subitem a.noneActNavi', {
			hover: {
				textShadow: '1px 1px black',
				color: '#CCCCCC'
			}
		});
		
		Cufon('.subitem a.actNavi', {
			textShadow: '1px 1px black',
			color: '#CCCCCC',
			hover: {
				textShadow: '1px 1px black',
				color: '#CCCCCC'
			}
		});

		
		//This to kill IE link dotted outline
		$('a').focus(function(){ this.blur();} );
		
	});



