/*! 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