/*
====================================================
	
	DEPOC JavaScript Function Version:4.00
	
		depoc function.js
		include jquery
		
		Copyright (c) 2011 DEPOC Inc.
		http://depoc.jp
		
		Update:11/04/15
	
====================================================
*/
/*---------------------------------------------------
	init
---------------------------------------------------*/
$(function() {
	$("#topic-path li:last-child").addClass("GT");
	$("#topic-path li[class!='GT']").append("&gt;");
});

/*---------------------------------------------------
	bnr
---------------------------------------------------*/
$(function(){
	$("a img,.btn").not(".side-navi img,#link-home img").hover(
		function(){
			$(this).fadeTo(120, 0.7)
		},
		function(){
			$(this).fadeTo(200, 1);
		}
	);
});
/*
------------------------------------------------------------
	windowHeight
--------------------------------------------------------- */
$(function(){
	windowHeight();
});
$( window ).resize(function(){
	windowHeight();
});

function windowHeight(){
	var containerHeight = $(window).height();
	var containerHeightPx = containerHeight + "px"
	if (containerHeight >= 730) {
		$("#index #wrapper").css("height",containerHeightPx);
	} else if (containerHeight <= 730) {
		$("#index #wrapper").css("height","730px");
	}
}
/*-------------------------------------------------------------
	ポップアップ
-------------------------------------------------------------*/
window.onload=autoPOP;

function autoPOP()
{
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++)
	{
		if (x[i].getAttribute('className') == 'popup01' || x[i].getAttribute('class') == 'popup01')
		{
			x[i].onclick = function () {
				return winOpen(this.href,'popWin','620','600');
			}
		}
		if (x[i].getAttribute('className') == 'popup02' || x[i].getAttribute('class') == 'popup02')
		{
			x[i].onclick = function () {
				return winOpen(this.href,'popWin','750','700');
			}
		}

	}
};

function winOpen(url,windowname,width,height) {
	var features="location=no,menubar=no,toolbar=no,status=no,resizable=no,scrollbars=yes";
	if (width) {
		if (window.screen.width > width)
			features+=", left="+(window.screen.width-width)/2;
		else width=window.screen.width;
		features+=", width="+width;
	}
	if (height) {
		if (window.screen.height > height)
			features+=", top="+(window.screen.height-height)/2;
		else height=window.screen.height;
		features+=", height="+height;
	}
	wn=window.open(url,windowname,features);
	wn.focus();
	return false;
}



