$(function(){
	// 画像ロールオーバー
	var chImage = {
		imageLinkLocation: new Array(),
		chasheImage: new Array(),
		init: function() {
			$('input.linkImage, .linkImage a > img, a.linkImage > img').each(function(imageIndex){
				chImage.imageLinkLocation[imageIndex] = $(this).attr('src');
				chImage.chasheImage[imageIndex] = new Image();
				chImage.chasheImage[imageIndex].src = chImage.imageLinkLocation[imageIndex].replace(new RegExp('(_on)?(\.gif|\.jpg|\.png)$'), "_on$2");
				$(this).hover(function(){
					$(this).attr('src',chImage.chasheImage[imageIndex].src);
				}, function(){
					$(this).attr('src',chImage.imageLinkLocation[imageIndex]);
				});
			});
		}
	};
	chImage.init();
});

// 小窓オープン
function newWin(url, target, wW, wH, attr) {
	var toolbar = attr.charAt(0);
	var location = attr.charAt(1);
	var directories = attr.charAt(2);
	var status = attr.charAt(3);
	var menubar = attr.charAt(4);
	var resizable = attr.charAt(5);
	var scrollbars = (attr.charAt(6) == '1') ? 'yes':'0';
	var win_attr = 'toolbar='+toolbar+',location='+location+',directories='+directories+',status='+status+',menubar='+menubar+',resizable='+resizable+',scrollbars='+scrollbars+',width='+wW+',height='+wH;
	newWindow=window.open(url, target, win_attr);
}

