/************************************************
  
    SiteName: 
	Author  : 
	Update  : 

************************************************/


/*
---------------------------------------------------
NOTE:
- jQuery必須
USAGE:
- swapしたいimg要素にクラス名"swap"をつける
- ロールオーバ画像のファイル名の末尾に"_on"をつける
---------------------------------------------------
*/
//Plug-in
jQuery.fn.swap = function(settings){
	settings = jQuery.extend({postfix:"_on"},settings);
	return this.each(function(){
		var img_off = $(this).attr("src");
		if (!img_off.match((settings.postfix))) {
			var pnt = img_off.lastIndexOf(".");
			var img_on = img_off.slice(0, pnt) + settings.postfix + img_off.slice(pnt);
			var img_preload = new Image();
			img_preload.src = img_on;
			$(this).hover(function(){$(this).attr("src", img_on)},function(){ $(this).attr("src", img_off)});
		};
	});
};

//Execution
$(function(){
	$('img.swap').swap();
});

/*
---------------------------------------------------
NOTE:
- jQuery必須
USAGE:
- footer部分のリンク横区切りの縦線をIE6でも対応させる
---------------------------------------------------
*/
$(document).ready(function() {
    $('div#footer ul li:first-child').addClass('firstChild');
});

/*
---------------------------------------------------
NOTE:
- jQuery必須
USAGE:
- classにblankと指定すると別ウインドウで開く
---------------------------------------------------
*/
$(function(){
    $('.blank').click(function(){
        window.open(this.href, '_blank');
        return false;
    });
});

/*
---------------------------------------------------
NOTE:
- jQuery必須
USAGE:
- サイズ指定別ウインドウ指定
---------------------------------------------------
*/
$(function(){
    $('.pop').click(function(){
        window.open(this.href, 'pop','width=808,height=600,toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=1,resizable=1'); 
        return false;
    });
});




