
$(function(){
 	var bodyID = $('body').attr('id');

 /*--------------------------------
  header navi active
 -------------------------------*/
	if($('body').is(':has("dl#omoriNav")')){
		$('dl#omoriNav dd').each(function(){
			var activeNv = $(this).attr('id').split('-')[1];
			if(bodyID == activeNv){
				$(this).find('a').find('img').css('visibility','hidden');
			}
		});
	}

/*------------------------
  topic path
------------------------*/
	if($('ul#topic-path')){
		//$('<span>&nbsp;&gt;&nbsp;</span>').appendTo('ul#topic-path li a');
				$('ul#topic-path li a').after('<span>&nbsp;&gt;</span>');
	}
	
	
/*------------------------
  swapImg
------------------------*/
	swapImgs = $('img.swapImg');
	swapObj = new Image();
	swapImgs.each(function(){
		
		//ImgPreLoad
		preLoad = $(this).attr('src').replace(/_n/i,'_r');
		imgNm = $(this).attr('name',preLoad);
		
		//MouseOver
		$(this).hover(
			function(){
				$(this).attr('lowsrc',$(this).attr('src'));
				$(this).attr('src',$(this).attr('name'));
			},
			function(){
				$(this).attr('src',$(this).attr('lowsrc'));
			}
		);
	});
		
/*------------------------
  nismo_shopList
------------------------*/
	$('table.nismo_shopList td.shopLink a').click(function(){
		xHref = $(this).attr('href');
		window.open(xHref,'SubWin','resizable=no,scrollbars=yes,menubar=no,directories=no,status=no,location=no,width=525,height=700');
		return false;
	});
	


/*------------------------
  work reslut
------------------------*/
	$('ul.resultImg li a').click(function(){
		xHref = $(this).attr('href');
		window.open(xHref,'SubWin','resizable=no,scrollbars=yes,menubar=no,directories=no,status=no,location=no,width=535,height=400');
		return false;
	});
	
});


/*------------------------
  target="_blank"
------------------------*/
jQuery.fn.extend({
	tBlank:  $(document).ready(function(){
		return $('a._blank').click(function(){
			this.target = '_blank';
		});
	})
});