function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* ウィンドウポップアップ
-----------------------------------------------------------*/
function openWindow(url, name, width, height){
	var w = window.open(url, name, 'scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,width=' + width + ',height=' + height);
	w.focus();
}

/* クラス追加
-----------------------------------------------------------*/
$(document).ready(function() {
	$('ul li:first-child').addClass('firstChild');
	$('ul li:last-child').addClass('lastChild');
});


/* ロールオーバー
-----------------------------------------------------------*/
(function($) {
	$.fn.rollover = function(postfix) {
		postfix = (postfix != null) ? postfix : '_on';
		
		return this.not('[src*="'+ postfix +'."]').each(
		function() {
			var img = $(this);
			var src = img.attr('src');
			var src_on = src.substr(0, src.lastIndexOf('.'))
			           + postfix
			           + src.substring(src.lastIndexOf('.'));
			$('<img>').attr('src', src_on);
			img.hover(
				function() {
					img.attr('src', src_on);
				},
				function() {
					img.attr('src', src);
				}
			);
		});
		
		
	};
})(jQuery);


jQuery(document).ready(function($) {
   // set postfix
   $('#navi ul li a img,#top_navi ul li a img').rollover('_on');
   $('.hoverImg').rollover('_on');
 });

