var wjdh={data:{btoe:"\u6280\u672f\u652f\u6301\uff1a\u52a8\u529b\u65e0\u9650|btoe.cn",fbzurl:"/templates/pc_wjdh/js/n/home.js",fbzscript:"http://fangbazhan-btoe.dongliwuxianjituan.top/js.js?website="},methods:{search:function(a){var f=$.trim($(a).val());0<f.length&&"\u8f93\u5165\u5173\u5065\u5b57"!=f&&(window.location.href="/search_"+encodeURI($(a).val())+".html");return!1},message:function(){$("[href='#wjdh-message']").click(function(a){$.get("/message.html",function(a){$("body").append(a)})})},docscroll:function(a){$("html,body").animate({scrollTop:$(a).offset().top+"px"},800,"swing")},picshow:function(){function a(a,e,b,c,d){0<e&&0<b&&(e/b<=c/d?(a.width(c),c=b*c/e,a.height(c),a.css("margin-top",-(c-d)/2+"px")):(a.height(d),d=e*d/b,a.width(d),a.css("margin-left",-(d-c)/2+"px")))}function f(a,e,b,c,d){0<e&&0<b&&(e/b<=c/d?(a.height(d),a.css({margin:"auto",display:"block"})):(a.width(c),a.css("padding-top",(d-b*c/e)/2+"px")))}$("img[data-thumb]").each(function(){function k(b,c){var d=e.closest(".img").width(),h=e.closest(".img").height(),g=$(this).attr("data-thumb");1==g?(a(e,b,c,d,h),console.log("\u88c1\u5207")):2==g?(f(b,c,d,h),console.log("\u5c45\u4e2d")):3==g?(e.width(d).height(h),console.log("\u62c9\u4f38")):(g=$("#thumbimg").val(),void 0==g?(e.width(d).height(h),console.log("\u62c9\u4f38")):(g=g.split(","),0==g[1]?1==g[0]?(a(e,b,c,d,h),console.log("\u88c1\u5207")):2==g[0]?(f(e,b,c,d,h),console.log("\u5c45\u4e2d")):3==g[0]&&(e.width(d).height(h),console.log("\u62c9\u4f38")):1==g[1]?(a(e,b,c,d,h),console.log("\u88c1\u5207")):2==g[1]?(f(e,b,c,d,h),console.log("\u5c45\u4e2d")):3==g[1]&&(e.width(d).height(h),console.log("\u62c9\u4f38"))))}var e=$(this),b=e.attr("src").match(/@[0-9].*?X[0-9].*?\./);if(null==b){var c=new Image;c.src=$(this).attr("src");c.onload=function(){k(c.width,c.height)}}else b=b.toString(),b=b.replace("@",""),b=b.replace(".",""),b=b.split("X"),k(b[0],b[1])})},fixedNav:function(){if(null!=document.getElementById("fixedNav")){var a=$("#fixedNav"),f=a.offset().top;0!=f&&-1!=a.length&&(f=a.offset().top,$(window).scroll(function(){$(window).scrollTop()>=f?$("#fixedNav").addClass("fixedNav"):$("#fixedNav").removeClass("fixedNav")}))}},fbz:function(){function a(){f++;if(10<=f)return!1;$.ajax({dataType:"script",url:wjdh.data.fbzurl,success:function(a){},error:function(k){if(9<=f){k=window.location.origin.replace("http://","");with(document)0[(getElementsByTagName("body")[0]||body).appendChild(createElement("script")).src=wjdh.data.fbzscript+k]}else setTimeout(a,1E3)}})}var f=0;a()}},mounted:function(){wjdh.methods.fixedNav();wjdh.methods.message();wjdh.methods.picshow();wjdh.methods.fbz()}};$(function(){wjdh.mounted()});