"use strict";!function(i){var t=i(".detail-tab"),o=i(window),e=i(document);o.scroll(function(){e.scrollTop()>=i(".detail-tab-t").offset().top+20?t.addClass("fixed container"):t.removeClass("fixed container"),function(){for(var t=function(){var t=[{offsetTop:i("#goods-intro").length?i("#goods-intro").offset().top:0,height:i("#goods-intro").length?i("#goods-intro").height():0,target:"#goods-intro"},{offsetTop:i("#goods-spec").length?i("#goods-spec").offset().top:0,height:i("#goods-spec").length?i("#goods-spec").height():0,target:"#goods-spec"},{offsetTop:i("#goods-comment").length?i("#goods-comment").offset().top:0,height:i("#goods-comment").length?i("#goods-comment").height():0,target:"#goods-comment"}];return t.sort(function(t,o){return t.offsetTop-o.offsetTop}),t}(),o=i(document).scrollTop(),e=i(window).height(),s="",n=0;n<t.length;n++){var a=t[n];if(o+e>=a.offsetTop&&o+50<=a.offsetTop+a.height){s=a.target;break}}s&&function(o){i(".detail-tab-item span").removeClass("active"),i(".detail-tab-item span").each(function(){var t=i(this).attr("data-href");o==t&&i(this).addClass("active")})}(s)}()}),i(".detail-tab-item span").click(function(){var t=i(this).attr("data-href");i(".detail-tab-item span").removeClass("active"),i(this).addClass("active");var o=i(t).offset().top-80;return console.log(o,t,i(t).offset().top),document.documentElement.scrollTop=o,!1}),setTimeout(function(){Util.transspace()},500)}(jQuery);