// JavaScript Document


// menu

$(function(){
    $("#menu ul li").hover(function(){
            $("ul:not(:animated)",this).slideDown("fast");
        },
        function(){
            $("ul",this).slideUp("fast");
    })
});

// last cts adjust

$(function(){
	$("#newsTp dd:last").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","0px");
	$(".division02:last").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","0px");
	$(".division03:last").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","0px");
	$(".division04:last").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","0px");
	$(".division05:last-child").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","0px");
	$(".ctsBox01:last").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","1px");
	$(".ctsBox02:last").css("margin-bottom","0px");
	$(".ctsBox03:last").css("margin-bottom","5px");
	$(".cellBox .cell01:last-child").css("margin-right","0px");
	$(".cellBox .cell01 ul:last-child").css("margin-bottom","0px");
	$(".tabBox .tabBoxCts:last-child").css("background-image","none").css("margin-bottom","0px").css("padding-bottom","3px");
	$(".newsBoxCts:last-child").css("margin-bottom","0px").css("padding-bottom","0px");
});

// mouseover

$(function(){
	$("img.over").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1Ov$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)Ov(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1Ov$2"));
	});
});

 
// menuSide

$(function(){
	$('.menuSide li ul').css('display','none');
	$('.menuSide li img').css({cursor:'pointer'}).mouseover(function(){
		$(this).attr("src",$(this).attr("src").split(".png").join("Ov.png"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").split("Ov.png").join(".png"));
	}).click(function(){
		if($(this).attr('src').indexOf('Open') >= 0){
			$(this).parent().next('ul').slideDown('fast');
			$(this).attr("src","/images/iconCloseOv.png");
		}
		else{
			$(this).parent().next('ul').slideUp('fast');
			$(this).attr('src', '/images/iconOpenOv.png');
		}
	});
});

// tab

$(document).ready(function(){
	$('#tabProduct01_02').css('display','none');
	$('#tabProduct01_03').css('display','none');
	$('.tabBtn01_02').click(function(){
		$('#tabProduct01_01').hide();
		$('#tabProduct01_03').hide();
		$('#tabProduct01_02').show();
	});
	$('.tabBtn01_03').click(function(){
		$('#tabProduct01_01').hide();
		$('#tabProduct01_02').hide();
		$('#tabProduct01_03').show();
	});
	$('.tabBtn01_01').click(function(){
		$('#tabProduct01_02').hide();
		$('#tabProduct01_03').hide();
		$('#tabProduct01_01').show();
	});
	return false;
});

$(document).ready(function(){
	$('#tabProduct02_02').css('display','none');
	$('.tabBtn02_02').click(function(){
		$('#tabProduct02_01').hide();
		$('#tabProduct02_02').show();
	});
	$('.tabBtn02_01').click(function(){
		$('#tabProduct02_02').hide();
		$('#tabProduct02_01').show();
	});
});

$(document).ready(function(){
	$('#menuDownload02').css('display','none');
	$('.downloadBtn02').click(function(){
		$('#menuDownload01').hide();
		$('#menuDownload02').show();
	});
	$('.downloadBtn01').click(function(){
		$('#menuDownload02').hide();
		$('#menuDownload01').show();
	});
});
