// ロールオーバー
function smartRollover() {
    if(document.getElementsByTagName) {
        var images = document.getElementsByTagName("img");
        for(var i=0; i < images.length; i++) {
            if(images[i].getAttribute("src").match("_o."))
            {
                images[i].onmouseover = function() {
                    this.setAttribute("src", this.getAttribute("src").replace("_o.", "_on."));
                }
                images[i].onmouseout = function() {
                    this.setAttribute("src", this.getAttribute("src").replace("_on.", "_o."));
                }
            }
        }
    }
}
if(window.addEventListener) {
    window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
    window.attachEvent("onload", smartRollover);
}


//Scroll_Follow++
$(function() {
$('a').click(function() {
var jumpTo = $(this).attr('href');
if(jumpTo == '#cl_box') {
$(document.body).ScrollTo(1000, 'easein'); return false;
}
else if(jumpTo.charAt(0) == '#cl_box') {
$(jumpTo).ScrollTo(1000, 'easein'); return false;
}
});
});


//Scroll_Follow
$( document ).ready( function (){
	$( '#cl_box' ).scrollFollow();
});


//ウィンドウ実行+クリックで画像切替
function windowOPCL1(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block1.src = "img/boss/title_b1_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block1.src = "img/boss/title_b1_c.gif";
		}
	}

function windowOPCL2(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block2.src = "img/boss/title_b2_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block2.src = "img/boss/title_b2_c.gif";
		}
	}

function windowOPCL3(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block3.src = "img/boss/title_b3_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block3.src = "img/boss/title_b3_c.gif";
		}
	}

function windowOPCL4(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block4.src = "img/boss/title_b4_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block4.src = "img/boss/title_b4_c.gif";
		}
	}

function windowOPCL5(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block5.src = "img/boss/title_b5_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block5.src = "img/boss/title_b5_c.gif";
		}
	}

function windowOPCL6(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block6.src = "img/boss/title_b6_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block6.src = "img/boss/title_b6_c.gif";
		}
	}

function windowOPCL7(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block7.src = "img/boss/title_b7_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block7.src = "img/boss/title_b7_c.gif";
		}
	}

function windowOPCL8(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block8.src = "img/boss/title_b8_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block8.src = "img/boss/title_b8_c.gif";
		}
	}


function windowOPCL01(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block01.src = "img/dl_c/title_dlc1_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block01.src = "img/dl_c/title_dlc1_c.gif";
		}
	}

function windowOPCL02(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block02.src = "img/dl_c/title_dlc2_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block02.src = "img/dl_c/title_dlc2_c.gif";
		}
	}

function windowOPCL03(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block03.src = "img/dl_c/title_dlc3_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block03.src = "img/dl_c/title_dlc3_c.gif";
		}
	}

function windowOPCL04(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block04.src = "img/dl_c/title_dlc4_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block04.src = "img/dl_c/title_dlc4_c.gif";
		}
	}

function windowOPCL05(id) {
	if(document.getElementById(id).style.display == "block"){
			document.getElementById(id).style.display = "none";
			document.block05.src = "img/dl_c/title_dlc5_o.gif";
		}else if(document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			document.block05.src = "img/dl_c/title_dlc5_c.gif";
		}
	}
