// JavaScript Document

function forYourHappinessWindow(){
	var wx,wy,x,y;
	wx=920;
	wy=651;
	x=(screen.width - wx)/2;
	y=(screen.height - wy)/2;
	
	window.open("/for_your_happiness.html","for_your_happiness","left="+x+",top="+y+",width="+wx+",height="+wy+",scrollbars=no,location=no,menubar=no,status=yes,resizable=no,toolbar=no");
}

function makeTall(){  $("#btn_sp").animate({"width":180,"height":200},200);}
function makeShort(){ $("#btn_sp").animate({"width":78,"height":34},200);}


/*
function view_spbox(mode){
	if(mode=="true"){
		document.getElementById("btn_sp").style.width = 170+"px";
		document.getElementById("btn_sp").style.height = 180+"px";
		document.getElementById("listarea_sp").style.display = "block";
	}else{
		document.getElementById("btn_sp").style.width = 80+"px";
		document.getElementById("btn_sp").style.height = 36+"px";
		document.getElementById("listarea_sp").style.display = "none";
	}
	
}
*/


$(function() {
	$('a[href*=#]').click(function() {
		$("div").removeClass("HighLight");
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')  && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top - 20;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				$target.addClass("HighLight").fadeIn("slow");
				return false;
			}
		}
		
	});
	$("a[href*=#continer]").click(function(){$("div").removeClass("HighLight");});
	$("a[href*=#maincontent]").click(function(){$("div").removeClass("HighLight");});
});


