function handleLayoutPageResize(){$("#products-menu>li, .navmeun-content .tab-pane, .navmeun-content .tab-pane a").removeClass("active");$("#products-menu>li:first-child, .navmeun-content .tab-pane:first-child, .navmeun-content .tab-pane a:first-child").addClass("active");$("#navbar .dropdown-menu").removeAttr("style");$("#nav_category .dropdown-menu").css({opacity:"1"});nav_product_img();act_data_src();act_data_bg()}function nav_product_img(){if(device=="mobile"){$("#products-menu>li, .navmeun-content .tab-pane, .navmeun-content .tab-pane a").removeClass("active");$("#products-menu>li:first-child, .navmeun-content .tab-pane:first-child, .navmeun-content .tab-pane a:first-child").addClass("active");$("#nav_category>a").bind("touchstart touchend click",function(n){if(n.stopPropagation(),$(".tab-pane.active>.product-info").is(".col-sm-12")){var i=$(".tab-pane.active>.product-info .btn-more2>img.img-hotnews"),t=i.attr("data-src");typeof t!=typeof undefined&&t!==!1&&$(".btn-more2>img").each(function(){var n=$(this).attr("data-src");typeof n!=typeof undefined&&n!==!1&&($(this).attr("src",n),$(this).removeAttr("data-src"),$(this).on("load",function(){$(this).parent(".btn-more2").css({"background-image":"none"});$(this).parent().parent(".product-info").css({"background-image":"none"})}).error(function(){$(this).attr("src","/images/dot.png")}))});$(".tab-pane.active>.product-info").removeClass("hidden-xs")}});$("#products-menu a[data-toggle='pill']").on("touchstart touchend click",function(n){n.preventDefault();n.stopPropagation();$(this).blur();var t=$(this).attr("aria-controls");$("#products-menu li").removeClass("active");$(this).parent().addClass("active");$("#nav_category .tab-pane").removeClass("active");$("#"+t).addClass("active");$("#"+t).find(".product-info").is(".col-sm-12")&&$("#"+t).find(".col-sm-12").removeClass("hidden-xs")});browserWidth>767&&$("#nav_category").unbind("click").bind("click touchstart",function(n){n.stopPropagation();act_data_src()});act_data_bg();$("#nav_category .hidden-xs").removeClass("match-height");$("#nav_category .match-height").matchHeight();var n=0;$("#nav_category .match-height").attr("style").indexOf("min-height")>0&&$("#nav_category .match-height").css({height:"","min-height":""});$("#nav_category .match-height").each(function(){var t=$(this).height();n=t>n?t:n});$("#nav_category .match-height").css({"min-height":n})}else{act_data_src();act_data_bg();$(document).on("mouseenter","#nav_category",function(){$("#products-menu>li, .navmeun-content .tab-pane, .navmeun-content .tab-pane a").removeClass("active");$("#products-menu>li:first-child, .navmeun-content .tab-pane:first-child, .navmeun-content .tab-pane a:first-child").addClass("active");var n=0;$("#nav_category .match-height").attr("style").indexOf("min-height")>0&&$("#nav_category .match-height").css({height:"","min-height":""});setTimeout(function(){$("#nav_category .match-height").each(function(){var t=$(this).height();n=t>n?t:n});$("#nav_category .match-height").css({"min-height":n})},600)});$("#nav_category .match-height").matchHeight();$("#products-menu li").on("mouseenter",'[data-toggle="pill"]',function(){$("#products-menu li").removeClass("active");$(this).parent().addClass("active");$("#nav_category .tab-pane").removeClass("active");var n=$(this).attr("aria-controls");$("#"+n).addClass("active");$("#"+n).find(".btn-more").removeClass("active");$("#"+n).find(".btn-more:first-child").addClass("active")}).find('a[data-toggle="pill"]').unbind("click").blur().bind("click",function(n){var t,i;n.preventDefault();n.stopPropagation();$(this).blur();t=$(this).attr("data-url");typeof t!=typeof undefined&&t!==!1?location.href=t:(i=$(this).attr("target"),typeof i!=typeof undefined&&i!==!1?window.open($(this).attr("href"),i):location.href=$(this).attr("href"))});$("#nav_category .tab-pane li").on("mouseenter","a",function(){var n=$(this).attr("aria-controls");typeof n!=typeof undefined&&n!==!1&&($(".btn-more").removeClass("active"),$("#"+n).addClass("active"))})}}function act_data_src(){$(".btn-more>img, .btn-more2>img").each(function(){var n=$(this).attr("data-src");typeof n!=typeof undefined&&n!==!1&&($(this).attr("src",n),$(this).removeAttr("data-src"),$(this).on("load",function(){$(this).parent(".btn-more").css({"background-image":"none"});$(this).parent().parent(".product-info").css({"background-image":"none"})}).error(function(){$(this).attr("src","/images/dot.png")}))})}function act_data_bg(){$(".col-sm-12.product-info").each(function(){$(".btn-more").each(function(n){n==0?$(this).addClass("active"):$(this).removeClass("active")});var n=$(this),t=$(this).attr("data-bg"),i=$(this).attr("data-url");typeof t!=typeof undefined&&t!==!1&&(n.css({"background-image":'url("/p_images/subweb/'+t+'.png")',cursor:"pointer"}),device=="mobile"&&n.css({"background-size":"95% auto"}),n.removeAttr("data-bg"));typeof i!=typeof undefined&&i!==!1&&($(this).bind("click",function(){window.open(i)}),$(this).removeAttr("data-url"))})}function navbar(n){n=="desktop"?($("#navbar>.navbar-nav>li .box").remove(),$(".navbar-nav .dropdown-submenu a").unbind("click").blur().click(function(n){$(this).attr("href").indexOf("void")<0?$(this).attr("target")!="_blank":(n.preventDefault(),$(this).blur())}),$(".navbar-nav li.dropdown-submenu").removeClass("open"),$(".navbar-nav > li.dropdown").removeClass("open").unbind("mouseenter").mouseenter(function(){$(this).addClass("open");var n=$(this).children(".dropdown-menu");n.css({height:"auto"});n.stop().animate({height:"auto",opacity:1},100,"easeInOutBack",function(){n.css({display:"block",opacity:1})})}),$(".navbar-nav > li.dropdown").unbind("mouseleave").mouseleave(function(){$(this).removeClass("open");var n=$(this).children(".dropdown-menu");n.stop().animate({height:0},100,function(){n.css({display:"none",opacity:0,height:0})})}),$("#navbar>.navbar-nav>li.dropdown>a").unbind("mouseenter").unbind("mouseleave").bind({mouseenter:function(){var r,u;$("#navbar>.navbar-nav>li .box").remove();var i=$(window).width(),f=$("#topmenu").hasClass("stuck"),t=$(this).parent().position().left,n=0;f==!0?i<=1096?(n=-1,t+=-1):n=0:i<=858?(n=-4,t+=0):n=0;r=$(this).parent().width()-n;u=$(this).parent().height()-4;$(this).before("<div class='box'><\/div>");$("#navbar>.navbar-nav>li .box").css({opacity:1,width:r,height:u,left:t})},mouseleave:function(){var n=$(this);setTimeout(function(){n.parent().hasClass("open")||n.siblings(".box").remove()},60)}}),$("#navbar>.navbar-nav>li>.dropdown-menu").bind({mouseleave:function(){$("#navbar>.navbar-nav>li .box").remove()}})):($(".navbar-nav > li.dropdown").unbind("mouseenter").unbind("mouseleave"),$(".navbar-nav > li.dropdown a, .navbar-nav li.dropdown-submenu a").unbind("click").click(function(){$(".navbar-nav > li.dropdown").removeClass("active");$(this).parent().addClass("active");var n=$(this).parent().hasClass("open"),t=$(this).parent().hasClass("dropdown-submenu");t!=!0?$(".navbar-nav > li.dropdown").removeClass("open"):$(".navbar-nav > li.dropdown-submenu").removeClass("open");$(this).parent().parent().find(".dropdown-menu:visible").removeAttr("style").hide();n!=!0?($(this).parent().addClass("open"),$(this).siblings(".dropdown-menu").show()):($(this).parent().removeClass("open"),$(this).siblings(".dropdown-menu").hide());$(this).is(":hidden")==!0&&$(this).siblings("a").blur()}))}function loadPolicyData(n){$("#PolicyModal .col-xs-12").html()==""?$.ajax({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},url:"/LRwebService.asmx/get_PolicyData",data:{lang:n},method:"post",dataType:"json",async:!0,success:function(n){if(n.length){var t;t=n[0].content;$("#PolicyModal .col-xs-12").html(t);$("#PolicyModal").modal("show")}}}):$("#PolicyModal").modal("show")}function detectWinHeight(){$(document).height()-(browserWidth>991?117:102)<$(window).height()+120?$("#container_wrap>.container").css({"min-height":$(window).height()-($("#page-footer").outerHeight()+$("#topmenu").outerHeight())+155}):$("#container_wrap>.container").removeAttr("style")}function setModalMaxHeight(n){this.$element=$(n);this.$content=this.$element.find(".modal-content");var t=this.$content.outerHeight()-this.$content.innerHeight(),i=$(window).width()<768?20:60,r=$(window).height()-(i+t),u=this.$element.find(".modal-header").outerHeight()||this.$element.find(".modal-header").length?65:0,f=this.$element.find(".modal-footer").outerHeight()||this.$element.find(".modal-footer").length?65:0,e=r-(u+f);this.$content.css({overflow:"hidden"});this.$element.find(".modal-body").css({"max-height":e,"overflow-y":"auto"}).find(".mCustomScrollBox").css({"max-height":"100%"})}function hideAlt(n){for(var r=document.getElementsByTagName(n),i,u,t=0;t<r.length;t++)i=r[t],u=i.title,u!==""&&(i.onmouseover=function(){this.setAttribute("org_title",this.title);this.title=""},i.onmouseout=function(){this.title=this.getAttribute("org_title")})}function PopupCenter(n,t,i,r){var u=window.screenLeft!=undefined?window.screenLeft:window.screenX,f=window.screenTop!=undefined?window.screenTop:window.screenY,e=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,s=e/2-i/2+u,h=o/2-r/2+f,c=window.open(n,t,"scrollbars=yes, width="+i+", height="+r+", top="+h+", left="+s);window.focus&&c.focus()}function showProgress(){$("#UpdateProgress").show()}function hideProgress(){$("#UpdateProgress").fadeOut()}function handleSearch(){if($("#searchModal").length){$("#searchModal").on("hidden.bs.modal",function(){searchbcheck()});$(".search-panel .dropdown-menu").find("a").click(function(n){n.preventDefault();var t=$(this).attr("href").replace("#",""),i=$(this).text();$(".search-panel #search_concept").text(i);$(".input-group #search_param").val(t)});$("#searchModal").on("show.bs.modal",function(n){var t=$(n.relatedTarget);t.one("focus",function(){$(this).blur()})});$("#searchModal").on("hidden.bs.modal",function(){$("input#search_keyword").val("")});$("#search_btn").click(function(n){$("#searchModal").hasClass("in")?$("#searchModal").modal("hide"):searchbcheck();n.preventDefault()});$("input#search_keyword").keypress(function(n){n.keyCode=="13"&&($("#searchModal").modal("hide"),n.preventDefault())}).autocomplete("/LRwebService.asmx/AutoSearch",{delay:10,width:252})}}function searchbcheck(){var t=$("#search_param").val(),n=$("input#search_keyword").val();if(jQuery.trim(n).length>0)switch(t){case"Drivers":window.location.replace("/"+lang+"/support/download/?model="+n+"#drivers");break;case"Manual":window.location.replace("/"+lang+"/support/download/?model="+n+"#manual");break;default:$.ajax({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")},type:"POST",url:"/LRwebService.asmx/product_search",data:{lang:lang,proname:n},success:function(n){n.length>0&&n.substring(0,1)=="/"?window.location.href=n:bootbox.dialog({message:n,size:"small"})}})}}function resort(){$(".tab-pane").each(function(){var n=$(this).find(".product-info"),t=n.children("a");t.detach().sort(function(n,t){var i=$(n).data("release"),r=$(t).data("release");return i<r?i<r?1:0:-1});n.append(t)})}function getUserLanguage(){let n=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage||"";return(n=n.toLowerCase(),n==="zh-cn"||n==="zh-sg")?"cn":n}function progressBar(){$("#top_container .owl-dot").first().removeClass("active");start()}function buildProgressBar(){$progressBar=$("<div>",{id:"progressBar"});$bar=$("<div>",{id:"bar"});$progressBar.append($bar).prependTo($("#top_container > .owl-carousel"))}function start(){percentTime=0;isPause=!1;tick=setInterval(interval,10)}function interval(){isPause===!1&&(percentTime+=1/time,percentTime>=100&&(time=7,isPause=!0,$("#top_container .owl-dot.active").addClass("end"),$("#top_container > .owl-carousel").trigger("next.owl.carousel"),clearTimeout(tick),percentTime=0,setTimeout(function(){$("#top_container .owl-dot.end").removeClass("end")},200)))}function pauseOnDragging(){isPause=!0}function owlCallback(n){var r=n.item.count,t=4,i;switch(r){case 2:t=5;break;case 3:t=6;break;case 4:t=7;break;case 5:t=9;break;case 6:t=10;break;case 7:t=12;break;case 8:t=13;break;case 9:t=15;break;default:t=4}i=$("#top_container .owl-item:nth-child("+t+")>a");i.css({"background-image":"url("+i.data("src")+")",transition:"opacity 0.4s ease 0s",opacity:"1"});showOwlBg()}function showOwlBg(){var n=$(".owl-item.active .bg-img");typeof n.attr("data-src")!="undefined"&&n.css({"background-image":"url("+n.attr("data-src")+")"})}function moved(){time=isMobile==!0?7.7:7;clearTimeout(tick);start()}function checkDevice(){if(flag_device==null)divice_W=="mobile"&&($("#col-hot1 .menu_itemWrap:eq(1)").before($("#col-hot3 .menu_itemWrap:eq(0)")),$("#col-hot3 .menu_itemWrap:eq(0)").before($("#col-hot1 .menu_itemWrap:eq(2)")),flag_device=divice_W);else if(divice_W!=flag_device){switch(divice_W){case"mobile":$("#col-hot1 .menu_itemWrap:eq(1)").before($("#col-hot3 .menu_itemWrap:eq(0)"));$("#col-hot3 .menu_itemWrap:eq(0)").before($("#col-hot1 .menu_itemWrap:eq(2)"));break;case"desktop":$("#col-hot1 .menu_itemWrap:eq(1)").before($("#col-hot3 .menu_itemWrap:eq(0)"));$("#col-hot3 .menu_itemWrap:eq(0)").before($("#col-hot1 .menu_itemWrap:eq(2)"))}flag_device=divice_W}}function checkpoints(){var n=$(window).width(),t;n>750?(divice_W="desktop",t=Math.floor((n*.25-12)*.726)):(divice_W="mobile",t=Math.floor((n-12)*.724));handeMenubar();navbar(divice_W);checkDevice();$("#col-hot1").imagesLoaded(function(){$("#menu").css("opacity","1");divice_W=="mobile"&&$("#menu_inner .menu_item").css({height:$("#col-hot1 .menu_item").height()})})}var ie8=!1,lang,ieEdge=document.documentMode||/Edge/.test(navigator.userAgent)?!0:!1,isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?!0:!1,device,check_W=767,divice_W,_host=window.location.host,LRDN="com",strURL,browserWidth,flag_dataResponse,USER_Language,boxH,flag_dataSolution,time,$progressBar,$bar,$elem,isPause,tick,percentTime,owl,handeMenubar,flag_device,resize;_host.toLowerCase().indexOf("www.leadtek")!=-1&&(strURL=top.document.URL.toLowerCase(),(strURL.indexOf("www.leadtek.com.cn/chs/")!=-1||strURL.indexOf("www.leadtek.com/chs/")!=-1)&&(LRDN="cn"));$.browser.msie&&parseFloat($.browser.version)<=8&&(ie8=!0);$.browser.chrome&&(jQuery.event.special.touchstart={setup:function(n,t,i){t.includes("noPreventDefault")?this.addEventListener("touchstart",i,{passive:!1}):this.addEventListener("touchstart",i,{passive:!0})}});lang==null&&window.location.pathname.toString().indexOf("/")!=-1&&(lang=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")+1).split("/")[1].toLowerCase());device=isMobile==!0?"mobile":"desktop";browserWidth=$(window).width();$.fn.dataImg=function(n){function u(n){var i=$(window).width();return i>t.med?n.data("lrg"):i<=t.med&&i>t.sml-15?n.data("med"):n.data("sml")}function i(){r.each(function(){var n=$(this),t=u(n),i=$(this).css("background-image");n.parent().hasClass("active")?n.css({"background-image":"url("+t+")",transition:"opacity .4s ease",opacity:"1"}):i!="none"&&n.css({"background-image":"url("+t+")",transition:"opacity .4s ease",opacity:"1"});n.attr({"data-src":t})})}var t=$.extend({sml:500,med:752,lrg:1600,resize:!0},n),r=$(this);i();t.resize==!0&&$(window).resize(function(){i()})};flag_dataResponse=!1;$.fn.dataResponse=function(n){function r(n){var t=$(window).width();return t>i.mob+17?n.data("det"):n.data("mob")}function u(){flag_dataResponse==!1?(t.each(function(){var n=$(this),t=r(n);n.attr({"data-src":t})}),t.lazy()):t.each(function(){var n=$(this),t=r(n);typeof n.data("type")!="undefined"&&(n.data("type").toLowerCase()=="bg"?typeof n.data("bgcolor")!="undefined"?n.attr({style:"background-image:url("+t+"); background-color:#"+n.data("bgcolor")}):n.attr({style:"background-image:url("+t+")"}):n.attr({src:t}))});flag_dataResponse=!0}var i=$.extend(n),t=$(this);u();i.resize==!0&&$(window).resize(function(){u()})};var layoutInit=function(){detectWinHeight();browserWidth=$(window).width();$(document).height()>$(window).height()&&(browserWidth=window.innerWidth);$("#select-lange .dropdown-menu").find("li").clone().appendTo("#select-lang_top .dropdown-menu");$(".tooltip").tooltip();$("[data-toggle='tooltip'], [data-tooltip='true']").tooltip();$('[data-toggle="popover"]').popover();$(".navbar-toggle").on("click",function(){$(this).toggleClass("active")});$(".widget-links>ul>li>a").hover(function(){$(this).find("i").removeClass("fa-angle-right").addClass("fa-circle-o")},function(){$(this).find("i").removeClass("fa-circle-o").addClass("fa-angle-right")});$("#bottom_fb").length&&$("#bottom_fb > a").attr("href",lang=="cht"?"https://www.facebook.com/leadtektaiwan/":"https://www.facebook.com/leadtekglobal/");$("#bottom_YouTube").length&&$("#bottom_YouTube > a").attr("href",lang=="cht"?"https://www.youtube.com/channel/UCDdX1c2fj5LtQ3zZnAL8MkA":"https://www.youtube.com/channel/UC_5QZB1Ukrk3BdBtmWCiPoQ");$(".modal.modal-middle").on("show.bs.modal",function(){isMobile==!1&&$(this).find(".modal-body").mCustomScrollbar({theme:"dark-2",mouseWheelPixels:200});setModalMaxHeight(this)});resort();var n=$.cookie("agree_cookie");typeof n!="undefined"&&n=="agree"&&$("#aside_cookie_pol").remove()},handlefancybox=function(){$(".fancybox").fancybox({openEffect:"none",closeEffect:"none",beforeShow:function(){var n=$(this.element).attr("org_title");this.title=typeof n!=typeof undefined&&n!==!1?n:$(this.element).attr("title")},helpers:{title:{type:"inside"},overlay:{locked:!1}}});$(".fancybox-media").click(function(){var n=$(this).data("width"),r=$(this).data("height"),t=$(this).data("maxwidth"),i=$(this).data("maxheight");return $.fancybox({maxWidth:typeof t!=typeof undefined&&t!==!1?t:1280,maxHeight:typeof i!=typeof undefined&&i!==!1?i:800,type:"iframe",iframe:{preload:!1},openEffect:"none",closeEffect:"none",fitToView:!1,width:typeof n!=typeof undefined&&n!==!1?n:"90%",height:typeof r!=typeof undefined&&n!==!1?r:"90%",autoSize:!1,closeClick:!1,fixed:!0,href:this.href.replace(new RegExp("watch\\?v=","i"),"v/"),helpers:{overlay:{locked:!1}}}),!1});$(".fancybox-thumb").fancybox({prevEffect:"none",nextEffect:"none",helpers:{title:{type:"inside"},thumbs:{width:50,height:50},overlay:{locked:!1}}})},handleUpdateProgress=function(){showProgress()},handleScrollToTop=function(){$("#scrollToTop").click(function(){$("body,html").animate({scrollTop:0},{duration:800,easing:"easeInOutExpo"});setTimeout(function(){$("a.go-top").blur()},1e3)})};$(document).on("click","#aside_bt_switch>a",function(n){$("#aside_cookie_pol").addClass("active down");$(this).addClass("hidden down");n.preventDefault()});$(document).on("click","#aside_container>.btn",function(n){$("#aside_bt_switch>a").click();$.cookie("agree_cookie","agree",{expires:365,path:"/"});$("#aside_cookie_pol").remove();n.preventDefault()});$(document).on("click","#page-footer .LRlegal",function(){$(this).attr("href","https://account.leadtek.com.tw/Privacy_Policy?lang="+lang)});$(document).on("click","#aside_cookie_pol .LRlegal",function(n){loadPolicyData(lang);n.preventDefault()});$(document).on("click",".qr_code",function(n){n.preventDefault();var t="http%3A//"+window.location.host+window.location.pathname,i="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl="+t+"&chld=L|4";$.fancybox([i],{padding:0,transitionIn:"none",transitionOut:"none",type:"image",changeFade:0})});window.onpageshow=function(n){n.persisted&&setTimeout(function(){$("#UpdateProgress").hide()},1e3)};"addEventListener"in document&&document.addEventListener("DOMContentLoaded",function(){FastClick.attach(document.body)},!1),function(){typeof LRDN!="undefined"&&LRDN==="cn"&&document.addEventListener("DOMContentLoaded",function(){try{window._hmt=window._hmt||[];var n=document.createElement("script");n.src="https://hm.baidu.com/hm.js?a6d90de3459f6dee199d764750dd2903";n.async=!0;n.defer=!0;n.onerror=function(){console.warn("Baidu HM 載入失敗，已略過")};document.head.appendChild(n)}catch(t){console.warn("Baidu HM 初始化錯誤",t)}})}();$(window).on("load",function(){nav_product_img();device=="mobile"&&$(".navmeun-content .tab-pane .list-unstyled a,.navbar-nav .dropdown-submenu .dropdown-menu a").unbind("click mouseenter").blur().bind("touchstart touchend click",function(n){n.stopPropagation()});setTimeout(function(){if(hideProgress(),ie8==!0)$("#NSbrowserModal img").attr("src","/images/icon_browser.png"),$("#NSbrowserModal").modal({backdrop:"static",keyboard:!1});else if(isMobile==!1){WOW.prototype.addBox=function(n){this.boxes.push(n)};let n=new WOW({boxClass:"wow",animateClass:"animated",offset:20,mobile:!1,callback:function(n){let t=n.getAttribute("data-action");typeof myAction=="function"&&t&&myAction(t)}});n.init();$(".wow.loop").on("scrollSpy:exit",function(){$(this).css({visibility:"hidden","animation-name":"none"}).removeClass("animated");n.addBox(this)}).scrollSpy()}else $(".wow").addClass("wow-removed").removeClass("wow")},600);setTimeout(function(){$("#topmenu").css({transition:"all .15s ease-in-out"})},800)});if(USER_Language=getUserLanguage(),LRDN==="cn"&&USER_Language=="cn"){function loadQiYu(){if(!window._qiyuLoaded){window._qiyuLoaded=!0;try{window.ysf=window.ysf||function(){(window.ysf.a=window.ysf.a||[]).push(arguments)};var n=document.createElement("script");n.src="https://qiyukf.com/script/3e3ecb3b261d8ab60f4af5c4ee5a4d77.js";n.async=!0;document.head.appendChild(n)}catch(t){console.warn("QiYu 初始化錯誤",t)}}}"requestIdleCallback"in window?requestIdleCallback(loadQiYu):setTimeout(loadQiYu,2e3)}flag_dataSolution=!1;$.fn.dataSolution=function(n){function r(n){var i=$(window).width();return i>t.med?n.data("lrg"):i<=t.med&&i>t.sml?n.data("med"):n.data("sml")}function u(){flag_dataSolution==!1?(i.each(function(){var n=$(this),t=r(n);n.attr({"data-src":t})}),i.lazy()):i.each(function(){var n=$(this),t=r(n);typeof n.data("type")!="undefined"&&(n.data("type").toLowerCase()=="bg"?n.attr({style:"background-image:url("+t+")"}):n.attr({src:t}))});flag_dataSolution=!0}var t=$.extend(n),i=$(this);u();t.resize==!0&&$(window).resize(function(){u()})};time=7.7;owl=$("#top_container > .owl-carousel");owl.owlCarousel({animateOut:isMobile==!0?!1:$.browser.chrome&&!ieEdge?"fadeOut":!1,items:1,loop:!0,margin:0,onInitialized:progressBar,onTranslated:moved,onDrag:pauseOnDragging,nav:!0,lazyLoad:!0,navText:['<i class="fa fa-angle-left fa-2x"><\/i>','<i class="fa fa-angle-right fa-2x"><\/i>'],dots:!0,onDragged:owlCallback}).on("changed.owl.carousel",function(){showOwlBg();clearTimeout(tick);percentTime=0});handeMenubar=function(){var n=0;$(window).scroll(function(){var t=$(this).scrollTop();t>n?($(".navbar").addClass("stuck"),$("#banner_top").addClass("stuck")):t<1&&(navigator.userAgent.match(/(iPod|iPhone|iPad)/)?setTimeout(function(){$(".navbar").removeClass("stuck");$("#banner_top").removeClass("stuck")},600):($(".navbar").removeClass("stuck"),$("#banner_top").removeClass("stuck")));t>120?($("a.go-top").css({visibility:"visible","padding-bottom":"19px"}),$("#aside_cookie_pol").addClass("active").removeClass("down"),$("#aside_bt_switch a").addClass("hidden").removeClass("down"),$("#YSF-BTN-HOLDER").addClass("active")):($("a.go-top").css({visibility:"hidden","padding-bottom":"0"}),$("#aside_cookie_pol").not(".down").removeClass("active down"),$("#aside_bt_switch a").not(".down").removeClass("hidden down"),$("#YSF-BTN-HOLDER").removeClass("active"));n=t})};$("#iconCarousel .owl-carousel").owlCarousel({loop:!1,margin:0,nav:!0,dots:!1,navText:["<i class='fa fa-angle-left fa-2x' aria-hidden='true'><\/i>","<i class='fa fa-angle-right fa-2x' aria-hidden='true'><\/i>"],pagination:!1,responsive:{0:{items:2},467:{items:2},768:{items:3}}});$("#newCarousel .owl-carousel").owlCarousel({loop:!1,nav:!0,dots:!1,lazyLoad:!0,navText:["<i class='fa fa-angle-left fa-2x'><\/i>","<i class='fa fa-angle-right fa-2x'><\/i>"],pagination:!1,responsive:{0:{items:1},467:{items:2},990:{items:3}}}).on("changed.owl.carousel",function(n){var t=$("#newCarousel .owl-item.active .news_image"),i=n.item.index+1,t=$("#newCarousel .owl-item:nth-child("+i+")").find(".news_image");typeof t.attr("data-src")!="undefined"&&t.css({"background-image":"url("+t.attr("data-src")+")"})});jQuery(function(){if(typeof layoutInit!="undefined"&&layoutInit(),checkpoints(),$("[data-img='bgImg']").dataImg({sml:500,med:752,lrg:1600,resize:!0}),$(".dataResponse").dataResponse({mob:750,resize:!0}),$(".solution_item>.img-load").dataSolution({sml:443,med:785,lrg:1600,resize:!0}),showOwlBg(),isMobile==!1&&jarallax(document.querySelectorAll(".jarallax")),$(".lazy").Lazy(),$("#iconCarousel").slideDown("400","easeInQuad"),$(".w-box>a").click(function(){$(this).attr("target")!="_blank"&&$(this).attr("class")!="fancybox-media"&&showProgress()}),$("a.popup").click(function(n){n.preventDefault();var t=$(this).attr("href").toString().replace(/<[^>]+>/g,".");PopupCenter(t,"Leadtek","600","560")}),$(".line").length){var n="https://lineit.line.me/share/ui?url=";isMobile==!0?(n="http://line.naver.jp/R/msg/text/?",$(".line>a").each(function(){var t=$(this).data("url"),i=$(this).attr("title");$(this).attr("href",n+i+"%0D%0A"+t)})):$(".line>a").each(function(){var t=$(this).data("url");$(this).attr("href",n+encodeURIComponent(t))})}$("#top_container .owl-dot").first().addClass("active");handleScrollToTop();handleSearch();handlefancybox();hideProgress();hideAlt("a")});$(window).resize(function(){resize&&clearTimeout(resize);resize=setTimeout(function(){var n,t=$(window).width();$(document).height()>$(window).height()&&(t=window.innerWidth);n=t>check_W?"desktop":"mobile";divice_W!=n&&navbar(n);$(".modal.modal-middle.in").length!=0&&setModalMaxHeight($(".modal.modal-middle.in"));handleLayoutPageResize();checkpoints()},600)});$(window).on("load",function(){setTimeout(function(){$("#banner_top").css({transition:"all .2s linear"})},800)});$(document).on("click",".owl-prev, .owl-next, .owl-dot",function(){showOwlBg()})