(function(){$(function(){function d(){var n=$(".j_scrollToTop");if(n.length>0){n.click(function(){window.scrollTo(0,0)})}}function k(){var n=$(".j_backPrePage");if(n.length>0){n.click(function(){window.history.length<=1?window.location.href="/":window.history.go(-1)})}}window.addEventListener("load",function(){d();k()},false);function a(u){var r=null,t=$("#"+u),p=t.children().eq(0).find("img"),s=t.children().eq(1).find("li"),n=p.length,q=n-2,o=1;r=new Swipe(document.getElementById(u),{startSlide:0,auto:4000,speed:300,callback:function(v,w){s.removeClass("active").eq(v).addClass("active");if(o<=q){if(v>=1&&v<=q){var x=p.eq(v+1);if(x.length>0){src=x.attr("data-src");x.attr("src",src)}}o++}}})}function b(s){var o=null,r=$("#"+s),q=r.data("index"),p=r.prev().find("li"),n=r.prev().prev().find("li");if(!!q){q=parseInt(q)-1;if(n.length>1){n.removeClass("active");n.eq(q).addClass("active")}if(p.length>1){p.removeClass("active");p.eq(q).addClass("active")}}else{q=0}o=new Swipe(document.getElementById(s),{startSlide:q,speed:300,callback:function(v,x){if(n.length>1){n.removeClass("active");n.eq(v).addClass("active");if(window.suda){var w=r.prev().prev(),u=w.data("sudaclick");if(u){var y=n.eq(v).text();var t={type:"Tab",name:u,title:y,index:v+1};if(window.suds_count){window.suds_count(t)}}}}if(p.length>1){p.removeClass("active");p.eq(v).addClass("active")}}});$(document).on("click tap",n,function(){if($(this).hasClass("active")){return}var t=n.index(this);o.slide(t,200)});r.children().children().removeClass("hide")}function l(){var o=$(".j_tabSwipe"),n=o.length;if(n==0){return false}for(var p=0;p<n;p++){var q="tabSwipe_"+p;o.eq(p).attr("id",q);b("tabSwipe_"+p)}}function m(){var o=$("#j_searchType");if(o.length==0){return false}var q=$("#j_searchTypeList"),p=q.find("li").children(),n=$("#j_searchTypeValue");o.click(function(){if(q.css("display")==="none"){q.show()}else{q.hide()}});p.click(function(){var s=$(this),t=s.html(),r=s.data("key");q.hide();p.removeClass("active");s.addClass("active");o.html(t);n.val(r)})}function e(n){if(typeof window.onscroll=="function"){var o=window.onscroll;window.onscroll=function(){o();n()}}else{window.onscroll=function(){n()}}}function c(){var r=$(".j_imgdelay"),n=r.length,q=0;if(n==0){return false}var p=document.documentElement.clientHeight;p=p*2;function s(){if(q>=n){return false}for(var u=0;u<n;u++){var v=r.eq(u);if(v.data("imgdelay")===1){continue}var z=document.body.scrollTop||document.documentElement.scrollTop,x=p+z;if(v.offset().top<x){var w=v.find("img"),y=w.length;for(var t=0;t<y;t++){var A=w.eq(t);A.attr("src",A.data("src"))}v.data("imgdelay","1");q=q+1}}}var o;e(function(){if(o){clearTimeout(o)}o=setTimeout(s,200)})}function i(){$(".j_simselect").each(function(){$(this).on("change",function(){var p=$(this),r=p.val(),q=p.find('option[value="'+r+'"]').text(),o=$(this).prev(),n=o.text();o.html(q&&q.length>0?q:r)})})}function f(){$(".j_other").on("click tap",function(){$(this).parent().siblings().find("p").toggle()})}function h(){$(".j_multi").each(function(){var o=$(this).data("maxselect");var n=$(this);$(this).find('input[type="checkbox"]').on("click tap",function(){var p=n.find('input[type="checkbox"]:checked').size();if(p>=o){n.find('input[type="checkbox"]:not(:checked)').attr("disabled",true)}else{n.find('input[type="checkbox"]').removeAttr("disabled")}})})}function j(r){var r=$(r),q=r.data("link"),o=r.val(),n=r.data("page");if(typeof n=="undefined"){n="page"}var p=q.indexOf("?")>-1?"&":"?";location.href=q+p+n+"="+o}setTimeout(function(){a("j_imgSwipe");l();c();m();f();h()},300);window.onpageshow=function(){i();$(".p_search_wrap").find(".j_simselect").eq(0).val("news");$(".p_search_wrap").find(".j_simselect").eq(0).prev().html("")};var g=$(".j_widget_page").length>0?true:false;if(g){$(".j_widget_page").on("change",function(){j(this)})}})})();