// JavaScript Document
function setFlash(name,height,width,bgcolor,wmode,id){
strWord = "";
strWord +='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id="'+name+'" ALIGN="">';
strWord +='<PARAM NAME=movie VALUE="'+name+'.swf?id='+ id+'">';
strWord +='<PARAM NAME=quality VALUE=high>';
strWord +='<PARAM NAME=bgcolor VALUE=#'+bgcolor+'>';
strWord +='<PARAM NAME=wmode VALUE='+wmode+'>';
strWord +='<EMBED src="'+name+'.swf?id='+ id+'" quality=high wmode='+wmode+' bgcolor=#'+bgcolor+' WIDTH="'+width+'" HEIGHT="'+height+'" NAME="'+name+'" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>';
strWord +='</OBJECT>';

document.write(strWord);

}

$(document).ready(function(){
// 画像キャッシュ
$('.ro').each(function(i, val){
        $('<img>').attr("src", $(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_ro$2"));
});
$('.no').hover(
    function () {
                var s = $(this).attr("src");
            if (!s.match(/_o/))
            {
                                s = s.replace("_n", "_o");
                                $(this).attr("src", s);
            }
        },function () {
                var s = $(this).attr("src");
            if (s.match(/_o/))
            {
                                s = s.replace("_o", "_n");
                $(this).attr("src", s);
            }
        }
);
$('.ro').hover(
    function () {
                var s = $(this).attr("src");
            if (!s.match(/_ro/))
            {
                                s = s.replace(/^(.+)(\.[a-z]+)$/, "$1_ro$2")
                                $(this).attr("src", s);
            }
        },function () {
                var s = $(this).attr("src");
            if (s.match(/_ro/))
            {
                                s = s.replace("_ro", "");
                $(this).attr("src", s);
            }
        }
);
$('.naru').hover(
    function () {
                var s = $(this).attr("src");
            if (!s.match(/_2/))
            {
                                s = s.replace(/^(.+)(\.[a-z]+)$/, "$1_2$2")
                                $(this).attr("src", s);
            }
        },function () {
                var s = $(this).attr("src");
            if (s.match(/_2/))
            {
                                s = s.replace("_2", "");
                $(this).attr("src", s);
            }
        }
);
});
