$(function(){var trailimage="<div id='trailimageid' style='display:none;'>";trailimage+=" <div class='trailimage'>";trailimage+="  <h2 id='trailimageid_h2'></h2>";trailimage+="  <span id='trailimageid_description'></span>";trailimage+="  <div align='center' class='trailimage_img_main'><img id='trailimageid_img' border='0'></div>";trailimage+="  <div align='center' id='trailimageid_img_sub'></div>";trailimage+=" </div>";trailimage+="</div>";$("body").append(trailimage);$(".itemimg").hover(function(e){var id=this.id.replace(/item_/,"");var imgsu=parseInt($(this).attr("imgsu"));if(imgsu==NaN){imgsu=0;}$("#trailimageid_h2").text($("#i_name_"+id).val());$("#trailimageid_description").html("&yen;"+$("#i_price_t_"+id).val());$("#trailimageid_img").attr("src",$("#i_pic_l_"+id).val()).error(function(){$(this).attr("src",Buyma.imgpath+"/common/images/utility/item_noimg_100.gif?101");});var imgIdx=2;var imgSub=$("#trailimageid_img_sub");imgSub.html("");while(imgIdx<=imgsu){var imgSubSrc=$("#i_pic_n_"+imgIdx+++"_"+id);if(imgSubSrc.length==0){break;}imgSubImg=$("<img border='0' width='70' height='70' src='"+imgSubSrc.val()+"' >");imgSubImg.error(function(){$(this).remove();});imgSub.append(imgSubImg);}var container=$("#trailimageid");container.show();var x=e.pageX+50;if($(window).width()<x+450){x=e.pageX-$("#trailimageid").width()-50;}var y=Math.max(e.pageY-$("#trailimageid").height(),$(window).scrollTop()+30);container.css("position","absolute").css("z-index",9999).css("left",x).css("top",y).show();},function(){$("#trailimageid_img").attr("src","");$("#trailimageid_img_sub").html("");$("#trailimageid").hide();});});
