Array.prototype.each=function(a){if(a.constructor!=Function){return this;}for(var b=this.length-1;b>=0;b--){a.call(this,b,this[b]);}return this;};Array.prototype.index=function(b){var a=-1;for(var c=this.length-1;c>=0;c--){if(this[c]==b){a=this[c];break;}}return a;};Array.prototype.isIn=function(a){for(var b=this.length-1;b>=0;b--){if(this[b]==a){return true;}}return false;};Array.prototype.del=function(b){var a=this.index(b);if(a!=-1){this.splice(a,1);}return this;};(function(a){if(typeof jshop=="undefined"){a.jshop={};}jshop.mModule=typeof jshop.mModule==="undefined"?{}:jshop.mModule;jshop.slideTimer=typeof jshop.slideTimer==="undefined"?{}:jshop.slideTimer;jshop.countDownTimer=typeof jshop.countDownTimer==="undefined"?{}:jshop.countDownTimer;var b={css3Prefix:(function(){var e=document.createElement("div"),d=["","webkit","moz","ms"],f={TRANSFORM:"",TRANSITION:""};for(var c=0;c div[instanceid='"+id+"']");jTemp.attr("data-width",jTemp.width()).attr("data-height",jTemp.height());$(dom).append(jTemp);jTemp.removeClass("abs-invisible");}}}});});}}); $.extend(jshop.mModule,{zoom:function(c){if(c.needZoom===false){return;}jTarget=$(this);function b(){if(jTarget[0].getAttribute("style")!==null){jTarget.removeAttr("style");}var g=Base.css3Prefix.TRANSFORM,f=jTarget.closest("[module-name]"),e=jTarget.css("position","absolute").width(),h=jTarget.css("position","static")&&$(".outer-container").width()/e;h=h>1?$(".outer-container").width()/640:h;var d=(f.attr("data-height")||jTarget.parent().height())*h;jTarget[0].style[g+"Origin"]="0 0";jTarget[0].style[g]="scale("+h+")";jTarget.height(d);}!function a(){b();}();}}); $.extend(jshop.mModule,{showAppPriceCoupon:function(g){var f=$(this),a=[],e=[],d="http://pm.3.cn/prices/mgets";g=$.extend({jdPriceNode:".j-jd-price",appPriceNode:".j-app-price",couponPriceNode:".j-coupon-price",couponType:1,skuAttName:"sku",itemNode:"li",noAppPriceHandle:""},g);function b(h,i){var j=0,h=parseFloat(h),i=parseFloat(i);if(g.couponType===1){j=parseInt(100*h-100*i,10)/100;}else{if(g.couponType===2){j=parseInt(i*100/h,10)/10;}}return j;}function c(h){for(var j=0;j span",navItemCurrent:"current",contentItemSelector:".j-template-ul",contentItemCurrent:"current",hasUpdateTimeClass:"show-update-time"},i);var d={replace:function(l,k){for(a in k){var j=new RegExp("\\{\\{"+a+"\\}\\}","g");l=l.replace(j,k[a]===null?"":k[a]);}l=l.replace(/\jQuery.*?\$/g,"");return l;},getDetailUrl:function(j){var k=location.href;if(/\/app\//.test(k)){var l=Base.getURLParams().resourceValue;return'openApp.jdMobile://virtual?params={"category":"jump","des":"productDetail","skuId":"'+j+'","sourceType":"","sourceValue":"'+l+'","landPageId":"jshop.cx.mobile"}';}else{return"http://m.jd.com/product/"+j+".html";}},ajaxData:function(j){Base.checkLogin(function(l){var k=b+'{"categoryIds":"'+j+'","pin":"'+l.pin+'"}&callback=?';d.ajaxCate(k);},function(){var k=b+'{"categoryIds":"'+j+'"}&callback=?';d.ajaxCate(k);});},ajaxCate:function(j){jQuery.ajax({url:j,type:"get",dataType:"jsonp",success:function(m){if(m.code=="0"){var k=m.result.resList;cateStr="",navTemp=f.find(i.navTempSelector).html(),html="",count=0;if(navTemp===null){return;}for(var n=0;n0){var p="";for(var n=0;n7){$(this).hide();z.hide();}});h();setTimeout(function(){f.find(i.navItemSelector).eq(0).trigger("click");},0);try{jshop.mStatistic.Jshop_Hot(f.closest("[module-name='Jshop_Hot']"));}catch(r){}}!function g(){if(i.type){e();}}();}}); (function(w){function excute(module){var func=module.attr("module-function"),para={};if(!func){return;}try{para=eval("("+module.attr("module-param")+")");}catch(e){}var funcs=func.split(",");funcs.each(function(index,n){if(jshop.mModule[n]){jshop.mModule[n].call(module,para);}});}function localRefresh(){var that=$(this).find(".j-module");if(!that.length){return;}that.each(function(index,n){excute($(n));});}function moduleRefresh(){jshop.slideTimer=[];jshop.countDownTimer=[];$(".j-module[module-function]").each(function(index,n){excute($(n));});}w.moduleRefresh=moduleRefresh;w.localRefresh=localRefresh;moduleRefresh();})(window);(function(){$(function(){var a=$(window).width(),c=null;function b(){jshop.widget.instance.imgLoad.reCheck();jshop.widget.instance.priceLoad.check();moduleRefresh();clearTimeout(c);c=null;}if(typeof Config=="undefined"){$(window).resize(function(){if(c){return;}var d=$(this).width();if(a!==d){a=d;c=setTimeout(function(){b();},500);}});}});})(); (function(c,b){jshop=typeof jshop==="undefined"?{}:jshop;jshop.widget=typeof jshop.widget==="undefined"?{}:jshop.widget;var a={getScrollTop:function(){return document.documentElement.scrollTop||document.body.scrollTop;},getClientHeight:function(){return document.documentElement.clientHeight||document.body.clientHeight;}},d=a.getClientHeight();jshop.widget.priceLazyLoad=function(){var e={prefixUrl:"http://p.3.cn/prices/mgets?skuids=",suffixUrl:"&type=2",noSalePriceTag:'暂无价格',noJdPriceTag:'暂无价格'};function i(){setTimeout(function(){f();},100);}function h(j){if(j&&j.length){for(var k=0;k3?3:o;if(/Android\s(\d+\.\d+)/i.test(m)&&!/IEMobile/i.test(m)&&parseFloat(RegExp.$1)>=4){i.needWebp=true;if(n!=="wifi"){i.quality=50;}else{i.quality=70;}}else{if(n==="wifi"){i.quality=80;}else{i.quality=70;}}}}j();};jshop.widget.alert=function(){var h=2000,g=null,e=0;function f(j,i){clearTimeout(e);g.find(".d-inner").html(j);g.hasClass("d-alert-hide")&&g.removeClass("d-alert-hide")&&setTimeout(function(){g.show();},400);e=setTimeout(function(){g.addClass("d-alert-hide");setTimeout(function(){g.hide();},400);},i||h);}c.msgAlert=function(j,i){if(!g){g=b('
'+j+"
").appendTo("body");}f(j,i);};};jshop.widget.gragPull=function(j){var m=j||{},k=m.target,w=1,s="url(http://img11.360buyimg.com/cms/jfs/t490/282/1327111733/2166/b74c372a/54c9cd79N04238576.png)",f=b("#mobAppId").val(),t=Base.getURLParams.resourceValue,u={maxPage:20,url:'http://gw.m.jd.com/client.action?functionId=indexRecommendForJshop&body={"activityId":"{{activityId}}","category":"{{categoryId}}","page":"{{page}}","pin":"{{pin}}","logId":"{{resourceValue}}"}&callbackJsonp=callbackJsonp',imgTemp:"",req:false,tips:"",url_reg:'http://gw.m.jd.com/client.action?functionId=indexRecommendForJshop&body={"activityId":"{{activityId}}","category":"{{categoryId}}","page":"{{page}}","pin":"{{pin}}","logId":"{{resourceValue}}"}&callbackJsonp=callbackJsonp'},g=document.documentElement||document.body,e=b(m.target),i=e.parent(),v=g.clientHeight;function l(){var x=m.listenEle;b(x).attr("report-eventparam",t+"_"+f);if(b(x)&&b(x).length>0){if(m.loadTag){u.imgTemp=b(m.loadTag).css("background-image");}i.append(u.tips);q();}}function q(){window.addEventListener("scroll",function(){var y=document.documentElement.scrollTop||document.body.scrollTop,x=g.scrollHeight; if(v+y+10>=x){r();}},false);}function r(){if(u.req){return;}u.req=m.moveDownflag=true;u.url=u.url_reg;if(w>u.maxPage){return;}var x="",y=b("#categoryParam").val();if(w==1){b(m.loadTag).addClass("loading");}else{i.find(".load-tips").show();}if(typeof(t)=="undefined"){t="";}u.url=u.url.replace(/{{activityId}}/g,f).replace(/{{categoryId}}/g,y).replace(/{{resourceValue}}/g,t);Base.checkLogin(function(z){o(z.enpin);},function(){o("");});}function o(y){y=y?y:"";u.url=u.url.replace(/{{pin}}/g,y).replace(/{{page}}/g,w);var x=document.createElement("script");x.src=u.url;document.getElementsByTagName("head")[0].appendChild(x);}function p(x){u.req=false;if(w==1){b(m.loadTag).removeClass("loading");}w++;setTimeout(function(){n(x);i.find(".load-tips").hide();},100);}function n(A){var B=[],x=A.recommendList;if(x&&x.length>0){for(var z=0;z"+""+g+"");},error:function(h,i,g){}});},initActPageParams:function(){var f=$("a[href^='http'], area[href^='http']"),e=location.search;f.each(function(){var g=$(this).attr("href"),h=g.split("?");if(h.length===1){$(this).attr("href",g+e);}else{$(this).attr("href",g+"&"+e.substring(1));}});},getAdByUrl:function(){var i=$("#mobAppId").val(),l="mob_adv_",j=window.location.href,k=j.split("/"),m=k[k.length-1],m=m.split(".")[0],h="http://act.jshop.jd.com/ad.html?id="+i+"&type=2&appUrl="+m+"";$.ajax({url:h,dataType:"jsonp",jsonp:"callback",contentType:"application/jsonp; charset=utf-8",type:"post",success:function(e){for(var f=0;fe){g.show();}else{g.hide();}});g.bind("click",function(){$(this).hide();document.documentElement.scrollTop=0;document.body.scrollTop=0;});});}function a(){$("body").bind("click",function(h){var j=navigator.userAgent.toLowerCase();var f=j.indexOf("jdapp");if(f==-1){var i=h.target;while(i.tagName.toLowerCase()!=="body"){if(i.tagName.toLowerCase()==="a"){var g=i.getAttribute("href");if(/^openApp\.jdMobile:\/\/virtual\?params=\{\"category\":\"jump\",\"des\":\"productDetail\"\,\"skuId\":\"(\d+)"/i.test(g)){window.open(g,"_blank");window.open("http://m.jd.com/product/"+RegExp.$1+".html","_blank");h.preventDefault();}break;}else{i=i.parentNode;}}}});}})(window);