上传图片大小不超过800K,格式仅限于jpg、png'),a.on("click",".upload_file_icon",function(){$("#uploadfiles").click()});t=$("#textfn"),n=$("#search");t.on("keypress",function(e){13===e.keyCode&&n.click()}).maxlength().placeholder(),n.on("click",function(){var e=t.val(),o=t.attr("placeholder");e&&e!==o?IEtype?$("#home-forms").submit():(e=$.trim(e),window.location.href="./search.html?fn="+encodeURIComponent(e)):$.toast(o)}),$("#uploadfiles").bind("input propertychange",function(){var e=document.getElementById("uploadfiles").value;$("#textfn").val(e),IEtype=!0}),$("#textfn").bind("input propertychange",function(){IEtype=!1}),$("#uploadfiles").hover(function(){$(".file_pop").addClass("on")},function(){$(".file_pop").removeClass("on")})}else(i=WebUploader.create({duplicate:!0,dnd:document.body,swf:"./js/lib2/Uploader.swf",auto:!0,disableGlobalDnd:!0,paste:document.body,server:getFontReUrl(API.uploadFontImg),pick:{id:"#fileUoload",multiple:!1},accept:{title:"Images",extensions:"jpg,jpeg,png",mimeTypes:"image/jpg,image/jpeg,image/png"},method:"POST",fileNumLimit:1,compress:!1,duplicate:!0,fileSizeLimit:819200}))&&(i.on("fileQueued",function(e){uploadBefore(),$(".module-before p").text("正在上传图片..."),document.getElementById("beforefile").value=null}),i.on("uploadSuccess",function(e,o){delete o._raw,uploadSuccess(o)}),i.on("uploadComplete",function(e){uploadComplete()}),i.on("uploadError",function(e){uploadError(!0),$(".module-before p").text("拖拽JPG/PNG图像到到此处")}),i.on("error",function(e){"Q_TYPE_DENIED"==e?$.toast("请上传JPG、JPEG、PNG格式文件"):"Q_EXCEED_SIZE_LIMIT"==e?$.toast("文件大小不能超过800K"):"Q_EXCEED_NUM_LIMIT"==e||$.toast("文件上传出错!错误代码"+e)}),i.on("uploadFinished",function(e,o){i.reset()}));$(".search-options").find("div").on("click",function(){var e=$(this),o=$(this).attr("id");"self"===o?(e.addClass("active-self"),window.open("https://www.lianty.com/#/personal-vip")):"enterprise"===o?(e.addClass("active-enterprise"),window.open("https://www.lianty.com/#/enterprise-vip")):e.addClass("active-others"),e.siblings().removeClass()}),$("#forward").on("click",function(){if(Render.file){var e=new FormData;e.append("file",Render.file),o=e,uploadBefore(),$.ajax({url:HOST.FONTRE+API.uploadFontImg,data:o,type:"POST",dataType:"JSON",processData:!1,contentType:!1,error:function(e){uploadError(!0),$(".module-before p").text("拖拽JPG/PNG图像到到此处")},success:function(e){uploadSuccess(e)},complete:function(){uploadComplete()}})}else $.toast("请先选择图片");var o;return!1}),$(".fzh-url").attr("target","_blank"),$(".fzh-url").on("click",function(){var e=$(this).attr("data-name"),o=(new Date).valueOf();if("免费商用"==e){var t="./fontlist?id=20200004&time="+o;window.open(t)}else{t="./fonts.html?fontName="+encodeURIComponent(e);window.open(t)}}),$(".upload_file_icon").hover(function(){$(this).next().addClass("on")},function(){$(this).next().removeClass("on")});var l=$("#home-gotop");$(window).scroll(function(){var e=$(this).scrollTop();l.toggle(e>400)}),l.on("click",function(){return $("html,body").animate({scrollTop:"0"},300),!1});var s=$("#home-sidebar"),c=function(){var e=document.body.offsetWidth,o=parseInt((e-1e3)/2)-75;s.css({right:o,display:"block"})};c();var r=$(".g-ad-box");r.find("i").click(function(){r.hide()});var d=function(){var e=(document.body.offsetWidth-900)/2,o=r.width(),t=5,n=5;if(e>o){var i=e-o-10;t=i,n=i}$(".g-ad-box.left").css({left:t}).show(),$(".g-ad-box.right").css({right:n}).show()};d(),$(window).resize(function(){c(),d()});var p="0";$(".i_tabs").on("click",".i_tab",function(){var e=$(this),o=e.attr("data-type");Number(o)?(p="1",window.open("https://www.lianty.com/companyguide.html")):(p="0",window.open("https://www.lianty.com/localguide.html")),e.hasClass("on")||(e.siblings().removeClass("on"),e.addClass("on"))}),$(".Identify_images").on("click",".i_file_icon",function(){Number(p)?window.open("https://www.lianty.com/companyguide.html"):window.open("https://www.lianty.com/localguide.html")}),$(".home-div-item").hover(function(){var e={color:$(this).attr("active1"),display:"block",width:"180px"},o={border:"1px solid "+$(this).attr("active2"),boxShadow:"0px 4px 16px "+$(this).attr("active2")},t={background:$(this).attr("active1"),display:"inline-block"};$(this).find(".home-div-title").css("color",$(this).attr("active")),$(this).find(".home-div-ftitle").css(e),$(this).find(".separator").css(t),$(this).css(o)},function(){$(this).find(".home-div-title").css("color",""),$(this).find(".home-div-ftitle").css({color:"",display:"none"}),$(this).find(".separator").css({display:"none"}),$(this).css({border:"1px solid #e9f3ff",boxShadow:"unset"})}),$("#search_other").on("click",function(){window.open("https://www.lianty.com/#/")}),$("#search1").on("click",function(){window.open("https://www.lianty.com/#/")}),$("#fileUoload1").on("click",function(){window.open("https://www.lianty.com/#/")})});