锘?*! jsModern v1.1.1 | (c) Frank Chao | MIT license */ 'use strict';!function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):"object"===typeof module&&"object"===typeof module.exports?module.exports=f():b.jsModern=f(b.jQuery)}("undefined"!==typeof window?window:this,function(b){var f=window.document,D=navigator.userAgent.toLowerCase(),E=D.match(/(msie|trident)/);if(D.match(/msie (6|7|8)\.0/)||!Array.isArray||!f.addEventListener)throw Error("jsModern's JavaScript does not support of ie8- !!!");var L=b.fn.jquery.split(".");if(1===~~L[0]&&12>~~L[1])throw Error("jsModern's JavaScript requires at least jQuery v1.12.0 !!!");b.easing.easeInOutQuart=function(b,a,c,m,e){return 1>(a/=e/2)?m/2*a*a*a*a+c:-m/2*((a-=2)*a*a*a-2)+c};return window.jsModern={time:function(d,a){if(0===arguments.length)return b.now();a=a||"-";d=new Date(d);var c={yy:d.getFullYear(),mm:d.getMonth()+1,dd:d.getDate(),h:d.getHours(),m:d.getMinutes(),s:d.getSeconds()},m;for(m in c){var e=c[m];c[m]=10>e?"0"+e:e}return c.yy+a+c.mm+a+c.dd+" "+c.h+":"+c.m+":"+c.s},top:function(d,a){a=b.isNumeric(a)?~~a:300;var c=b(f.querySelector(d));if(c.is(":hidden"))b(window).on("scroll",function(){var a=b(window).scrollTop();200c.width()){c.addClass("jsmodern-marquee");d.wrapAll('\x3csection class\x3d"jsmodern-marquee-inner"\x3e\x3csection class\x3d"jsmodern-marquee-default"\x3e\x3c/section\x3e\x3c/section\x3e').parent().width(e);var d=c.find(".jsmodern-marquee-inner"),f=c.find(".jsmodern-marquee-default");f.after(f.clone(!0)).next().attr("class","jsmodern-marquee-repeat");d.width(2*e);var n=function(){c.scrollLeft(c.scrollLeft()>f.width()?0:c.scrollLeft()+1)},p=setInterval(n,a);c.hover(function(){clearInterval(p)},function(){p=setInterval(n,a)})}});return this},picture:function(d,a){b(d).each(function(){function c(a){"fade"===g&&(a=-1==a?w-1:a==w?0:a,t.eq(a).stop().fadeIn(700).siblings().stop().fadeOut(700,function(){d(a);e.data("cacheIndex",a)}));"slide"===g&&(u.is(":animated")||u.stop().animate({left:-(n*a+n)+"px"},700,"easeInOutQuart",function(){-1===a&&(u.css("left","-"+n*w+"px"),a=w-1);a===w&&(u.css("left","-"+n+"px"),a=0);d(a);e.data("cacheIndex",a);f.removeClass("jsmodern-picture-pointerevents-none")}))}function d(a){y.eq(a).addClass("active").siblings().removeClass("active")}var e=b(this),f=e.find("a"),n=e.width(),p=e.height(),g="slide",k=!0,h=!0,r=!1;a&&(g=a.type||"slide",k=a.arrow,h=a.dot,r=a.autoplay);e.addClass("jsmodern-picture-container").children().first().addClass("jsmodern-picture-inner").children().addClass("jsmodern-picture-part");e.on("selectstart",function(){return!1}).data("cacheIndex",0);var u=e.find(".jsmodern-picture-inner"),t=e.find(".jsmodern-picture-part"),l=e.find("img, a"),w=u.find("img").length;t.add(l).width(n).height(p);p="";for(l=0;lb?"0"+b:b)+":"+(10>a?"0"+a:a)}function d(a){a=parseInt(w.width())/(a||F)*G;H.html(c(a));h.currentTime=a;"play"===k.data("playState")?h.play():h.pause()}function e(a){a.webkitRequestFullScreen?a.webkitRequestFullScreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen():a.requestFullScreen&&a.requestFullScreen()}function q(){f.exitFullscreen?f.exitFullscreen():f.msExitFullscreen?f.msExitFullscreen():f.mozCancelFullScreen?f.mozCancelFullScreen():f.oRequestFullscreen?f.oCancelFullScreen():f.webkitExitFullscreen&&f.webkitExitFullscreen()}function n(){t.width(M).height(N);h.width=M;h.height=N;l.width(r).addClass("jsmodern-video-panelFull");z.addClass("jsmodern-video-fullout")}function p(){t.width(r).height(u);h.width=r;h.height=u;l.width(r).removeClass("jsmodern-video-panelFull");z.removeClass("jsmodern-video-fullout")}var g=b(this),k=g.find("video"),h=k[0],r=g.width(),u=g.height();k.removeAttr("controls");k.wrap('\x3csection class\x3d"jsmodern-video" style\x3d"width:'+r+"px;height:"+u+'px;"\x3e\x3c/section\x3e').prop({width:r,height:u});var t=g.find(".jsmodern-video");g.find(".jsmodern-video").append('\x3csection class\x3d"jsmodern-video-panel"\x3e\x3cb class\x3d"jsmodern-video-play"\x3e\x3c/b\x3e\x3cspan class\x3d"jsmodern-video-start"\x3e00:00\x3c/span\x3e\x3cspan\x3e/\x3c/span\x3e\x3cspan class\x3d"jsmodern-video-end"\x3e00:00\x3c/span\x3e\x3cdiv class\x3d"jsmodern-video-linebox"\x3e\x3cdiv class\x3d"jsmodern-video-pass"\x3e\x3c/div\x3e\x3cb class\x3d"jsmodern-video-linedot"\x3e\x3c/b\x3e\x3c/div\x3e\x3cb class\x3d"jsmodern-video-volume"\x3e\x3c/b\x3e\x3cdiv class\x3d"jsmodern-video-volumebox"\x3e\x3cdiv class\x3d"jsmodern-video-volumeline"\x3e\x3c/div\x3e\x3cb class\x3d"jsmodern-video-volumedot"\x3e\x3c/b\x3e\x3c/div\x3e\x3cb class\x3d"jsmodern-video-fullin"\x3e\x3c/b\x3e\x3c/section\x3e');var l=g.find(".jsmodern-video-panel"),w=l.find(".jsmodern-video-pass"),g=l.find(".jsmodern-video-linebox"),x=l.find(".jsmodern-video-linedot"),y=l.find(".jsmodern-video-play"),v=l.find(".jsmodern-video-volume"),A=l.find(".jsmodern-video-volumebox"),I=l.find(".jsmodern-video-volumeline"),C=l.find(".jsmodern-video-volumedot"),H=l.find(".jsmodern-video-start"),O=l.find(".jsmodern-video-end"),z=l.find(".jsmodern-video-fullin"),F=g.width();if(E)l.find("span").on("selectstart",function(){return!1});E&&f.all&&z.addClass("jsmodern-video-fullFalse");var J=0,K;k.on({play:function(){k.data("playState","play");y.addClass("jsmodern-video-pause");t.on("mousemove",function(){J=1;l.stop().fadeIn(50)});K=setInterval(function(){J?l.stop().fadeIn(100):(z.data("fullState")||z.hasClass("jsmodern-video-fullout"))&&l.stop().fadeOut(100);J=0},2E3)},pause:function(){k.data("playState","pause");y.removeClass("jsmodern-video-pause");t.off("mousemove mouseenter mouseleave");clearInterval(K)},ended:function(){k.data("playState","end");y.removeClass("jsmodern-video-pause");H.html("00:00");w.width(0);x.css("marginLeft",0);t.off("mousemove mouseenter mouseleave");l.fadeIn(100);clearInterval(K);a&&b.isFunction(a)&&a.call(h)}});var G;k.on("durationchange",function(){var a=h.duration;G=a;O.html(c(a))});k.on("timeupdate",function(){var a;isNaN(h.duration)||(a=h.currentTime,H.html(c(a)));O.html().replace(":","");a=a/G*F;w.width(a);x.css("marginLeft",a+"px")});g.on("click",function(a){a=a||window.event;var c=b(this).offset().left;w.width(a.pageX-c);x.css("marginLeft",a.pageX-c+"px");d()});x.on("mousedown",function(a){var c=b(this),g=b(this).parent().offset().left;b(f).on("mousemove",function(a){a=a||window.event;var b=a.pageX-g;a.preventDefault();0>b&&(b=0);b>F&&(b=F);c.css("marginLeft",b+"px").siblings().width(b);d()});b(f).mouseup(function(){b(this).off("mousemove")})});y.click(function(){h.paused?h.play():h.pause()});h&&(h.volume=.5);v.click(function(){h.muted?(h.muted=!1,v.removeClass("jsmodern-video-muted"),C.css("marginLeft",v.data("left")),I.width(v.data("left"))):(h.muted=!0,v.addClass("jsmodern-video-muted").data("left",C.css("marginLeft")),C.css("marginLeft",0),I.width(0))});var B=A.width();A.click(function(a){a=a||window.event;var c=b(this).offset().left;0<=a.pageX-c&&a.pageX-c<=B&&(h.muted=!1,v.removeClass("jsmodern-video-muted"),I.width(a.pageX-c),C.css("marginLeft",a.pageX-c+"px"),h.volume=(a.pageX-c)/B)});C.on("mousedown",function(a){var c=b(this),d=c.parent().offset().left;b(f).on("mousemove",function(a){a=a||window.event;var b=a.pageX-d;a.preventDefault();0>=b&&(b=0,v.addClass("jsmodern-video-muted"),h.muted=!0);b>B&&(h.muted=!1,b=B);0d&&k.height(d).find(".jsmodern-dialog-content").css({overflowY:"scroll",height:d-k.find(".jsmodern-dialog-title").height()-53+"px"});g.stop().animate({opacity:1},300);k.stop().animate({top:"20px",opacity:1},500,"easeInOutQuart");var h=function(){k.stop().animate({top:"-10px",opacity:0},400,"easeInOutQuart");g.delay(200).animate({opacity:0},300,function(){g.remove()})};k.find(".jsmodern-dialog-sure").click(function(){e();h()}).end().find(".jsmodern-dialog-cancel").click(function(){q();h()})}return this},scrollBar:function(d){b(d).each(function(){var a=b(this),c=a.children().first(),d=a.innerHeight(),e=c.outerHeight(!0);a.addClass("jsmodern-scrollBar-container");c.addClass("jsmodern-scrollBar-inner").after('\x3csection class\x3d"jsmodern-scrollbar"\x3e\x3c/section\x3e').data("translateY",0);var q=a.find(".jsmodern-scrollbar");q.data({translateY:0,cacheY:0});b("body").on("selectstart",".jsmodern-scroll-noselect",function(){return!1});var n=e+(parseInt(a.css("paddingTop"))+parseInt(a.css("paddingBottom")));q.height(~~(d*d/e));var p=d-q.height();q.on("mousedown",function(g){var e=b(this);g=g||window.event;var h=g.pageY-e.position().top-q.data("translateY");a.addClass("jsmodern-scroll-noselect");c.add(e).css("transition","0s");b(f).on("mousemove",function(a){a=a||window.event;var b=a.pageY-h;a.preventDefault();0>b&&(b=0);b>p&&(b=p);e.css("transform","translateY("+b+"px)").data("cacheY",b);c.css("transform","translateY(-"+n/d*b+"px)")})});b(f).mouseup(function(){b(this).off("mousemove");a.removeClass("jsmodern-scroll-noselect")});a.on("mousewheel DOMMouseScroll",function(a){a=a||window.event;var b=a.originalEvent.wheelDelta||a.originalEvent.detail,b=-300===b||-120===b||3===b?"down":"up";q.data("cacheY");a.preventDefault();a=q.data("cacheY");"down"===b?(a+=20,a>p&&(a=p)):(a-=20,0>a&&(a=0));q.css({transform:"translateY("+a+"px)",transition:".2s"}).data("cacheY",a);c.css({transform:"translateY(-"+n/d*a+"px)",transition:".2s"})})});return this},lazyload:function(d){var a=b(window).height();b(d).each(function(){b(this).find("img").addClass("jsmodern-lazyload").each(function(){var c=b(this),d=c.attr("data-lazy");b(window).on("load",function(){f.createElement("img").src=d});b(window).on("scroll",function(){var e=b(window).scrollTop();c.offset().top-e-50g&&(g=1);for(var k=1;k<=g;k++)a+='\x3ci class\x3d"jsmodern-page-every"\x3e'+k+"\x3c/i\x3e";a='\x3csection class\x3d"jsmodern-page"\x3e\x3ci class\x3d"jsmodern-page-first"\x3e\x3cspan\x3e\u00ab\x3c/span\x3e\x3c/i\x3e\x3ci class\x3d"jsmodern-page-prev"\x3e\x3cspan\x3e\u2039\x3c/span\x3e\x3c/i\x3e'+("\x3cdiv\x3e\x3cdiv\x3e"+a+"\x3c/div\x3e\x3c/div\x3e")+'\x3ci class\x3d"jsmodern-page-next"\x3e\x3cspan\x3e\u203a\x3c/span\x3e\x3c/i\x3e\x3ci class\x3d"jsmodern-page-last"\x3e\x3cspan\x3e\u00bb\x3c/span\x3e\x3c/i\x3e\x3c/section\x3e';d.addClass("jsmodern-page-content").append(a);a=d.find(".jsmodern-page");var h=a.find("div \x3e div"),r=a.find(".jsmodern-page-every"),u=a.find(".jsmodern-page-first"),t=a.find(".jsmodern-page-last"),l=a.find(".jsmodern-page-prev"),w=a.find(".jsmodern-page-next");c.data("index",1);r.first().addClass("active");d.on("selectstart",function(){return!1});var x=function(a){if(1042*-b&&h.stop().animate({marginLeft:c-42+"px"},100);break;case "prev":0>c&&h.stop().animate({marginLeft:c+42+"px"},100);break;case "first":h.stop().animate({marginLeft:0},100);break;case "last":h.stop().animate({marginLeft:42*-b+"px"},100)}}};x();"local"===m&&e&&b.isFunction(e)&&b.ajax(e("")).done(function(a){a=b.parseJSON(a);var d=[],e;for(e in a)d.push(p(a[e]));var f="",m="";for(a=0;a