skin/js/yl.js
(开头部分) 56KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//**!!**Modernizr 3.3.2 (Custom Build) | MIT * 压缩类名. supports chrome Safari csstransf csstranst csstransf3d csstransfs3d gyUEO !
!function(e,n,t){function r(e,n){return typeof e===n}function s(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):C?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function o(e,t,r,o){var i,a,f,l,u="modernizr",d=s("div"),p=function(){var e=n.body;return e||(e=s(C?"svg":"body"),e.fake=!0),e}();if(parseInt(r,10))for(;r--;)f=s("div"),f.id=o?o[r]:u+(r+1),d.appendChild(f);return i=s("style"),i.type="text/css",i.id="s"+u,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=u,p.fake&&(p.style.background="",p.style.overflow="hidden",l=y.style.overflow,y.style.overflow="hidden",y.appendChild(p)),a=t(d,e),p.fake?(p.parentNode.removeChild(p),y.style.overflow=l,y.offsetHeight):d.parentNode.removeChild(d),!!a}function i(e,n){return!!~(""+e).indexOf(n)}function a(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function f(e,n){return function(){return e.apply(n,arguments)}}function l(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n}).replace(/^ms-/,"-ms-")}function u(n,r){var s=n.length;if("CSS"in e&&"supports"in e.CSS){for(;s--;)if(e.CSS.supports(l(n[s]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];s--;)i.push("("+l(n[s])+":"+r+")");return i=i.join(" or "),o("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return t}function d(e,n,o,f){function l(){p&&(delete A.style,delete A.modElem)}if(f=!r(f,"undefined")&&f,!r(o,"undefined")){var d=u(e,o);if(!r(d,"undefined"))return d}for(var p,c,m,h,v,g=["modernizr","tspan"];!A.style;)p=!0,A.modElem=s(g.shift()),A.style=A.modElem.style;for(m=e.length,c=0;m>c;c++)if(h=e[c],v=A.style[h],i(h,"-")&&(h=a(h)),A.style[h]!==t){if(f||r(o,"undefined"))return l(),"pfx"!=n||h;try{A.style[h]=o}catch(e){}if(A.style[h]!=v)return l(),"pfx"!=n||h}return l(),!1}function p(e,n,t,s,o){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+_.join(i+" ")+i).split(" ");return r(n,"string")||r(n,"undefined")?d(a,n,s,o):(a=(e+" "+T.join(i+" ")+i).split(" "),function(e,n,t){var s;for(var o in e)if(e[o]in n)return!1===t?e[o]:(s=n[e[o]],r(s,"function")?f(s,t||n):s);return!1}(a,n,t))}function c(e,n,r){return p(e,t,t,n,r)}var m=[],h=[],v={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){h.push({name:e,fn:n,options:t})},addAsyncTest:function(e){h.push({name:null,fn:e})}},g=function(){};g.prototype=v,g=new g;var y=n.documentElement,C="svg"===y.nodeName,S="CSS"in e&&"supports"in e.CSS,w="supportsCSS"in e;g.addTest("supports",S||w),g.addTest("chrome",function(){return navigator.userAgent.indexOf("Chrome")>-1}),g.addTest("gyUEO",function(){return c("transform", "scale(1)", !0)&&(navigator.userAgent.indexOf("Chrome")>-1||navigator.userAgent.indexOf("Firefox")>-1);}),g.addTest("Safari",function(){return MacTest()});var x=v.testStyles=o,b="Moz O ms Webkit",_=v._config.usePrefixes?b.split(" "):[];v._cssomPrefixes=_;var T=v._config.usePrefixes?b.split(" "):[];v._domPrefixes=T;var P={elem:s("modernizr")};g._q.push(function(){delete P.elem});var A={style:P.elem.style};g._q.unshift(function(){delete A.style}),v.testAllProps=p,v.testAllProps=c,g.addTest("csstransf",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&c("transform","scale(1)",!0)}),g.addTest("csstranst",c("transition","all",!0)),g.addTest("csstransf3d",function(){var e=!!c("perspective","1px",!0),n=g._config.usePrefixes;if(e&&(!n||"webkitPerspective"in y.style)){var t;g.supports?t="@supports (perspective: 1px)":(t="@media (transform-3d)",n&&(t+=",(-webkit-transform-3d)")),x("#modernizr{width:0;height:0}"+(t+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}"),function(n){e=7===n.offsetWHidth&&18===n.offsetHeight})}return e}),g.addTest("csstransfs3d",c("transformStyle","preserve-3d")),function(){var e,n,t,s,o,i,a;for(var f in h)if(h.hasOwnProperty(f)){if(e=[],(n=h[f]).name&&(e.push(n.name),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t]);for(s=r(n.fn,"function")?n.fn():n.fn,o=0;o<e.length;o++)i=e[o],1===(a=i.split(".")).length?g[a[0]]=s:(!g[a[0]]||g[a[0]]instanceof Boolean||(g[a[0]]=new Boolean(g[a[0]])),g[a[0]][a[1]]=s),m.push((s?"":"no-")+a.join("-"))}}(),function(e){var n=y.className,t=g._config.classPrefix||"";if(C&&(n=n.baseVal),g._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}g._config.enableClasses&&(n+=" "+t+e.join(" "+t),C?y.className.baseVal=n:y.className=n)}(m),delete v.addTest,delete v.addAsyncTest;for(var z=0;z<g._q.length;z++)g._q[z]();e.Modernizr=g}(window,document);
/*全局参数*/
var $b,w=$(window),$h=$("html"),Global={},ysq={wrap:".scroll-wrap",Response:!1,HasTan:[!0,!0],Switch:!0,shutDown:!1,IsMoble:!1,Test:!1,TT:!1,Trans:!!$(".csstransf").length,htmlInit:function(){$(ysq.wrap).addClass("show")},basic:function(){function e(){$(".pc").length&&window.devicePixelRatio&&1!=window.devicePixelRatio&&null==GetData("bZoomed")&&(Y_Tan("<p align='center'>页面缩放比例不正确,建议调整浏览器缩放比例为100%。<br />(通用快捷键为:ctrl+0)</p>",{bAutoClose:!1}),SaveData("bZoomed",!0))}for(var t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],o=navigator.userAgent,n=0;n<t.length;n++)if(o.indexOf(t[n])>0){ysq.IsMoble=!0;break}if(Touchable="ontouchstart"in window&&ysq.IsMoble&&!/hp-tablet/gi.test(navigator.appVersion),TouchOn=Touchable?"touchstart":"mousedown",TouchIng=Touchable?"touchmove":"mousemove",TouchEd=Touchable?"touchend":"mouseup",ysq.Switch&&(ysq.Switch=ysq.Trans),Global.device=MinWidth(1024)?"pc":"wap",$h.addClass(Global.device),w.data("device_status",Global.device),ysq.Response)Global={DesignHeight:1080,FPduration:750,resWidth:1024},ysq.FzAuto=function(e){e=e||Global.resWidth;var t=(Math.min(w.width(),e)/e*20).toFixed(0);t=Math.max(t,12)+"px",$("html").css("font-size",t)},ysq.FzAuto();else{var i=parseInt($h.css("min-width")),s=parseInt(window.screen.width)/(i+40);ysq.IsMoble&&(ysq.Switch=!1,document.querySelector('meta[name="viewport"]').setAttribute("content","width="+(i+40)+",initial-scale="+s+",minimum-scale="+s+",target-densitydpi=device-dpi"))}ysq.Switch&&(document.documentElement.firstElementChild.appendChild(document.createElement("style")).innerHTML=ysq.wrap+"{opacity:0.67;} *[scrollEle]{opacity: 0;}",setTimeout(function(){$(ysq.wrap).hasClass("show")||ysq.htmlInit()},500)),window.onload=function(){e(),document.documentMode<(ysq.Response?10:9)&&null==GetData("bIEOk")&&$b.hide()&&confirm("您的浏览器版本过低,建议可以使用最近版的chrome浏览器来获取最好的体验,是否继续访问?")&&($b.show().addClass("lowerIE"),SaveData("bIEOk",!0))},window.onresize=function(){e()}}};ysq.basic();
/*baseFn*/
$(document).ready(function(){w.Y_InitSet().Y_ScrollEle().Y_LazyLoad(),function(e){$b.delegate(".module-Scrollbox","mouseenter",function(){var a=e(this);if(a.hasClass("disable"))return!1;var i=a.hasClass("y")?"y":"x";("x"==i?e(".overview",a).children().width()>e(".viewport",a).width():e(".overview",a).height()>e(".viewport",a).height())&&(e(".overview",a).addClass("mousein"),a[0].unbindable||a.tinyscrollbar({thumbSize:60,axis:i,wheel:!0}),a[0].unbindable=!0,a.find(".scrollbar").stop(!1,!1).fadeIn().data("MsFlag",!0)),a.data("MsFlag")&&a.data("plugin_tinyscrollbar").update("relative")}).delegate(".module-Scrollbox","mouseleave",function(){var a=e(this);if(a.hasClass("disable"))return!1;e(".overview",a).removeClass("mousein")})}(jQuery),w.load(function(){setTimeout(function(){$.fn.Y_LazyLoad.Init&&$.fn.Y_LazyLoad.Init($b),$.fn.Y_ScrollEle.Do&&$.fn.Y_ScrollEle.Do($b),w.trigger("resize")},200),w.trigger("scroll.unTriggered")})});
/*扩展组件*/
$.fn.extend({
Y_InitSet:function(){return ysq.TT&&console.log("加载时间:"+((new Date).getTime()-ysq.TT)+"ms"),function(e){e(".Y_Anchors").length&&(e(".Y_Anchors").each(function(t,n){var a=window.location.hash.match(/anchor=(\w+)/),i=e(n).attr("id");a&&i==a[1]&&Y_BodyScroll({goal:e("#"+a[1]).offset().top,err:e(n).attr("data-err")||w.height()/3,dur:0})}),w.scroll(function(t){e(".Y_Anchors").each(function(t,n){inWindow(e(n))||(window.location.hash="anchor=none")})}))}(jQuery),w.on("scroll.PointNone",function(){$(".notPointNone").length||($b.addClass("pointer-none"),clearTimeout($b[0].scrollTimer),$b[0].scrollTimer=setTimeout(function(){$b.removeClass("pointer-none")},200))}),w.on("scroll.unTriggered",function(){$(".unTriggered").each(function(e,t){!t.Y_Binded&&inWindow($(t),[-100,-100])&&$(t).data("fn")&&(t.Y_Binded=!0,$(t).removeClass("unTriggered").data("fn").call(this,$(t)))})}),function(e){e(".backToTop").length||e(ysq.wrap).append('<div class="backToTop" tltle="点击返回顶部"></div>');var t=e(".backToTop"),n=function(){var n=e(".BottomLine").length?e(".BottomLine").offset().top:0,a=$h.height()-n,i=$h.height()-w.height()-a;t.css({bottom:w.scrollTop()>i?w.scrollTop()-i:0})};w.resize(n).on("scroll.BackTop",function(){n(),w.scrollTop()>w.height()?t.addClass("show"):t.removeClass("show")}).trigger("scroll.BackTop"),t.click(function(){Y_BodyScroll({goal:0,err:0,dur:600})})}(jQuery),function(e){function t(t,n,a){if(t.addClass("HovAni"),1==a)t.mouseenter(function(){var a=750;t.hasClass("animated")||e(this).hasClass(n)||(e(this).addClass(n),a=getAniDur(t),setTimeout(function(){t.removeClass(n)},a))});else{var i,o;t.hover(function(){if(t.hasClass("animated"))return!1;clearTimeout(i),t.hasClass(n)||(o=new Date),e(this).addClass(n+" Ainfinite"),dur=getAniDur(t)},function(){i=setTimeout(function(){t.removeClass(n)},dur-(new Date-o)%dur)})}}"placeholder"in document.createElement("input")||e("[placeholder]").each(function(t,n){if("password"!=e(n).attr("type")){var a=e(n).attr("placeholder"),i=e(n).css("color");(isNull(e(n).val())||e(n).val()==a)&&e(n).val(a).css("color","#888"),e(n).focus(function(){e(n).val()==a&&e(this).val("").css("color",i)}).blur(function(){isNull(e(this).val())&&e(this).val(a).css("color","#888")})}}),$b.delegate("label","click",function(t){if(e(this).is(".focus"))e(this).parent().find(".skin").eq(0).focus();else{var n=e(this).parent().find("input,.bindClick"),a=n.parents(".formItem");n.is(":radio")&&(n.prop("checked",!0),onoff(n.parent()),"not"!=e(".buts",a).attr("pd")&&a.removeClass("red").find(".aftPD").remove()),n.is(":checkbox")&&(n.prop("checked",!n.prop("checked")).parent().toggleClass("on"),"not"!=e(".buts",a).attr("pd")&&n.prop("checked")&&a.removeClass("red").find(".aftPD").remove())}}),$b.find("label.focusHide").siblings(".skin").each(function(t,n){e(n).siblings(".focusHide").hide(),isNull(e(this).val())&&e(this).siblings(".focusHide").show(),e(n).focus(function(t){e(this).siblings(".focusHide").hide()}).blur(function(t){isNull(e(this).val())&&e(this).siblings(".focusHide").show()})}),$b.delegate("a","click",function(t){if("#"==e(this).attr("href")||isNull(e(this).attr("href")))return prevent_default(t)}),(ysq.Trans||ysq.IsMoble)&&e("[HoverEle]").each(function(n,a){isNull(e(a).hasClass("HoverEleArray"))?t(e(a),e(a).attr("HoverEle"),e(a).attr("HoverEleCount")||"1"):e(a).children().each(function(n,i){t(e(i),e(a).attr("HoverEle"),e(a).attr("HoverEleCount")||"1")})}),(ysq.Trans||ysq.IsMoble)&&e("[ActiveEle]").each(function(t,n){e(n).addClass("ActAni").on("click.ActAni",function(){var t=e(this),n=t.attr("ActiveEle");t.hasClass("animated")||t.hasClass(n)||(t.addClass(n),setTimeout(function(){t.removeClass(n)},getAniDur(t)))})})}(jQuery),$(".backToHistory").click(function(){history.back()}),$("[data-text-overflow]").each(function(i,e){var a=$(e),c=eval(a.attr("data-text-overflow")),_L=c[2]||4,d=c[1]||a.width(),e=c[0]||1;d*=e,a.removeAttr("data-text-overflow");var f=$.trim(a.html()).replace(" "," "),g=$("<pre>"+a.html()+"</pre>").css({fontSize:a.css("font-size"),position:"fixed",whiteSpace:"nowrap",visibility:"hidden"}).appendTo($("body")),h=g.width(),err=parseInt(a.css("font-size"))*_L;if(h>d){var i=Math.floor(f.length*d/h),j=f.substring(0,i)+"...";if((h=g.text(j).width()+err)>d)for(;h>d&&i>1;)i--,j=f.substring(0,i)+"... ",h=g.text(j).width()+err;else if(d>h){for(;d>h&&i<f.length;)i++,j=f.substring(0,i)+"...",h=g.text(j).width()+err;h>d&&(j=f.substring(0,i-1)+"...")}a.html(j.replace(" "," "))}g.remove()}),w.trigger("scroll"),this}
,Y_ScrollEle:function(e){if(!ysq.Switch)return ysq.htmlInit(),this;var t={err:[0,w.height()/8],delay:200,fullScreen:!1,responsive:!1,ResAnimation:"fadeInDowns"};e=$.extend({},t,e);var n=[],a=function(t,n,a){return isNull($(t).attr("scrollEle"))?(cw("notScrollEle:"+sElements($(t))),!0):$(t).is(":hidden")?(ysq.TT&&cw("hidden:"+sElements($(t))),!0):!(!e.fullScreen&&n==$b)&&($.fn.Y_ScrollEle.SE_Animate($(t),a),!0)},i=function(t,n,a){e.fullScreen||t.removeAttr("scrollEle"),a=getAniDur(t)+a||getAniDur(t),setTimeout(function(){t.attr("scrollCallback")&&t.addClass("AniDid")},Number(t.attr("scrollCallback"))*a),setTimeout(function(){var a=t.data("scReset")?"AniDoing":"AniDo AniDoing";t.removeAttr("scrollNext").removeClass(n).removeClass(a).parent().removeClass(a),e.fullScreen||t.removeAttr("scrollArray")},a)},o=function(e){switch(e){case"rotateS":return["rotateInUpRight","rotateInDownLeft"];case"rotateN":return["rotateInDownRight","rotateInUpLeft"];case"lightLR":return["lightSpeedInLeft","lightSpeedInRight"];case"slideLR":return["slideInLeft","slideInRight"];case"fadeLR":return["fadeInLeft","fadeInRight"];case"fadeLRs":return["fadeInLefts","fadeInRights"];case"fadeUD":return["fadeInUp","fadeInDown"];case"fade4s":return["fadeInUps","fadeInLefts","fadeInRights","fadeInDowns"];case"fade4":return["fadeInUp","fadeInLeft","fadeInRight","fadeInDown"];case"zoomLR":return["zoomInLeft","zoomInRight"];case"zoomUD":return["zoomInUp","zoomInDown"];case"bounceLR":return["bounceInLeft","bounceInRight"];case"bounceUD":return["bounceInUp","bounceInDown"]}};return $.fn.Y_ScrollEle.SE_Animate=function(t,n){if(isNull(t.attr("scrollEle"))||t.is(":hidden")||"1"==t.attr("scrollWait")||!isNull(t.attr("lazy-src")))return ysq.TT&&cw(t),!1;var a=t.attr("scrollEle"),s=t.attr("scrollDirection")||"left",l=t.attr("scrollDelay")||100;if(n&&(l=n*(n>0?t.index():t.index()-t.parent().children().length)),"team"==a){r=t.attr("scrollStepTime")||150;a=o(t.attr("scrollArray"))||t.attr("scrollArray")||"MoveSelf",setTimeout(function(){t.addClass("AniDoing"),isNull(t.attr("scrollNext"))&&t.children().not("[scrollEle],br,.AniDoing").each(function(e,n){var o="left"==s?e:t.children().not("[scrollEle],br,.AniDoing").length-e,l=$.isArray(a)?a[e%a.length]:a;setTimeout(function(){$(n).addClass(l+" AniDoing"),$(n).attr("scrollCallback")&&$(n).addClass("AniStart"),$(n).data("scReset",!1),i($(n),l)},50+r*o)})},l)}else if("parent"==a){var r=t.attr("scrollStepTime")||0;a=o(t.attr("scrollArray"))||t.attr("scrollArray")||["MoveSelf"];var c=t.hasClass("odd")&&2==a.length?1:0;setTimeout(function(){t.addClass("AniDoing").children().not("[scrollEle],br,.AniDoing").each(function(e,t){var n=a[(e+c)%a.length];setTimeout(function(){$(t).addClass(n+" AniDoing"),$(t).attr("scrollCallback")&&$(t).addClass("AniStart"),$(t).data("scReset",!1),i($(t),n)},r*(c?e%a.length:e))})},l)}else t.hasClass(a)||setTimeout(function(){t.attr("scrollCallback")&&t.addClass("AniStart"),t.addClass(a+" AniDoing"),t.data("scReset",!1),i(t,a)},l);setTimeout(function(){e.fullScreen||t.removeAttr("scrollEle")},l)},$.fn.Y_ScrollEle.Do=function(t,i,o){if(t=t||$b,!ysq.shutDown)if(o&&$("[scrollWait]",t).removeAttr("scrollWait"),$("[scrollDelayArray]").length&&$("[scrollDelayArray]").each(function(e,t){$(t).children().not("[scrollDelay],br,.AniDoing").each(function(e,n){$(n).attr("scrollDelay",150+e%($(t).attr("scrollColumns")||Math.round($(t).outerWidth()/$(n).outerWidth()))*$(t).attr("scrollDelayArray"))})}),n.length){var s=0;$.each(n,function(e,t){s+=0==e?0:getAniDur($(t))/3||200,ysq.TT&&cw("Y_ScrollEle_Step:"+s),setTimeout(function(){$.fn.Y_ScrollEle.SE_Animate($(t))},s)}),n=[]}else t.find("[scrollEle]").andSelf().each(function(n,o){$(o).is($b)||!a(o,t,i)&&inWindow($(o),e.err)&&$.fn.Y_ScrollEle.SE_Animate($(o))})},$.fn.Y_ScrollEle.Init=function(e){(e=e||$b).is($b)||$("[scrollEle]",e).children().andSelf().data("scReset",!0),$("[scrollNext]",e).each(function(e,t){$(t).children().not("[scrollEle],br,.AniDoing").attr("scrollEle",$(t).attr("scrollNext"))}),$("[scrollEle]",e).each(function(e,t){var n=$(t).attr("scrollEle");"team"==n||"parent"==n?$(t).addClass("AniDo").children().not("[scrollEle],br,.AniDoing").addClass("AniDo"):$(t).addClass("AniDo")})},e.responsive&&!MinWidth(1024)&&$("[scrollEle]").each(function(t,n){var a=$(n).attr("scrollEle"),i=$(n).attr("scrollMAni")||e.ResAnimation;"team"==a||"parent"==a?$(n).attr("scrollArray",i):$(n).attr("scrollEle",i)}),e.fullScreen?ysq.htmlInit():setTimeout(function(){ysq.htmlInit();var t=$b;$("[scrollEle]").each(function(i,o){!a(o,t,e.delay)&&inWindow($(o),e.err)&&n.push($(o))}),$.fn.Y_ScrollEle.Init(),w.on("scroll.Y_scrollEle",function(){$.fn.Y_ScrollEle.Do(t)}).trigger("scroll.Y_scrollEle")},e.delay),this}
,Y_Anchors:function(o){var a={Tt:"",TtC:".section",TtClass:"active",Tg:"",TgC:".btn",TgClass:"active",padTClass:"padT",fixClass:"fixed",InitMove:!1,setClass:!0,fixedFT:0,scrollFT:w.height()/2,inWindowErr:[0,0],set_Cbk:null,click_Cbk:null};return o=$.extend({},a,o),this.each(function(a,s){function n(a){onoff(c.eq(s.idx),{sib:o.TgC,cls:o.TgClass}),onoff(t.eq(s.idx),{sib:o.TtC,cls:o.TtClass}),window.location.hash=window.location.hash.match(/anchor=(\w+)/)?window.location.hash.replace(/(anchor=)(?:\w+)/,"$1"+a):"anchor="+a,o.set_Cbk&&o.set_Cbk.call(this,l,t,i,c,s.idx)}var l=$(o.Tt,s),t=$(o.TtC,l),i=$(o.Tg,s),c=$(o.TgC,i);if(c.length&&t.length){var e=window.location.hash.match(/anchor=(\w+)/);s.anchor=e&&e[1];var r="#"+s.anchor,h=i.offset().top;s.MoveToY=function(a,n){if($(a).length){var e=$(a).offset().top-o.fixedFT-o.scrollFT,r=Math.max(Math.min(1e3,Math.abs(e-w.scrollTop())/3.33),200);l.addClass("ClickMoving"),ysq.shutDown=!0,Y_BodyScroll({goal:e,dur:void 0==n?r:n,cbk:function(){setTimeout(function(){l.removeClass("ClickMoving"),ysq.shutDown=!1},200),$.fn.Y_LazyLoad.Init&&$.fn.Y_LazyLoad.Init($b),$.fn.Y_ScrollEle.Do&&$.fn.Y_ScrollEle.Do($b),o.click_Cbk&&o.click_Cbk.call(this,l,t,i,c,s.idx)}})}},$(r).length&&o.InitMove&&(w.scrollTop()-o.scrollFT<$(r).offset().top||w.scrollTop()-o.scrollFT>$(r).offset().top+$(r).outerHeight())&&s.MoveToY(r,0),c.on("click.Y_Anchors",function(o){s.anchor=$(this).attr("data-anchor").replace(/#/,""),s.idx=$(this).index(),n(s.anchor),s.MoveToY("#"+s.anchor)}),w.on("scroll.Y_Anchors",function(a){if(o.setClass&&(w.scrollTop()+o.fixedFT>=h?(i.addClass(o.fixClass),l.addClass(o.padTClass)):(i.removeClass(o.fixClass),l.removeClass(o.padTClass))),!l.hasClass("ClickMoving")){var e=!1;t.each(function(a,n){inWindow($(n),o.inWindowErr)&&(e=!0,s.idx=a,s.anchor=c.eq(a).attr("data-anchor").replace(/#/,""))}),n(s.anchor),!e&&(c.add(t).removeClass(o.TgClass),n("none"))}})}}),this}
,Y_LoadImg:function(e){return e=$.extend({},{imgSrc:null,delay:50,cls:".picBox,.pic,.img",callback:null},e),this.attr("scrollWait","1").each(function(t,n){var a=$(n),i=e.imgSrc;if(ysq.TT&&(i+="?time="+(new Date).getTime()),a.is("img"))if(a.attr("src",i||""),a.parents(e.cls).length){var o=e.delay,s=(new Date).getTime();a.load(function(t){var n=o-((new Date).getTime()-s);setTimeout(function(){a.parents(e.cls).addClass("imgLoaded").removeClass("loading").removeClass("loading-m"),a.hasClass("AniDo")||a.addClass("Done"),a.addClass("Loaded"),setTimeout(function(){a.removeClass("lazyimg Done").removeAttr("scrollWait"),ysq.Switch&&$.fn.Y_ScrollEle.SE_Animate(a)},1e3*parseFloat(a.css("transition-duration"))),e.callback&&e.callback.call(this)},n<1?1:n)}).error(function(t){$(this).data("loadOnce")?(a.parents(e.cls).removeClass("loading").removeClass("loading-m"),a.attr("data-default")?a.attr("src",a.attr("data-default")).addClass("default"):a.parents(e.cls).addClass("load-error"),e.callback&&e.callback.call(this)):($(this).data("loadOnce",!0),$(this).attr("src",i||""))})}else a.removeClass("lazyimg").addClass("Loaded").removeAttr("scrollWait"),e.callback&&e.callback.call(this),ysq.Switch&&$.fn.Y_ScrollEle.SE_Animate(a);else i&&a.css("background-image","url("+i+")").addClass("Loaded").removeAttr("scrollWait");a.removeAttr("lazy-src")}),this}
,Y_LazyLoad:function(){return $.fn.Y_LazyLoad.Init=function(e,t,n,a){function i(e,t){!!$(e[t]).attr("lazy-src")&&$(e[t]).Y_LoadImg({imgSrc:$(e[t]).attr("lazy-src"),delay:n,callback:function(){i(e,t+1)}})}var o=e;ysq.LoadImgArray=[],t=!!t,!ysq.shutDown&&$("[lazy-src]",o).length&&(MacTest()?$("[lazy-src]",o).attr("src",function(){return $(this).attr("lazy-src")}).removeAttr("lazy-src").error(function(){$(this).parents(".picBox,.pic,.img").addClass("load-error")}).parents(".picBox,.pic,.img").addClass("imgLoaded"):($("[lazy-src]",o).each(function(e,n){isNull($(n).attr("lazy-src"))&&$(n).attr("lazy-src","none"),$(n).hasClass("loaded")||!$(n).is("img")?inWindow($(n),[-w.height()/3,-w.height()/3])&&$(n).Y_LoadImg({imgSrc:$(n).attr("lazy-src")}):($(n).hasClass("AniDo")||$(n).addClass("lazyimg"),(t||!$(n).parents(".waitLoad").length&&!$(n).is(":hidden")&&inWindow($(n),[w.height()/10,w.height()/10]))&&($(n).parents(".picBox,.pic,.img").addClass(function(){return $(this).outerWidth()<150?"loading-m":"loading"}),ysq.LoadImgArray.push(n)))}),i(ysq.LoadImgArray,0)))},w.scroll(function(){$.fn.Y_LazyLoad.Init($b)})}
,Y_Move:function(e){return e=$.extend({},{slideBox:!1,transparent:!0,slidable:!1,IsIcon:!1,IcoSpe:!1,aniIcon:!1,synchro:!1,IsDrag:!1,instant:!1,flipOut:!1,clickPass:!0,backInit:!1,oddEven:!1,itemInit:!0,pdLR:!1,mouseLR:!1,InOut:!1,stopable:!1,fullscreen:!1,resizable:!1,fullImgWH:{width:1920,height:1080},contain:".ysqMoveBox,.box",item:".item",Icon:".icon",prev:".prev",next:".next",lazyLoad:[!1,500],direction:"h",easing:"easeOutQuad",event:"click",delaytion:[0,0],duration:800,TimeOut:0,initNum:0,MinNum:1,fn:{before:null,after:null,start:null,callback:null,iconClick:null}},e),this.each(function(t,n){function a(){if(e.resizable?(e.fullscreen?MinWidth(1024)?(d.css({width:$h.width(),height:w.height()}),fullsetImg($("img",h),e.fullImgWH.width,e.fullImgWH.height)):(d.removeAttr("style"),fullsetImg.reset($("img",d))):fullsetImg.reset($("img",d)),l=Math.ceil(d.width())):e.fullscreen?(d.css({width:$h.width(),height:w.height()}),fullsetImg($("img",h),e.fullImgWH.width,e.fullImgWH.height)):p?(l=getW(h),1==e.MinNum&&h.width(h.width()),u.css({width:(2+l)*(e.slideBox?Math.max(m,e.MinNum):1)})):(l=getH(h),1==e.MinNum&&h.height(h.height()),u.css({height:(2+l)*(e.slideBox?Math.max(m,e.MinNum):1)})),e.evenWidth){var t=d.width()+(d.width()%2!=0?1:0);d.css({left:"50%",marginLeft:-1*t/2,width:t})}}function i(){clearInterval(n.Y_timer),n.Y_timer=setInterval(function(){n.next(!0)},1e3*e.TimeOut)}function o(){1==e.MinNum&&onoff(h.eq(n.idx)),e.slideBox&&e.instant||e.IsIcon&&onoff(r.eq(n.idx))}function s(t,a){e.synchro||e.resizable||o(),e.fn.callback&&e.fn.callback.call(this,d,h,n.idx,v,g,t,a),n.abled=!0}var l,r,c,d=$(n),u=$(e.contain,n).eq(0),f=$(e.prev+","+e.next,n),h=u.find(e.item),m=h.length,v=0,g=0,p="h"==e.direction,b=Math.ceil(m/e.MinNum)-1;if(n.idx=e.initNum,bEnough=!0,0==e.slideBox&&e.MinNum>1&&(e.slideBox=!0),e.setWH=e.fullscreen||e.resizable||e.slideBox,e.fn.before&&e.fn.before.call(this,d,h),m<=e.MinNum)return f.addClass("reject"),e.IsIcon=!1,o();if(e.slideBox||(u.width("100%"),h.each(function(e,t){$(t).css("z-index",9-e)})),e.IsIcon&&bEnough){for(var x="<a class='btn i1'>1",y=1;y<=b;y++)x+=(e.IcoSpe?"<s></s>":"")+"</a><a class='btn i"+(y+1)+"'>"+(y+1);$(e.Icon,n).length||d.append("<div class='icon'><span class='container'>"+x+(e.IcoSpe?"<s></s>":"")+"</a></span></div>"),r=$(e.Icon,n).find(".btn"),TgL=r.length,c=getW(r),e.aniIcon&&r.Y_SetCss3({dur:e.TimeOut+"s"}),$(e.Icon,n).hasClass("autoW")&&r.parent().css({width:TgL*c,left:"50%","margin-left":.5*-r.parents().outerWidth()})}if(n.dirPD=function(e){e>0?d.addClass("dir_z").removeClass("dir_f"):d.addClass("dir_f").removeClass("dir_z")},n.prev=function(t,a){n.dirPD(-1),e.stopable||e.TimeOut&&i(),n.idx=--n.idx<0?!t&&e.IsDrag&&e.slideBox?0:b:n.idx,n.Move(-1,!1,a)},n.next=function(t,a){n.dirPD(1),e.stopable||e.TimeOut&&i(),n.idx=++n.idx>b?!t&&e.IsDrag&&e.slideBox?b:0:n.idx,n.Move(1,!1,a)},n.Move=function(t,a,i){n.abled=!1;var c=n.idx+1>m-1?0:n.idx+1,f=n.idx-1<0?m-1:n.idx-1;if(i=null==i?e.duration:i,t>=0?(v=a?n.idxed:f,g=c):t<0&&(v=a?n.idxed:c,g=f),1==e.MinNum&&e.oddEven&&(h.eq(n.idx).hasClass("odd")?h.eq(g).addClass("even").removeClass("odd"):h.eq(g).addClass("odd").removeClass("even"),h.eq(n.idx).hasClass("even")?h.eq(g).addClass("odd").removeClass("even"):h.eq(g).addClass("even").removeClass("odd")),e.fn.start&&e.fn.start.call(this,d,h,n.idx,v,g,t,a),e.lazyLoad[0]&&fnLazyloadPd(h.slice(n.idx*e.MinNum,(n.idx+1)*e.MinNum))&&$.fn.Y_LazyLoad.Init(h.slice(n.idx*e.MinNum,(n.idx+1)*e.MinNum),!0,e.lazyLoad[1]),a&&e.fn.iconClick&&e.fn.iconClick.call(this,d,h,n.idx,v,g,t,a),setTimeout(function(){fnScrollElePd(h.eq(n.idx))&&($.fn.Y_ScrollEle.Init(h.eq(n.idx)),$.fn.Y_ScrollEle.Do(h.eq(n.idx),0,!0))},.7*i),e.slideBox){e.instant&&e.IsIcon&&onoff(r.eq(n.idx)),(e.synchro||e.resizable)&&o();var x=n.idx>=b?Math.max(m,e.MinNum)/e.MinNum-1:n.idx,y=-parseInt(x*l*e.MinNum),T=Math.abs(parseInt(u.css(p?"left":"top"))-y)/l%1,C=p?{left:y}:{top:y};0==t?(s(t,a),u.css(C)):u.stop(!0,!1).animate(C,(T||1)*i,e.easing,function(){s(t,a)})}else{n.abled=e.clickPass&&!e.InOut;var I=e.transparent?0:1,w=e.transparent?0:1,M=e.slidable?100*t:0;if(h.eq(g).css("z-index",7),p)var k={left:M+"%",opacity:I},A={left:0,opacity:1},_={left:0,opacity:1},D={left:-1*M+"%",opacity:w};else var k={top:M+"%",opacity:I},A={top:0,opacity:1},_={top:0,opacity:1},D={top:-1*M+"%",opacity:w};h.css({"z-index":1}).css(k).eq(n.idx).css("z-index",9).css(_),e.lazyLoad[0]&&h.hide().eq(n.idx).show(),setTimeout(function(){(e.synchro||e.resizable)&&o()},1),0==t?(s(t,a),e.oddEven&&h.eq(0).addClass("odd")):(e.InOut&&(onoff(h.eq(v),{cls:"leave"}),onoff(h.eq(n.idx),{cls:"come"}),e.IsIcon&&(onoff(r.eq(v),{cls:"Out"}),onoff(r.eq(n.idx),{cls:"In"})),setTimeout(function(){setTimeout(function(){e.IsIcon&&r.eq(v).removeClass("Out"),h.eq(v).removeClass("leave")},e.delaytion[0]),setTimeout(function(){e.IsIcon&&r.eq(n.idx).removeClass("In"),h.eq(n.idx).removeClass("come")},e.delaytion[1])},i)),h.eq(v).show().css(A).css("z-index",9).delay(e.delaytion[0]).stop(!0,!e.clickPass).animate(D,i,e.easing,function(){e.slidable&&e.backInit&&$(this).css(A)}),h.eq(n.idx).show().css(e.flipOut?_:k).css("z-index",e.slidable?8:10).delay(e.delaytion[1]).stop(!0,!e.clickPass).animate(_,i,e.easing,function(){s(t,a)}))}},e.itemInit&&h.each(function(t,n){$(n).addClass("moveItem idx"+(t+1)),t==e.initNum&&$(n).addClass("on")}),e.flipOut&&h.Y_SetCss3({ppty:"transform",dur:e.duration+"ms"}),e.fn.after&&e.fn.after.call(this,d,h,r),n.Move(0,!1),f.length){var T=$(e.prev,n),C=$(e.next,n);if(C.addClass(e.mouseLR&&"cursorR").click(function(){n.abled?n.next(!0):$(this).Y_Animation({animation:"dotShake"})}),T.addClass(e.mouseLR&&"cursorL").click(function(){n.abled?n.prev(!0):$(this).Y_Animation({animation:"dotShake"})}),e.pdLR){var I=d.outerWidth(),M=d.offset().left;d.mousemove(function(e){var t=e.pageX;e.pageY;t<I/2+M?T.show().siblings(".ctr").hide():C.show().siblings(".ctr").hide()}).mouseleave(function(e){f.stop(!0,!0).fadeOut(300).removeClass("on")}).trigger("mousemove")}else f.stop(!0,!0).fadeIn()}e.setWH&&(w.resize(function(){a(),e.slideBox&&n.Move(0),e.TimeOut&&i()}),a()),e.IsDrag&&d.Y_Drag({contain:e.contain,direction:d[0].direction||e.direction,left:n.next,right:n.prev,up:n.next,down:n.prev,instant:e.slideBox&&e.instant}),e.IsIcon&&r.on(e.event,function(){if("mouseenter"==e.event&&(n.abled=!0),$(this).hasClass("on")||!n.abled)return $(this).Y_Animation({animation:"dotShake"});e.stopable||e.TimeOut&&i();var t=r.index($(this))>n.idx?1:r.index($(this))<n.idx?-1:0;n.idxed=n.idx,n.idx=r.index($(this)),n.dirPD(t),onoff(r.eq(n.idx)),n.Move(t,!0),e.slideBox&&s(t,!0)}),e.TimeOut&&d.on({"mouseenter.Y_Move":function(){(e.stopable||d.data("stopable"))&&clearInterval(n.Y_timer)},"mouseleave.Y_Move":function(){i()}}).trigger("mouseleave")}),this}
,Y_Drag:function(e){var t,n={x1:0,x2:0,y1:0,y2:0},a=(e=$.extend({},{contain:".ysqMoveBox,.box",direction:"h",instant:!1,reMove:!1,fullScreen:!1,easing:"jswing",left:null,right:null,up:null,down:null},e)).direction,i=this,o=i[0],s=$(e.contain,i).eq(0),l=!1,r=!1,c=!1;o.abled=!0;var d=function(e){if(!o.abled)return!1;var a=Touchable?e.touches[0]:e;n.x1=n.x2=a.pageX,n.y1=n.y2=a.pageY,t={left:parseInt(s.css("left")),top:parseInt(s.css("top"))},Touchable?(addEvent(s[0],TouchIng,u,!1),addEvent(s[0],TouchEd,f,!1)):s.on(TouchIng,u).on(TouchEd,f),s.trigger("mouseenter"),l=!0,c=!1,Touchable||(i.addClass("MouseDown"),prevent_default(e))},u=function(d){function u(){o.abled=!0,n.x2=n.x1,n.y2=n.y1}if(!l)return!1;Touchable||i.addClass("MouseMove").removeClass("MouseDown");var f=Touchable?d.touches[0]:d;if(n.x2=f.pageX,n.y2=f.pageY,e.instant){var h=n.y2<i.offset().top+i.outerHeight()&&n.y2>i.offset().top;switch(a){case"h":h?(s.css({left:t.left+n.x2-n.x1}),r=!0):(r&&s.stop(!0,!1).animate({left:t.left},e.easing,Math.abs(n.x2-n.x1),u),r=!1);break;case"v":h?(s.css({top:t.top+n.y2-n.y1}),r=!0):(r&&s.stop(!0,!1).animate({top:t.top},e.easing,Math.abs(n.y2-n.y1),u),r=!1);break;case"o":h?(s.css({left:t.left+n.x2-n.x1,top:t.top+n.y2-n.y1}),r=!0):(r&&s.stop(!0,!1).animate({left:t.left,top:t.top},e.easing,Math.abs(n.x2-n.x1),u),r=!1)}var m=n.x2-n.x1,v=n.y2-n.y1;switch(a){case"h":Math.abs(m)>Math.abs(v)?prevent_default(d):c=!0;break;case"v":Math.abs(m)<Math.abs(v)?prevent_default(d):c=!0;break;case"o":prevent_default(d)}}else r=!0;clearInterval(s[0].Y_timer)},f=function(d){if(i.removeClass("MouseMove").removeClass("MouseDown"),!r||c)return"h"==a&&s.stop(!0,!1).animate({left:t.left},Math.abs(n.x2-n.x1),e.easing,function(){o.abled=!0}),"v"==a&&s.stop(!0,!1).animate({top:t.top},Math.abs(n.y2-n.y1),e.easing,function(){o.abled=!0}),l=!1,!1;switch(a){case"h":Math.abs(n.x2-n.x1)>Math.min(i.outerWidth()/5,w.width()/10)?(m(Math.abs(n.x2-n.x1)),v(Math.abs(n.x2-n.x1))):s.stop(!0,!1).animate({left:t.left},Math.abs(n.x2-n.x1),e.easing,function(){o.abled=!0});break;case"v":Math.abs(n.y2-n.y1)>Math.min(i.outerHeight()/5,w.height()/10)?(g(Math.abs(n.y2-n.y1)),p(Math.abs(n.y2-n.y1))):s.stop(!0,!1).animate({top:t.top},Math.abs(n.y2-n.y1),e.easing,function(){o.abled=!0});break;case"o":Math.abs(n.x2-n.x1)>Math.min(i.outerWidth()/5,w.width()/10)&&(m(),v()),Math.abs(n.y2-n.y1)>Math.min(i.outerHeight()/5,w.height()/10)&&(g(),p()),o.abled=!0}Touchable?(s[0].removeEventListener(TouchIng,u,!1),s[0].removeEventListener(TouchEd,f,!1)):s.off(TouchIng,u).off(TouchEd,f),s.trigger("mouseleave"),r=!1,prevent_default(d)},h=function(){(e.reMove||i.data("removeDrag"))&&(Touchable?s[0].removeEventListener(TouchOn,d,!1):i.off(TouchOn,d))},m=function(t){$.isFunction(e.left)&&n.x2<=n.x1&&(e.left(!1,e.instant?t:null),h())},v=function(t){$.isFunction(e.right)&&n.x2>n.x1&&(e.right(!1,e.instant?t:null),h())},g=function(t){$.isFunction(e.up)&&n.y2<=n.y1&&(e.up(!1,e.instant?t:null),h())},p=function(t){$.isFunction(e.down)&&n.y2>n.y1&&(e.down(!1,e.instant?t:null),h())};return Touchable?addEvent(s[0],TouchOn,d,!1):s.on(TouchOn,d).on("mouseleave",function(e){s.trigger(TouchEd)}),this}
,Y_DragScroll:function(e){var t,n={x1:0,x2:0,y1:0,y2:0},a=(e=$.extend({},{viewport:".container",overview:".contain",direction:"h",callback:null},e)).direction,i=this,o=(i[0],$(e.viewport,i).eq(0)),s=($(e.overview,i).eq(0),!1),l=!1,r=!1,c=0,d=function(e){var a=Touchable?e.touches[0]:e;n.x1=n.x2=a.pageX,n.y1=n.y2=a.pageY,t={left:o.scrollLeft(),top:o.scrollTop()},Touchable?(addEvent(o[0],TouchIng,u,!1),addEvent(o[0],TouchEd,f,!1)):o.on(TouchIng,u).on(TouchEd,f),s=!0,r=!1,c=(new Date).getTime(),Touchable||(i.addClass("MouseDown"),prevent_default(e))},u=function(e){if(!s)return!1;Touchable||i.addClass("MouseMove").removeClass("MouseDown");var c=Touchable?e.touches[0]:e;n.x2=c.pageX,n.y2=c.pageY;var d=n.y2<i.offset().top+i.outerHeight()&&n.y2>i.offset().top;switch(a){case"h":d&&(o.scrollLeft(t.left+n.x1-n.x2),l=!0);break;case"v":d&&(o.scrollTop(t.top+n.y1-n.y2),l=!0);break;case"o":d&&(o.scrollLeft(t.left+n.x1-n.x2).scrollTop(t.top+n.y1-n.y2),l=!0)}var u=n.x2-n.x1,f=n.y2-n.y1;switch(a){case"h":Math.abs(u)>Math.abs(f)?prevent_default(e):r=!0;break;case"v":Math.abs(u)<Math.abs(f)?prevent_default(e):r=!0;break;case"o":prevent_default(e)}},f=function(e){i.removeClass("MouseMove").removeClass("MouseDown"),Touchable?(o[0].removeEventListener(TouchIng,u,!1),o[0].removeEventListener(TouchEd,f,!1)):o.off(TouchIng,u).off(TouchEd,f),l=!1,prevent_default(e)};return Touchable?addEvent(o[0],TouchOn,d,!1):o.on(TouchOn,d).on("mouseleave",function(e){o.trigger(TouchEd)}),this}
,Y_SetCss3:function(e){return e=$.extend({},{ppty:"all",delay:"0ms",dur:"300ms"},e),this.css({"transition-property":e.ppty,"transition-duration":e.dur,"transition-delay":e.delay}),this}
,Y_Animation:function(e){var t="AniDo AniDoing "+(e=$.extend({},{animation:"",Inout:!0,delaytion:0,callback:function(){}},e)).animation,n=e.Inout?"vv":"vh";return this.each(function(a,i){var o=$(i);setTimeout(function(){o.addClass(t+" "+n),setTimeout(function(){o.removeClass(t),o.data("flag")||o.removeClass(n),e.callback.call(this,o)},getAniDur(o))},e.delaytion)}),this}
,Y_ToggleMove:function(e,t){return this.data("bToggle")?(this.data("bToggle",!1),t.call(this,this)):(this.data("bToggle",!0),e.call(this,this)),this}
,Y_ModelSel:function(e){return e=$.extend({},{event:"hover",instead:!1,init:!1,duration:200,callback:null},e),this.each(function(t,n){var a,i=$(n),o=$(".trigger",n),s=$(".select",n),l=$("input:hidden",n);switch(n.spread=function(){n.abled&&(o.addClass("active"),s.stop(!0,!1).slideDown(e.duration))},n.fold=function(t){o.removeClass("active"),s.stop(!0,!1).slideUp(e.duration,function(){n.abled=!0,t&&t()})},n.instead=function(t){s.children().each(function(e,n){$(n).attr("data-idx")==t&&(a=$(n))}),e.instead?setTimeout(function(){s.append($(".choose",n).children()),$(".choose",n).append(a),n.fSort()},200):onoff(a,{cls:"choosen"})},n.sel=function(t){n.abled=!1,n.instead(t),l.length&&l.val(a.attr("data-passed")),n.fold(function(){e.callback&&e.callback.call(this,i,a,a.attr("data-idx"))})},n.fSort=function(){var e=s.children().toArray().sort(function(e,t){return t=t||1,function(n,a){return n=new Number($(n).attr(e)),a=new Number($(a).attr(e)),n<a?-1*t:n>a?1*t:0}}("data-idx"));s.html(e)},e.event){case"hover":i.mouseenter(function(){n.spread()});break;case"click":i.click(function(e){o.hasClass("active")?n.fold():n.spread()})}i.mouseleave(function(){o.hasClass("active")&&n.fold()}).find("a").click(function(e){if(!isNull($(this).attr("href")))return prevent_default(e)}),s.delegate(".option","click",function(e){n.sel($(this).attr("data-idx"))}),e.instead&&isNull(s.children().attr("data-idx"))&&s.children().attr("data-idx",function(){return $(this).index()}),n.abled=!0,e.init&&n.instead(s.children(".on").attr("data-idx")||0)}),this}
,Y_HoverOn:function(e){return e=$.extend({},{item:".item",actCls:"on",delay:333,backInit:!0,initNum:null,lazyLoad:[!1,500]},e),this.each(function(t,n){var a=$(e.item,n),i=!!a.filter("."+e.actCls).length&&a.filter("."+e.actCls).index();n.MouseIn=function(t){clearTimeout(n.timer),onoff(t,{sib:e.item,cls:e.actCls}),e.lazyLoad[0]&&fnLazyloadPd(t)&&$.fn.Y_LazyLoad.Init(t,!0,e.lazyLoad[1])},n.MouseOut=function(t){n.timer=setTimeout(function(){a.removeClass(e.actCls),!1===i||a.eq(i).addClass(e.actCls)},e.delay)},null!=e.initNum&&n.MouseIn(a.eq(e.initNum)),e.lazyLoad[0]&&a.addClass("waitLoad"),a.hover(function(){n.MouseIn($(this))},function(){e.backInit&&!e.initNum&&n.MouseOut($(this))})}),this}
,Y_Tab:function(e){return e=$.extend({},{Tt:".Tt",Tg:".Tg",TBtn:".btn",contain:".box",item:null,link:".Ta",TgActCls:"on",TtActCls:"on",next:null,prev:null,lazyLoad:[!1,10],event:"click",init:!0,initNum:0,TimeOut:0,duration:220,stopable:!0,IcoSpe:!1,hasNum:!1,keyboard:!0,overviewMid:!1,IsDrag:!1,fn:{before:null,start:null,callback:null}},e),this.each(function(t,n){var a=$(n),i=$(e.Tt,n),o=$(e.Tg,n),s=$(e.link,n),l=i.find(e.contain),r=l.length,c=o.find(e.TBtn),d=$(e.next,n),u=$(e.prev,n),f=!1;if(n.abled=!0,n.idx=e.initNum,n.pidx=0,n.Move=function(t){e.fn.start&&e.fn.start.call(this,a,n.idx,l,c,s);var i=c.eq(n.idx),r=l.eq(n.idx);l.removeClass(e.TtActCls),o.length&&onoff(i,{cls:e.TgActCls}),s.length&&s.attr("href",i.attr("data-href")||i.attr("href")),r.length?(r.addClass(e.TtActCls),setTimeout(function(){n.abled=!0,e.overviewMid&&ysq.MsBoxSet(r.find(".overview")),fnScrollElePd(r)&&($.fn.Y_ScrollEle.Init(r),$.fn.Y_ScrollEle.Do(r,0,!0)),e.fn.callback&&e.fn.callback.call(this,a,n.idx,l,c,s),e.lazyLoad[0]&&fnLazyloadPd(r)&&$.fn.Y_LazyLoad.Init(r,!0,e.lazyLoad[1])},(t?0:e.duration)+1)):n.abled=!0},n.next=function(){n.idx=++n.idx%r,n.abled=!1,n.Move()},n.prev=function(){n.idx=--n.idx<0?r-1:n.idx,n.abled=!1,n.Move()},!c.length){for(var h="",t=0;t<r;t++)h+=(e.IcoSpe?"<s></s>":"")+"<a class="+e.TBtn+">"+(e.hasNum?t+1:" ")+"</a>";o.append(h),c=o.find(e.TBtn)}e.lazyLoad[0]&&l.addClass("waitLoad"),e.fn.before&&e.fn.before.call(this,a,l,c,s),e.init&&n.Move(e.initNum,!0),c.on(e.event,function(t){return!n.abled&&$(this).hasClass(e.TgActCls)?prevent_default(t):(n.pidx=n.idx,n.idx=c.index($(this)),e.item?l.eq(n.idx).find(e.item).length?(n.Move(),prevent_default(t)):void 0:(n.Move(),prevent_default(t)))}),a.hover(function(){f=!0,e.TimeOut&&e.stopable&&clearInterval(n.Y_timer)},function(){f=!1,e.TimeOut&&(clearInterval(n.Y_timer),n.Y_timer=setInterval(function(){n.next()},1e3*e.TimeOut))}),d.length&&d.show().click(function(e){n.abled?n.next():$(this).Y_Animation({animation:"dotShake"})}),u.length&&u.show().click(function(e){n.abled?n.prev():$(this).Y_Animation({animation:"dotShake"})}),e.IsDrag&&a.Y_Drag({contain:e.Tt,direction:"h",left:n.next,right:n.prev}),e.keyboard&&$(document).keydown(function(e){f&&(39==e.keyCode&&d.trigger("click"),37==e.keyCode&&u.trigger("click"))})}),this}});
/* extend Fn S*/
function fullsetImg(t,i,e){var h=w.width(),s=w.height();fullsetImg.reset(t),e/i>s/h?t.width(h).height(e/i*t.width()).addClass("hi100").removeClass("wi100"):t.height(s).width(i/e*t.height()).addClass("wi100").removeClass("hi100"),t.css({top:"50%",left:"50%",marginTop:-t.height()/2,marginLeft:-t.width()/2})}
fullsetImg.reset=function(t){t.css({width:"100%",height:"100%",left:0,marginLeft:0,top:0,marginTop:0})};
/* extend Fn E*/
/* basic Fn S*/
function a(t){alert(t)}function c(t){console.log(t)}function cw(t){console.warn(t)}function ce(t){console.error(t)}function dbn(t,n){n=n||"",t.show().siblings(n).hide()}function mlr(t,n){return Math.ceil(parseInt(t.css(n?"margin-left":"margin-right")))||0}function mtb(t,n){return Math.ceil(parseInt(t.css(n?"margin-top":"margin-bottom")))||0}function plr(t,n){return Math.ceil(parseInt(t.css(n?"padding-left":"padding-right")))||0}function ptb(t,n){return Math.ceil(parseInt(t.css(n?"padding-top":"padding-bottom")))||0}function getW(t){return Math.ceil(parseInt(t.outerWidth()+mlr(t,1)+mlr(t,0)))}function getH(t){return Math.ceil(parseInt(t.outerHeight()+mud(t,1)+mud(t,0)))}function getWH(t,n){return Math.ceil(n?parseInt(t.outerHeight()+mud(t,1)+mud(t,0)):parseInt(t.outerWidth()+mlr(t,1)+mlr(t,0)))}function getAniDur(t){return parseFloat(t.css("animation-duration"))>10?parseFloat(t.css("animation-duration")):1e3*parseFloat(t.css("animation-duration"))}function sElements(t){return String(t[0].tagName+"."+t.attr("class"))}function fnScrollElePd(t){return ysq.Switch&&$.fn.Y_ScrollEle.Init&&(t.is("[scrollEle]")||t.find("[scrollEle]").length)}function fnLazyloadPd(t){return $.fn.Y_LazyLoad.Init&&t.find("[lazy-src]").length}function inWindow(t,n){var e=t.offset().top,o=t.offset().left,i=w.scrollTop(),r=w.scrollLeft(),a=i+w.height(),n=n||[0,0];ysq.IsMoble&&(n=[0,0]);var l=r+0,s=r+w.width()-0,c=i+n[0],u=a-n[1],d=o,f=o+t.outerWidth(),p=e,m=e+t.outerHeight(),v=f-d>=s-l?f>=l&&l>=d||f>=s&&d<=s:f>=l&&f<=s||d>=l&&d<=s,h=m-p>=u-c?m>=c&&c>=p||m>=u&&p<=u:m>=c&&(m<=u||a>=$b.outerHeight()-n[1]&&p<=a)||p<=u&&(p>=c||(i<=n[0]||"fixed"==t.css("position"))&&p>=i);return ysq.Test&&ysq.TT&&cw("outerWindow:"+sElements(t)),v&&h}function MacTest(){return navigator.userAgent.indexOf("Mac")>-1&&navigator.userAgent.indexOf("Safari")>-1}function SaveData(t,n,e){if(e=e||1,window.localStorage)localStorage.setItem(t,n);else{var o=new Date;o.setDate(o.getDate()+e),document.cookie=t+"="+n+";expires="+o}}function GetData(t){if(window.localStorage)return localStorage.getItem(t);for(var n=document.cookie.split("; "),e=0;e<n.length;e++){var o=n[e].split("=");if(o[0]==t)return o[1]}return""}function RemoveData(t){window.localStorage?localStorage.removeItem(t):setCookie(t,1,-1)}function MinWidth(t){return w.width()>t}function isNull(t){return""==!!t||void 0==!!t||null==!!t||/^[ ]+$/.test(t)}function stopprop(t){return t=t||window.event,document.all?t.cancelBubble=!0:t.stopPropagation(),prevent_default(t)}function prevent_default(t){return t=t||window.event,document.all?t.returnValue=!1:t.preventDefault(),!1}function addEvent(t,n,e,o){if(t.addEventListener)return t.addEventListener(n,e,o),!0;if(t.attachEvent){return t.attachEvent("on"+n,e)}t["on"+n]=e}function removeEvent(t,n,e,o){if(t.removeEventListener)return t.removeEventListener(n,e,o),!0;if(t.detachEvent){return t.detachEvent("on"+n,e)}return void(t["on"+n]=null)}function SetVamCss(t,n,e){$(".css"+n).length&&$(".css"+n).remove();var o="."+n+(e?" .img":"");$("head").append('<style class="css'+n+'">'+o+"{line-height:"+t+"px !important;height:"+t+"px !important;font-size:0px;*font-size:"+.76*t+"px;}"+o+" img {max-height:"+t+"px !important;}</style>")}function lockScroll(){var t=w.scrollTop();w.on("scroll.lock",function(n){w.scrollTop(t)})}function unlockScroll(){w.off("scroll.lock")}function makeMask(t){return"<div class='zhezhao "+(t=$.extend({},{color:"#000",opacity:.6,id:" ",cls:"close"},t)).cls+"' id='"+t.id+"' style='opacity:"+t.opacity+";filter:alpha(opacity="+100*t.opacity+");background:"+t.color+"' title='点击关闭'></div>"}function onoff(t,n){n=$.extend({},{cls:"on",sib:""},n),t.addClass(n.cls).siblings(n.sib).removeClass(n.cls)}function inout(t,n){n=$.extend({},{cls:"on",sib:"",dur:0,cbk:null},n),t.addClass(n.cls).stop(!0,!0).fadeIn(n.dur,function(){n.cbk&&n.cbk(),fnScrollElePd(t)&&($.fn.Y_ScrollEle.Init(t),$.fn.Y_ScrollEle.Do(t,0,!0))}).siblings(n.sib).removeClass(n.cls).fadeOut(n.dur)}function Y_BodyScroll(t){t=$.extend({},{goal:0,err:0,dur:400,cbk:null},t),$("html,body").stop(!0,!1).animate({scrollTop:t.goal-t.err},t.dur,function(){t.cbk&&t.cbk()})}function Y_Tan(t,n){function e(t){ysq.HasTan[1]&&clearTimeout(i),$(".TAlert").removeClass("on").fadeOut(333,function(){l=!1,$(".TAlert,.cssTAlert").remove(),t&&t.call(this)})}var o={fnNo:null,fnYes:null,bAutoClose:!0,nTimeOut:1500};if(o=$.extend({},o,n),!ysq.HasTan[0])return a(t),!1;var i,r=o.fnYes?1:0,l=!0;$(".TAlert").length&&$(".TAlert").remove();var s='<div class="TAlert"><span class="contain"><div class="head">提示信息<a class="Tclose close">ㄨ</a></div><div class="body">'+t+"</div>";sDiv2='<div class="foot"><a class="close btn w100">关闭</a></div>',s+=r?'<div class="foot"><a class="enter btn">确认</a> <a class="close btn">取消</a></div>':sDiv2,s+="</div></span></div>",$b.append(s),l&&SetVamCss(w.height(),"TAlert"),o.bAutoClose&&ysq.HasTan[1]&&(i=setTimeout(function(){e(o.fnNo)},o.nTimeOut)),$(".TAlert").prepend(makeMask()).fadeIn(600).addClass("on").find(".close").off(TouchEd).on(TouchEd,function(){e(o.fnNo)}),o.fnYes&&$(".TAlert .enter").off(TouchEd).on(TouchEd,function(){e(o.fnYes)}),w.resize(function(){l&&SetVamCss(w.height(),"TAlert")}),$(document).keydown(function(t){l&&27==t.keyCode&&e(o.fnNo)})}
/* basic Fn E*/
//plugins.js
/* linear swing jswing easeInQuad easeOutQuad easeInOutQuad easeInCubic easeOutCubic easeInOutCubic easeInQuart easeOutQuart easeInOutQuart easeInQuint easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInExpo easeOutExpo easeInOutExpo easeInCirc easeInOutCirc easeInElastic easeOutElastic easeInOutElastic easeInBack easeInOutBack easeInBounce easeOutBounce easeInOutBounce */
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(A,B,C,D,E){return jQuery.easing[jQuery.easing.def](A,B,C,D,E);},easeInQuad:function(A,B,C,D,E){return D*(B/=E)*B+C},easeOutQuad:function(A,B,C,D,E){return-D*(B/=E)*(B-2)+C},easeInOutQuad:function(A,B,C,D,E){if((B/=E/2)<1){return D/2*B*B+C}return-D/2*((--B)*(B-2)-1)+C},easeInCubic:function(A,B,C,D,E){return D*(B/=E)*B*B+C},easeOutCubic:function(A,B,C,D,E){return D*((B=B/E-1)*B*B+1)+C},easeInOutCubic:function(A,B,C,D,E){if((B/=E/2)<1){return D/2*B*B*B+C}return D/2*((B-=2)*B*B+2)+C},easeInQuart:function(A,B,C,D,E){return D*(B/=E)*B*B*B+C},easeOutQuart:function(A,B,C,D,E){return-D*((B=B/E-1)*B*B*B-1)+C},easeInOutQuart:function(A,B,C,D,E){if((B/=E/2)<1){return D/2*B*B*B*B+C}return-D/2*((B-=2)*B*B*B-2)+C},easeInQuint:function(A,B,C,D,E){return D*(B/=E)*B*B*B*B+C},easeOutQuint:function(A,B,C,D,E){return D*((B=B/E-1)*B*B*B*B+1)+C},easeInOutQuint:function(A,B,C,D,E){if((B/=E/2)<1){return D/2*B*B*B*B*B+C}return D/2*((B-=2)*B*B*B*B+2)+C},easeInSine:function(A,B,C,D,E){return-D*Math.cos(B/E*(Math.PI/2))+D+C},easeOutSine:function(A,B,C,D,E){return D*Math.sin(B/E*(Math.PI/2))+C},easeInOutSine:function(A,B,C,D,E){return-D/2*(Math.cos(Math.PI*B/E)-1)+C},easeInExpo:function(A,B,C,D,E){return(B==0)?C:D*Math.pow(2,10*(B/E-1))+C},easeOutExpo:function(A,B,C,D,E){return(B==E)?C+D:D*(-Math.pow(2,-10*B/E)+1)+C},easeInOutExpo:function(A,B,C,D,E){if(B==0){return C}if(B==E){return C+D}if((B/=E/2)<1){return D/2*Math.pow(2,10*(B-1))+C}return D/2*(-Math.pow(2,-10*--B)+2)+C},easeInCirc:function(A,B,C,D,E){return-D*(Math.sqrt(1-(B/=E)*B)-1)+C},easeOutCirc:function(A,B,C,D,E){return D*Math.sqrt(1-(B=B/E-1)*B)+C},easeInOutCirc:function(A,B,C,D,E){if((B/=E/2)<1){return-D/2*(Math.sqrt(1-B*B)-1)+C}return D/2*(Math.sqrt(1-(B-=2)*B)+1)+C},easeInElastic:function(A,B,C,D,E){var F=1.70158;var G=0;var H=D;if(B==0){return C}if((B/=E)==1){return C+D}if(!G){G=E*0.3}if(H<Math.abs(D)){H=D;var F=G/4}else{var F=G/(2*Math.PI)*Math.asin(D/H);}return-(H*Math.pow(2,10*(B-=1))*Math.sin((B*E-F)*(2*Math.PI)/G))+C},easeOutElastic:function(A,B,C,D,E){var F=1.70158;var G=0;var H=D;if(B==0){return C}if((B/=E)==1){return C+D}if(!G){G=E*0.3}if(H<Math.abs(D)){H=D;var F=G/4}else{var F=G/(2*Math.PI)*Math.asin(D/H);}return H*Math.pow(2,-10*B)*Math.sin((B*E-F)*(2*Math.PI)/G)+D+C},easeInOutElastic:function(A,B,C,D,E){var F=1.70158;var G=0;var H=D;if(B==0){return C}if((B/=E/2)==2){return C+D}if(!G){G=E*(0.3*1.5);}if(H<Math.abs(D)){H=D;var F=G/4}else{var F=G/(2*Math.PI)*Math.asin(D/H);}if(B<1){return-0.5*(H*Math.pow(2,10*(B-=1))*Math.sin((B*E-F)*(2*Math.PI)/G))+C}return H*Math.pow(2,-10*(B-=1))*Math.sin((B*E-F)*(2*Math.PI)/G)*0.5+D+C},easeInBack:function(A,B,C,D,E,F){if(F==undefined){F=1.70158}return D*(B/=E)*B*((F+1)*B-F)+C},easeOutBack:function(A,B,C,D,E,F){if(F==undefined){F=1.70158}return D*((B=B/E-1)*B*((F+1)*B+F)+1)+C},easeInOutBack:function(A,B,C,D,E,F){if(F==undefined){F=1.70158}if((B/=E/2)<1){return D/2*(B*B*(((F*=(1.525))+1)*B-F))+C}return D/2*((B-=2)*B*(((F*=(1.525))+1)*B+F)+2)+C},easeInBounce:function(A,B,C,D,E){return D-jQuery.easing.easeOutBounce(A,E-B,0,D,E)+C},easeOutBounce:function(A,B,C,D,E){if((B/=E)<(1/2.75)){return D*(7.5625*B*B)+C}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+C}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+C}else{return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+C}}}},easeInOutBounce:function(A,B,C,D,E){if(B<E/2){return jQuery.easing.easeInBounce(A,B*2,0,D,E)*0.5+C}return jQuery.easing.easeOutBounce(A,B*2-E,0,D,E)*0.5+D*0.5+C}});
/*pluginsS*/
var CountUp=function(a,t,n,e,i,r){function o(a){a=a.toFixed(c.decimals);var t,n,e,i;if(t=(a+="").split("."),n=t[0],e=t.length>1?c.options.decimal+t[1]:"",i=/(\d+)(\d{3})/,c.options.useGrouping)for(;i.test(n);)n=n.replace(i,"$1"+c.options.separator+"$2");return c.options.prefix+n+e+c.options.suffix}function l(a,t,n,e){return n*(1-Math.pow(2,-10*a/e))*1024/1023+t}function s(a){return"number"==typeof a&&!isNaN(a)}for(var u=0,m=["webkit","moz","ms","o"],d=0;d<m.length&&!window.requestAnimationFrame;++d)window.requestAnimationFrame=window[m[d]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[m[d]+"CancelAnimationFrame"]||window[m[d]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a,t){var n=(new Date).getTime(),e=Math.max(0,16-(n-u)),i=window.setTimeout(function(){a(n+e)},e);return u=n+e,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});var c=this;if(c.options={useEasing:!0,useGrouping:!1,separator:",",decimal:".",easingFn:l,formattingFn:o,prefix:"",suffix:""},r&&"object"==typeof r)for(var V in c.options)r.hasOwnProperty(V)&&null!==r[V]&&(c.options[V]=r[V]);""===c.options.separator&&(c.options.useGrouping=!1),c.initialize=function(){return!!c.initialized||(c.d="string"==typeof a?document.getElementById(a):a,c.d?(c.startVal=Number(t)||0,c.endVal=Number(n)||0,s(c.startVal)&&s(c.endVal)?(c.decimals=Math.max(0,e||0),c.dec=Math.pow(10,c.decimals),c.duration=1e3*Number(i)||2e3,c.countDown=c.startVal>c.endVal,c.frameVal=c.startVal,c.initialized=!0,!0):(console.error("[CountUp] startVal or endVal is not a number",c.startVal,c.endVal),!1)):(console.error("[CountUp] target is null or undefined",c.d),!1))},c.printValue=function(a){var t=c.options.formattingFn(a);"INPUT"===c.d.tagName?this.d.value=t:"text"===c.d.tagName||"tspan"===c.d.tagName?this.d.textContent=t:this.d.innerHTML=t},c.count=function(a){c.startTime||(c.startTime=a),c.timestamp=a;var t=a-c.startTime;c.remaining=c.duration-t,c.options.useEasing?c.countDown?c.frameVal=c.startVal-c.options.easingFn(t,0,c.startVal-c.endVal,c.duration):c.frameVal=c.options.easingFn(t,c.startVal,c.endVal-c.startVal,c.duration):c.countDown?c.frameVal=c.startVal-(c.startVal-c.endVal)*(t/c.duration):c.frameVal=c.startVal+(c.endVal-c.startVal)*(t/c.duration),c.countDown?c.frameVal=c.frameVal<c.endVal?c.endVal:c.frameVal:c.frameVal=c.frameVal>c.endVal?c.endVal:c.frameVal,c.frameVal=Math.round(c.frameVal*c.dec)/c.dec,c.printValue(c.frameVal),t<c.duration?c.rAF=requestAnimationFrame(c.count):c.callback&&c.callback()},c.start=function(a){c.initialize()&&(c.callback=a,c.rAF=requestAnimationFrame(c.count))},c.pauseResume=function(){c.paused?(c.paused=!1,delete c.startTime,c.duration=c.remaining,c.startVal=c.frameVal,requestAnimationFrame(c.count)):(c.paused=!0,cancelAnimationFrame(c.rAF))},c.reset=function(){c.paused=!1,delete c.startTime,c.initialized=!1,c.initialize()&&(cancelAnimationFrame(c.rAF),c.printValue(c.startVal))},c.update=function(a){if(c.initialize()){if(a=Number(a),!s(a))return void console.error("[CountUp] update() - new endVal is not a number",a);a!==c.frameVal&&(cancelAnimationFrame(c.rAF),c.paused=!1,delete c.startTime,c.startVal=c.frameVal,c.endVal=a,c.countDown=c.startVal>c.endVal,c.rAF=requestAnimationFrame(c.count))}},c.initialize()&&c.printValue(c.startVal)};
/*ScrollBox {.data('callback')--function(){}}触底回调*/
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof exports==='object'){module.exports=factory(require("jquery"));}else{factory(jQuery);}}(function($){"use strict";var pluginName="tinyscrollbar",defaults={axis:'y',wheel:true,wheelSpeed:40,wheelLock:true,touchLock:true,trackSize:false,thumbSize:false,thumbSizeMin:20,viewport:".viewport",overview:".overview",scrollbar:".scrollbar",track:".track",thumb:".thumb"};function Plugin($container,options){this.options=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;var self=this,$viewport=$container.find(this.options.viewport),$overview=$container.find(this.options.overview),$scrollbar=$container.find(this.options.scrollbar),$track=$scrollbar.find(this.options.track),$thumb=$scrollbar.find(this.options.thumb),hasTouchEvents=("ontouchstart"in document.documentElement),wheelEvent="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll",isHorizontal=this.options.axis==='x',sizeLabel=isHorizontal?"width":"height",posiLabel=isHorizontal?"left":"top",mousePosition=0;this.contentPosition=0;this.viewportSize=0;this.contentSize=0;this.contentRatio=0;this.trackSize=0;this.trackRatio=0;this.thumbSize=0;this.thumbPosition=0;this.hasContentToSroll=false;function _initialize(){self.update();_setEvents();return self;}this.update=function(scrollTo){var sizeLabelCap=sizeLabel.charAt(0).toUpperCase()+sizeLabel.slice(1).toLowerCase();this.viewportSize=$viewport[0]['offset'+sizeLabelCap];this.contentSize=$overview[0]['scroll'+sizeLabelCap];this.contentRatio=this.viewportSize/this.contentSize;this.trackSize=this.options.trackSize||this.viewportSize;this.thumbSize=Math.min(this.trackSize,Math.max(this.options.thumbSizeMin,(this.options.thumbSize||(this.trackSize*this.contentRatio))));this.trackRatio=(this.contentSize-this.viewportSize)/(this.trackSize-this.thumbSize);this.hasContentToSroll=this.contentRatio<1;$scrollbar.toggleClass("disable",!this.hasContentToSroll);switch(scrollTo){case"bottom":this.contentPosition=Math.max(this.contentSize-this.viewportSize,0);break;case"relative":this.contentPosition=Math.min(Math.max(this.contentSize-this.viewportSize,0),Math.max(0,this.contentPosition));break;default:this.contentPosition=parseInt(scrollTo,10)||0;}this.thumbPosition=this.contentPosition/this.trackRatio;_setCss();return self;};function _setCss(){$thumb.css(posiLabel,self.thumbPosition);$overview.css(posiLabel,-self.contentPosition).find('.fixed').css(posiLabel,self.contentPosition);$scrollbar.css(sizeLabel,self.trackSize);$track.css(sizeLabel,self.trackSize);$thumb.css(sizeLabel,self.thumbSize);}function _setEvents(){if(hasTouchEvents){$viewport[0].ontouchstart=function(event){if(1===event.touches.length){event.stopPropagation();_start(event.touches[0]);}};}$thumb.bind(TouchOn,function(event){event.stopPropagation();_start(event);});$track.bind(TouchOn,function(event){_start(event,true);});$(window).resize(function(){self.update("relative");});if(self.options.wheel&&window.addEventListener){$container[0].addEventListener(wheelEvent,_wheel,false);}else if(self.options.wheel){$container[0].onmousewheel=_wheel;}}function _isAtBegin(){return self.contentPosition>0;}function _isAtEnd(){return self.contentPosition<=(self.contentSize-self.viewportSize)-5;}function _start(event,gotoMouse){if(self.hasContentToSroll){$overview.addClass("unsel");mousePosition=gotoMouse?$thumb.offset()[posiLabel]:(isHorizontal?event.pageX:event.pageY);if(hasTouchEvents){document.ontouchmove=function(event){if(self.options.touchLock||_isAtBegin()&&_isAtEnd()){event.preventDefault();}event.touches[0][pluginName+"Touch"]=1;_drag(event.touches[0]);};document.ontouchend=_end;}$(document).bind(TouchIng,_drag);$(document).bind(TouchEd,_end);$thumb.bind(TouchEd,_end);$track.bind(TouchEd,_end);_drag(event);}}function _wheel(event){if(self.hasContentToSroll){var evntObj=event||window.event,wheelDelta=-(evntObj.deltaY||evntObj.detail||(-1/3*evntObj.wheelDelta))/40,multiply=(evntObj.deltaMode===1)?self.options.wheelSpeed:1;self.contentPosition-=wheelDelta*multiply*self.options.wheelSpeed;self.contentPosition=Math.min((self.contentSize-self.viewportSize),Math.max(0,self.contentPosition));self.thumbPosition=self.contentPosition/self.trackRatio;$container.trigger("move");$thumb.css(posiLabel,self.thumbPosition);$overview.css(posiLabel,-self.contentPosition).find('.fixed').css(posiLabel,self.contentPosition);if(self.options.wheelLock||_isAtBegin()&&_isAtEnd()){evntObj=$.event.fix(evntObj);evntObj.preventDefault();}if(self.contentPosition>(self.contentSize-self.viewportSize*1.1)){$(self).data("callback")&&$(self).data("callback")();}}stopprop(event);}function _drag(event){if(self.hasContentToSroll){var mousePositionNew=isHorizontal?event.pageX:event.pageY,thumbPositionDelta=event[pluginName+"Touch"]?(mousePosition-mousePositionNew):(mousePositionNew-mousePosition),thumbPositionNew=Math.min((self.trackSize-self.thumbSize),Math.max(0,self.thumbPosition+thumbPositionDelta));self.contentPosition=thumbPositionNew*self.trackRatio;$container.trigger("move");$thumb.css(posiLabel,thumbPositionNew);$overview.css(posiLabel,-self.contentPosition).find('.fixed').css(posiLabel,self.contentPosition);}}function _end(){self.thumbPosition=parseInt($thumb.css(posiLabel),10)||0;$overview.removeClass("unsel");$overview.hasClass('mousein')||$overview.trigger('mouseleave');$(document).unbind(TouchIng,_drag);$(document).unbind(TouchEd,_end);$thumb.unbind(TouchEd,_end);$track.unbind(TouchEd,_end);document.ontouchmove=document.ontouchend=null;}return _initialize();}$.fn[pluginName]=function(options){return this.each(function(){if(!$.data(this,"plugin_"+pluginName)){$.data(this,"plugin_"+pluginName,new Plugin($(this),options));}});};}));
/*pluginsE*/
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。