(function(){$(function(){function c(){var b=$(".j_backTop");if(b.length>0){b.click(function(){window.scrollTo(0,0)})}}function e(){var b=$(".j_backHistory");if(b.length>0){b.click(function(){window.history.length<=1?window.location.href="/":window.history.go(-1)})}}window.addEventListener("load",function(){c();e()},false);function a(b){var g=null,h=$("#"+b),f=h.data("index"),i=h.find(".relate_item"),j=h.children().eq(0).find("li");if(!!f){f=parseInt(f)-1;if(j.length>1){j.removeClass("active");j.eq(f).addClass("active")}}else{f=0}i.addClass("hide");i.eq(f).removeClass("hide");$(document).on("click tap",j,function(){if($(this).hasClass("active")){return}var k=j.index(this);j.removeClass("active");j.eq(k).addClass("active");i.addClass("hide");i.eq(k).removeClass("hide")})}function d(){var g=$(".j_tabSwitch"),h=g.length;if(h==0){return false}for(var f=0;f<h;f++){var b="tabSwitch_"+f;g.eq(f).attr("id",b);a("tabSwitch_"+f)}}setTimeout(function(){d()},300)})})();