/*! jsModern v3.4.2 | (c) Frank Chao | MIT license */ !function(c,r){"function"===typeof define&&define.amd?define(["jquery"],r):"undefined"!==typeof module&&"object"===typeof exports?module.exports=r(require("jquery")):c.jsModern=r(c.jQuery)}("undefined"!==typeof window?window:this,function(c){function r(a,b,f){var e=f.type;f.type=b;c.event.dispatch.call(a,f);f.type=e}if("undefined"===typeof jQuery)throw Error("jsModern's JavaScript requires jQuery");var I=c.fn.jquery.split("."),J=~~I[0],K=~~I[1];if(1===J&&9>K)throw Error("jsModern's JavaScript requires at least jQuery v1.9.0");if(!Array.isArray||!document.addEventListener||!1 in document.documentElement.style)throw Error("jsModern's JavaScript does not support of IE8-");var T=window.jsModern,v=navigator.userAgent.toLowerCase(),x={},L={};c("head");var E=c("html"),F=!!v.match("trident");c.event.special.tap={setup:function(){var a=this,b=!1,f=0;c(a).on("touchstart",function(b){f=Date.now()}).on("touchmove",function(a){b=!0}).on("touchend",function(e){!b&&300>c.now()-f&&(r(a,"tap",e),f=0)})}};c.event.special.tapHold={setup:function(){var a=this,b=0,f=0,e=0,d=0,g=!1,h;c(a).on("touchstart",function(c){b=c.originalEvent.targetTouches[0].pageX;f=c.originalEvent.targetTouches[0].pageY;c.originalEvent.preventDefault();h=setTimeout(function(){e=c.originalEvent.targetTouches[0].pageX;d=c.originalEvent.targetTouches[0].pageY;e!==b||d!==f||g||r(a,"tapHold",c)},750)}).on("touchmove",function(b){g=!0}).on("touchend",function(b){clearTimeout(h);b.originalEvent.preventDefault()})}};c.event.special.swipe={setup:function(){var a=this,b=0,f=0;c(a).on("touchstart",function(a){b=a.originalEvent.targetTouches[0].pageX;f=a.originalEvent.targetTouches[0].pageY}).on("touchmove",function(c){var d=c.originalEvent.changedTouches[0].pageY;if(0!==c.originalEvent.changedTouches[0].pageX-b||0!==d-f)c.originalEvent.preventDefault(),r(a,"swipe",c)})}};c.event.special.swipeLeft={setup:function(){var a=this,b=0;c(a).on("touchstart",function(a){b=a.originalEvent.targetTouches[0].pageX}).on("touchmove",function(b){b.originalEvent.preventDefault()}).on("touchend",function(f){-30>f.originalEvent.changedTouches[0].pageX-b&&r(a,"swipeLeft",f)})}};c.event.special.swipeRight={setup:function(){var a=this,b=0;c(a).on("touchstart",function(a){b=a.originalEvent.targetTouches[0].pageX}).on("touchmove",function(b){b.originalEvent.preventDefault()}).on("touchend",function(f){30f.originalEvent.changedTouches[0].pageY-b&&r(a,"swipeUp",f)})}};c.event.special.swipeDown={setup:function(){var a=this,b=0;c(a).on("touchstart",function(a){b=a.originalEvent.targetTouches[0].pageY}).on("touchmove",function(b){b.originalEvent.preventDefault()}).on("touchend",function(c){30(b/=d/2)?e/2*b*b*b*b+c:-e/2*((b-=2)*b*b*b-2)+c};var w={isMobile:function(){return v.match(/(ios|iphone|ipod|ipad|mobile|android|symbianos|ucweb|mqqbrowser|iemobile|webos|windows phone|windows mobile|opera mini|opera mobl|nexus|series|nokia|blackberry|meego|playbook|fennec|tablet)/)&&"ontouchend"in document?!0:!1},isIOS:function(a){var b=w.isMobile()&&v.match(/(ios|iphone|ipod|ipad)/)?!0:!1;if(0==arguments.length)return b;if("boolean"===c.type(a)&&a)return b?v.match(/os(.*)like mac os x/)[1].replace(/(_)/g,".").trim():!1},isAndroid:function(a){var b=!w.isMobile()||w.isIOS()||v.match(/(windows|blackberry|symbianos|bb|meego|playbook|fennec|iemobile)/)?!1:!0;if(0==arguments.length)return b;if("boolean"===c.type(a)&&a){var f=v.indexOf("android"),f=v.substring(f+7),e=f.indexOf(";");return b?f.substring(0,e).trim():!1}},time:function(a,b){if(0==arguments.length)return c.now();b=b||"-";a=new Date(a);var f={yy:a.getFullYear(),mm:a.getMonth()+1,dd:a.getDate(),h:a.getHours(),m:a.getMinutes(),s:a.getSeconds()},e;for(e in f){var d=f[e];f[e]=10>d?"0"+d:d}return f.yy+b+f.mm+b+f.dd+" "+f.h+":"+f.m+":"+f.s},random:function(a,b){function f(a,b){return Math.floor(Math.random()*(b-a+1)+a)}var e="",d=c.type(a),g=c.type(b);"number"===d&&"number"===g&&(e=f(a,b),e=Number(e));if("number"===d&&"boolean"===g&&b)for(;e.lengthc;c++)a+="abcdef"[w.random(0,5)];a=(Math.random().toFixed(16).replace("0.",w.random(10,99))+a).split("");for(c=0;36>c;c++){var e=w.random(0,31);b[c]=a[e];a.slice(e,1)}b[8]=b[13]=b[18]=b[23]="-";return b.join("")},unique:function(a){if(Array.isArray(a)){if(Array.from)a=Array.from(new Set(a));else{for(var b={},f=[],e=0,d=a.length;e(\s+)b.indexOf(e+".")&&!c.isPlainObject(d)&&(d=d.map(function(a){return{$:a}}),b=b.replace(new RegExp(e,"g"),e+".$"));b=b.replace(new RegExp(e+".","g"),"");m=f(b,d,"for").replace(/ jm\-for=\"(.*?)\"/g,"");c(this).replaceWith(m)});e.html(f(e.html(),a));e.find("[jm-event]").attr("data-event",d);if(k=b.css)e.find("*").each(function(){c(this).attr(d,"")}),k=k.replace(/[\n\t\r]/g,"").trim().replace(/\}(\s+)/g,"}").replace(/(\s+)\{/g,"{").replace(/\{/g,"["+d+"]{"),c("head").append('\x3cstyle class\x3d"jsmodern-tmpl-style"\x3e'+k+"\x3c/style\x3e");k=e.html().replace(/jm\-for=\"(.*?)\"/g,"");c(this)[b.place||"append"](k);e.remove()});e.find("[jm-event]").each(function(){var a=c(this).attr("data-event"),b=c(this).attr("jm-event");if(a=L[a])for(var d in a)b===d&&a[d].call(this);c(this).removeAttr("jm-event data-event")})}return this},fullScreenIn:function(a){a=a||document.documentElement;a.webkitRequestFullScreen?a.webkitRequestFullScreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen():a.requestFullScreen&&a.requestFullScreen();F&&E.data("fullScreenIn",!0);return this},fullScreenOut:function(a){a=a||document;a.webkitExitFullscreen?a.webkitExitFullscreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen?a.msExitFullscreen():a.exitFullscreen&&a.exitFullscreen();F&&E.removeData("fullScreenIn");return this},fullScreenToggle:function(a){if(F)w[E.data("fullScreenIn")?"fullScreenOut":"fullScreenIn"](a);else w[document.fullScreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullScreen?"fullScreenOut":"fullScreenIn"](a);return this},top:function(a,b){var f,e;c.isPlainObject(b)&&(f=b.time,e=b.distance);c.isNumeric(b)&&0K);c(window).on("scroll",function(){var a=c(window).scrollTop();a>(e||300)&&(g?d.show():d.stop().fadeIn(100));0===a&&(g?d.hide():d.stop().fadeOut(100))})}d.click(function(){c("html, body").stop().animate({scrollTop:0},f||300)});return this},textBind:function(a,b){function f(a){c(b).each(function(){var b=c(this);"input"===b[0].nodeName.toLowerCase()?b.val(a):b.html(a)})}c(a).each(function(){var a=c(this);a.on("input",function(){f(a.val())});v.match("msie 9.0")&&setInterval(function(){f(a.val())},13)});return this},marquee:function(a){var b=1E3/60;c(a).each(function(){var a=c(this),e=a.children(),d=0;e.each(function(){d+=c(this).outerWidth(!0)});if(d>a.width()){a.css("overflow","hidden");w.isMobile()&&a.addClass("jsmodern-select-none");e.wrapAll('\x3csection class\x3d"jsmodern-marquee-inner"\x3e\x3csection class\x3d"jsmodern-marquee-default"\x3e\x3c/section\x3e\x3c/section\x3e').parent().width(d);var e=a.find(".jsmodern-marquee-inner"),g=a.find(".jsmodern-marquee-default");g.after(g.clone(!0)).next().attr("class","jsmodern-marquee-repeat");e.width(2*d);var h=function(){a.scrollLeft(a.scrollLeft()>g.width()?0:a.scrollLeft()+1)},k=setInterval(h,b);a.on("mouseenter touchstart",function(){clearInterval(k)}).on("mouseleave touchend",function(){k=setInterval(h,b)})}});return this},share:function(a){var b=encodeURIComponent(location.href),f=document.title,e=null;c(document).on("click",function(d){d=d||window.event;d=c(d.target);var g=v.match("firefox");if(d.is(a.qrcode)){if(e)c("body").append(e);else{c("body").append('\x3csection class\x3d"jsmodern-share jsmodern-select-none" id\x3d"jsmodern-share"\x3e\x3cb\x3e\x3c/b\x3e\x3cp\x3e'+decodeURI("%E6%89%AB%E4%B8%80%E6%89%AB%E5%88%86%E4%BA%AB")+"\x3c/p\x3e\x3csection\x3e\x3c/section\x3e\x3c/section\x3e");var h=c("#jsmodern-share").find("section"),k="jquery-qrcode-"+w.random(15,!1),m=document.createElement("script");m.src="http://apps.bdimg.com/libs/jquery-qrcode/1.0.0/jquery.qrcode.min.js?"+ +new Date;m.type="text/javascript";m.id=k;document.body.appendChild(m);m.onload=function(){h.qrcode({render:"canvas",text:decodeURIComponent(b),width:h.width(),height:h.height()});e=c("#jsmodern-share");c("#"+k).remove()}}c("#jsmodern-share").find("b").click(function(){c(this).parent().remove()})}d.is(a.qzone)&&window.open("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url\x3d"+b+"\x26title\x3d"+f);d.is(a.sina)&&function(a,c,d){function e(){window.open(["http://v.t.sina.com.cn/share/share.php?",h].join(""),"mb")||(l.href="/tubujdt/kt/[/joefy.iunm""http://v.t.sina.com.cn/share/share.php?",h].join(""))}var l=c.location.href,h=["url\x3d",d(l),"\x26title\x3d",d(f),"\x26appkey\x3d2924220432\x26pic\x3d",d(b)].join("");g?setTimeout(e,0):e()}(screen,document,encodeURIComponent);d.is(a.douban)&&function(){var a=document,c=encodeURIComponent,d=window.getSelection,e=a.getSelection,a=a.selection,d=d?d():e?e():a?a.createRange().text:"",h="https://www.douban.com/recommend/?url\x3d"+c(b)+"\x26title\x3d"+c(f)+"\x26sel\x3d"+c(d)+"\x26v\x3d1",c=function(){window.open(h,"douban")||(location.href="/tubujdt/kt/i/joefy.iunm""\x26r\x3d1")};g?setTimeout(c,0):c()}();d.is(a.qq)&&window.open("http://connect.qq.com/widget/shareqq/index.html?url\x3d"+b+"\x26title\x3d"+f+"\x26desc\x3d"+f)});return this},picture:function(a,b){c(a).each(function(){function a(a){"fade"===k&&(a=-1==a?u-1:a==u?0:a,q.eq(a).stop().fadeIn(700).siblings().stop().fadeOut(700,function(){e(a);d.data("cacheIndex",a)}));"slide"===k&&(t.is(":animated")||t.stop().animate({left:-(g*a+g)+"px"},700,"easeInOutQuart",function(){-1===a&&(t.css("left","-"+g*u+"px"),a=u-1);a===u&&(t.css("left","-"+g+"px"),a=0);e(a);d.data("cacheIndex",a)}))}function e(a){A.eq(a).addClass("active").siblings().removeClass("active")}var d=c(this);d.find("a");var g=d.width(),h=d.height(),k="slide",m=!0,l=!0,n=b.dotPosition||"center",p=!1;b&&(k=b.type||"slide",m=b.arrow,l=b.dot,p=b.autoplay);d.addClass("jsmodern-picture-container").children().first().addClass("jsmodern-picture-inner").children().addClass("jsmodern-picture-part");d.on("selectstart",function(){return!1}).data("cacheIndex",0);var t=d.find(".jsmodern-picture-inner"),q=d.find(".jsmodern-picture-part"),z=d.find("img, a"),u=q.length;q.add(z).width(g).height(h);h="";for(z=0;zb?"0"+b:b)+":"+(10>a?"0"+a:a)},H;d.on("durationchange",function(){var a=g.duration;H=a;v.html(G(a))});d.on("timeupdate",function(){var a;isNaN(g.duration)||(a=g.currentTime,r.html(G(a)));v.html().replace(":","");a=a/H*x;n.width(a);p.css("marginLeft",a+"px")});var M=function(a){a=parseInt(n.width())/(a||x)*H;r.html(G(a));g.currentTime=a;"play"===d.data("playState")?g.play():g.pause()};a.on("click",function(a){a=a||window.event;var b=c(this).offset().left;n.width(a.pageX-b);p.css("marginLeft",a.pageX-b+"px");M()});p.on("mousedown",function(a){var b=c(this),d=c(this).parent().offset().left;c(document).on("mousemove",function(a){a=a||window.event;var c=a.pageX-d;a.preventDefault();0>c&&(c=0);c>x&&(c=x);b.css("marginLeft",c+"px").siblings().width(c);M()});c(document).mouseup(function(){c(this).off("mousemove")})});t.click(function(){g.paused?g.play():g.pause()});g&&(g.volume=.5);q.click(function(){g.muted?(g.muted=!1,q.removeClass("jsmodern-video-muted"),A.css("marginLeft",q.data("left")),u.width(q.data("left"))):(g.muted=!0,q.addClass("jsmodern-video-muted").data("left",A.css("marginLeft")),A.css("marginLeft",0),u.width(0))});var D=z.width();z.click(function(a){a=a||window.event;var b=c(this).offset().left;0<=a.pageX-b&&a.pageX-b<=D&&(g.muted=!1,q.removeClass("jsmodern-video-muted"),u.width(a.pageX-b),A.css("marginLeft",a.pageX-b+"px"),g.volume=(a.pageX-b)/D)});A.on("mousedown",function(a){var b=c(this),d=b.parent().offset().left;c(document).on("mousemove",function(a){a=a||window.event;var c=a.pageX-d;a.preventDefault();0>=c&&(c=0,q.addClass("jsmodern-video-muted"),g.muted=!0);c>D&&(g.muted=!1,c=D);0a.innerHeight()){a.addClass("jsmodern-scrollBar-container").append('\x3csection class\x3d"jsmodern-scrollbar"\x3e\x3c/section\x3e');"static"===a.css("position")&&a.css("position","relative");e.addClass("jsmodern-scrollBar-inner").data("y",0);var k=a.find(".jsmodern-scrollbar");k.data({y:0,cacheY:0});c("body").on("selectstart",".jsmodern-scroll-noselect",function(){return!1});k.height(~~(d*d/g));b&&(b=b.trim(),"."===b[0]?k.addClass(b.substring(1)):function(){var a=k.attr("style");k.attr("style",a+b)}());var m=d-k.height();k.on("mousedown",function(b){var f=c(this);b=b||window.event;var g=b.pageY-f.position().top-k.data("y");a.addClass("jsmodern-scroll-noselect");e.add(f).css("transition","0s");c(document).on("mousemove",function(a){a=a||window.event;var b=a.pageY-g;a.preventDefault();0>b&&(b=0);b>m&&(b=m);f.css("transform","translate(0, "+b+"px)").data("cacheY",b);e.css("transform","translate(0, -"+h/d*b+"px)")})});c(document).mouseup(function(){c(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";k.data("cacheY");a.preventDefault();a=k.data("cacheY");"down"===b?(a+=60,a>m&&(a=m)):(a-=60,0>a&&(a=0));k.css({transform:"translate(0, "+a+"px)",transition:".2s"}).data("cacheY",a);e.css({transform:"translate(0, -"+h/d*a+"px)",transition:".2s"})})}}),this},lazyload:function(a){function b(a,b){a.attr("src",b).on("load",function(){a.stop().animate({opacity:a.data("lazyOpacity")},500,function(){c(this).removeAttr("jm-lazy").data("lazyload",!0)})})}var f=c(window).height();c(a).each(function(){c(this).find("img").each(function(){function a(){var a=d[0].getBoundingClientRect();f>a.top&&b(d,g)}var d=c(this),g=d.attr("jm-lazy");d.data("lazyOpacity",d.css("opacity")).css("opacity",0);a();c(window).on("scroll",function(){!d.data("lazyload")&&a()})})});return this},page:function(a,b){a=c(document.querySelector(a));if(b&&c.isPlainObject(b)){var f=c(b.target),e=b.type,d=b.url,g=~~b.total,h=~~b.every,k=b.success,m=b.mobileMore||decodeURI("%E5%8A%A0%E8%BD%BD%E6%9B%B4%E5%A4%9A"),l=b.mobileNone||decodeURI("%E5%B7%B2%E6%97%A0%E6%9B%B4%E5%A4%9A%E6%95%B0%E6%8D%AE");b=b="";var n=g/h,n=1<=n?0n&&(n=1);for(var p=1;p<=n;p++)b+='\x3ci class\x3d"jsmodern-page-every"\x3e'+p+"\x3c/i\x3e";b='\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"+b+"\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';a.addClass("jsmodern-page-content").append(b);b=a.find(".jsmodern-page");var t=b.find("div \x3e div"),q=b.find(".jsmodern-page-every"),z=b.find(".jsmodern-page-first"),u=b.find(".jsmodern-page-last"),A=b.find(".jsmodern-page-prev"),r=b.find(".jsmodern-page-next");f.data("index",1);q.first().addClass("active");a.on("selectstart",function(){return!1});var v=function(a){if(1042*-b&&t.stop().animate({marginLeft:c-42+"px"},100);break;case "prev":0>c&&t.stop().animate({marginLeft:c+42+"px"},100);break;case "first":t.stop().animate({marginLeft:0},100);break;case "last":t.stop().animate({marginLeft:42*-b+"px"},100)}}};v();if(w.isMobile()){f.css("height","auto");a.empty().html('\x3csection class\x3d"jsmodern-page-more jsmodern-select-none"\x3e'+m+"\x3c/section\x3e");var y=a.find(".jsmodern-page-more");y.data("index",1);g===h&&y.html(l)}"local"===e&&d&&c.isFunction(d)&&c.ajax(d("")).done(function(a){a=c.parseJSON(a);var b=[],d;for(d in a)b.push(k(a[d]));var e="",m="";for(a=0;ab&&(h.height(b),m.css({overflowY:"scroll",height:b-l.height()-53+"px"}));n&&(b=.85*c(window).width()+"px",h.css({width:b,minWidth:b}).addClass("jsmodern-dialog-mobile"));g.stop().animate({opacity:1},300);h.stop().animate({opacity:1,top:n?"50%":"20px"},300);var q=function(){h.stop().animate({top:n?"43%":"-20px",opacity:0},300);g.delay(50).animate({opacity:0},300,function(){g.remove()})},r=c.isPlainObject(a);k.click(function(){r&&(a.sure?a.sure():f());q()});d.click(function(){r&&(a.cancel?a.cancel():e());q()})}return this}};Object.freeze(w);return w});