
$(function(){
	
	var _linkHover = false;
	
	$('#commodity .hoverBox').hover(
		function () { $(".boxInnerA",this).addClass("hover"); }, 
		function () { $(".boxInnerA",this).removeClass("hover");}
	);
	
	$("#commodity .unitFloat").each(function(){
		var _this = $(this);
		var _height = _this.height();
		$(".boxInnerB",this).css("height",_height+5);
	});
	
	$("#commodity .hoverBox").click(function(){
		var myPath = $("h3 a",this).attr('href');
		if(_linkHover){
			//window.open(this, '_self');
			//alert("a:"+_linkHover);
			//return false;
		}else{
			window.open(myPath, '_self');
			//alert("a以外:"+_linkHover);
			return false;
		}
	})
	
	$("#commodity .hoverBox").css("cursor","pointer");
	
	$("#commodity ul li a",this).hover(
		function(){
			_linkHover = true;
		},
		function(){
			_linkHover = false;
		}
	);
	
	
});
