//index.html 「アクティブ化…」警告表示回避
function RunFlash(swfWidth,swfHeight)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+swfWidth+'" height="'+swfHeight+'">\n');
    document.write('<param name="movie" value="/wp-content/themes/syokunin/swf/top.swf" />\n');
    document.write('<param name="quality" value="best" />\n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<embed src="/wp-content/themes/syokunin/swf/top.swf" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+swfWidth+'" height="'+swfHeight+'"></embed>\n');
    document.write('</object>\n');
}

function RunFlash2(swfWidth,swfHeight)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+swfWidth+'" height="'+swfHeight+'">\n');
    document.write('<param name="movie" value="/wp-content/themes/syokunin/swf/merit.swf" />\n');
    document.write('<param name="quality" value="best" />\n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<embed src="/wp-content/themes/syokunin/swf/merit.swf" quality="best" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+swfWidth+'" height="'+swfHeight+'"></embed>\n');
    document.write('</object>\n');
}

//////////////////////////////////////////////////////////////////
//
//						ロールオーバー
//////////////////////////////////////////////////////////////////


function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'roll') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_f2'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_f2'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

try{
	window.addEventListener("load",initRollovers,false);
}catch(e){
	window.attachEvent("onload",initRollovers);
}

$(function() {  
  $('#repaerBoxBt a').lightBox();
  $('#gallery a').lightBox();
});


