$(function(){

// external kame links
	$("a[target$=kame]").click(function(){
		var newWin =window.open(this.href,"kame").focus();
		return false;
	});
// popup
	$("a[class$=popup]").click(function(){
		var newWin =window.open(this.href,"popwin","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=650,height=780").focus();
		return false;
	});

// top panel
	$('.pageHome #topPanel').innerfade({
		speed: 'slow',
		timeout: 6000,
		type: 'sequence',
		containerheight: '450px'
	});

// bigTarget
	$(".pageProdIndex .item li a, .pageProdIndex .item2 li a").bigTarget({
		hoverClass: 'over',
		clickZone : 'li:eq(0)'
	});


// ロールオーバー
	var aPreLoad = new Object();
	$("img.imgover, .btn input, .btn a img, .totop a img, #header ul a img, #footer ul a img, #localNav ul a img")
	.not("[src*='_over.']").each(function(i) {
		var tsrc = this.src;
		var ftype = this.src.lastIndexOf('.');
		var hsrc = this.src.substr(0, ftype) + '_over' + this.src.substr(ftype, 4);

		aPreLoad[this.src] = new Image();
		aPreLoad[this.src].src = hsrc;

		$(this).hover(
			function() { this.src = hsrc; },
			function() { this.src = tsrc; }
		);
	});

});