text: /* ***********************************************************
     ****************** CODESLIDER SCRIPT **********************
     *********************************************************** */
  
  !function(e){"use strict";e.codeslider=function(a,t){var r,i,s,n,o,l,d,u,c,f,p,h,m,v,g,w,y,C,x,b,N,F,I,T,L,k,$,S,O,A,B,P,E,R,X=a,D=e(window),V={},W={},M={},H={},q={},z={},j={check:function(){var e=X.children();e.length&&(Q.get(),G.cssName()),z.show?j.ready():X.remove()},ready:function(){G.abbr(),Y.structure(),Q.slider(),Q.slide(),t.isNav&&Y.nav(),t.isPag&&Y.pag(),t.isCap&&Y.cap(),Y.timer(),!d&&t.isPlayPause&&t.isSlideshow&&Y.play(),Y.other(),Z.codeWidth(),_.slideBegin(s.eq(t.idCur))},load:function(){!z.showFrom&&X.addClass(t.ns+"hide"),X.addClass(t.ns+"ready"),"dash"==t.layout?G.toggleDash():G.toggle(),0==t.idCur&&V.ev.trigger("start"),K.reLine(),t.isNav&&ea.nav(),t.isPag&&ea.pag(),ea.resize(),ea.touch(),ea.drag(),ea.keyboard(),t.isSlideshow&&sa.init()}},G={cssName:function(){z.ie=!1||document.documentMode,z.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,z.opera=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,z.chrome=!!window.chrome&&!z.opera,z.firefox="undefined"!=typeof InstallTrigger;for(var e=["ie","safari","opera","chrome","firefox"],a=e.length;a>=0&&!z.browser;a--)z[e[a]]&&(z.browser=e[a]);if(z.gesture=!!(window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture),z.ontouch=!!(z.gesture||"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch),t.isTouch=z.ontouch&&t.isTouch,z.ts=G.prefixed("transition","is"),z.cs=G.isCanvas(),W.clickName=t.isTouch&&!z.ie?"touchend":"click.cs",z.ts){var r={WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"};T=G.prefixed("transform","pre")+"transform",L=G.prefixed("transition","pre")+"transition",k=L+"-duration",O=L+"-timing-function",A=r[G.prefixed("transition")]}else T="left";z.show=t.isTouch&&"desktop"==t.show||!t.isTouch&&"mobile"==t.show?0:1},easeName:function(e){if("linear"==e)return"linear";if("swing"==e)return"ease";var a;switch(e=e.replace("ease","")){case"InSine":a=".47, 0,.745, .715";break;case"OutSine":a=".39, .575, .565, 1";break;case"InOutSine":a=".445, .05, .55, .95";break;case"InQuad":a=".55, .085, .68, .53";break;case"OutQuad":a=".25, .46, .45, .94";break;case"InOutQuad":a=".455, .03, .515, .955";break;case"InCubic":a=".55, .055, .675, .19";break;case"OutCubic":a=".215, .61, .355, 1";break;case"InOutCubic":a=".645, .045, .355, 1";break;case"InQuart":a=".895, .03, .685, .22";break;case"OutQuart":a=".165, .84, .44, 1";break;case"InOutQuart":a=".77, 0, .175, 1";break;case"InQuint":a=".755, .05, .855, .06";break;case"OutQuint":a=".23, 1, .32, 1";break;case"InOutQuint":a=".86, 0, .07, 1";break;case"InExpo":a=".95, .05, .795, .035";break;case"OutExpo":a=".19, 1, .22, 1";break;case"InOutExpo":a="1, 0, 0, 1";break;case"InCirc":a=".6, .04, .98, .335";break;case"OutCirc":a=".075, .82, .165, 1";break;case"InOutCirc":a=".785, .135, .15, .86";break;case"InBack":a=".6, -.28, .735, .045";break;case"OutBack":a=".175, .885, .32, 1.275";break;case"InOutBack":a=".68, -.55, .265, 1.55";break;case"InElastic":case"OutElastic":case"InOutElastic":case"InBounce":case"OutBounce":case"InOutBounce":default:a=".25, .1, .25, 1"}return"cubic-bezier("+a+")"},clone:function(e,a){if(1==e){for(var t=0;a>t;t++)s.eq(P-t).prependTo(r);K.translateX(a,!0),0>=P?P=g:P-=a}else if(-1==e){s.eq(B).appendTo(r);for(var t=0;a>t;t++)s.eq(B+t).appendTo(r);K.translateX(-a,!0),B>=g?B=0:B+=a}},toggle:function(){var e=t.idCur,a=s.eq(e);if(s.not(a).removeClass(t.current),a.addClass(t.current),t.isPag){var r=c.eq(e);c.not(r).removeClass(t.current),r.addClass(t.current)}if(t.isNav){var i=t.inActived;t.isLoop?(o.hasClass(i)&&o.removeClass(i),l.hasClass(i)&&l.removeClass(i)):(0==e&&o.addClass(i),e==g&&l.addClass(i),0!=e&&o.hasClass(i)&&o.removeClass(i),e!=g&&l.hasClass(i)&&l.removeClass(i))}t.isCap&&v.html(W.aCap[e]),_.add(a)},toggleDash:function(){if(t.isPag){for(var e=M.pagNum;M.nEnd<M.pagID[e];)e--;var a=M.pagItem0[M.pagID[e]];c.not(a).removeClass(t.current),a.addClass(t.current)}t.isNav&&!t.isLoop&&(0==M.nBegin&&o.addClass(t.inActived),M.nEnd==g&&l.addClass(t.inActived),0!=M.nBegin&&o.hasClass(t.inActived)&&o.removeClass(t.inActived),M.nEnd!=g&&l.hasClass(t.inActived)&&l.removeClass(t.inActived))},toggleFree:function(){var e=t.idCur,a=t.fName+"-out",r=t.fName+"-in",i=s.eq(e),n=s.eq(t.idLast);i.hasClass(a)&&i.removeClass(a),i.hasClass(r)||i.addClass(r),n.hasClass(a)||n.addClass(a),n.hasClass(r)&&n.removeClass(r)},toggleClass:function(e,a){var r=t.className[e],s=a?r[0]:r[1],n=a?r[1]:r[0],o=i;-1==a?(o.hasClass(r[0])&&i.removeClass(r[0]),o.hasClass(r[1])&&i.removeClass(r[1])):(o.hasClass(n)&&i.removeClass(n),o.hasClass(s)||i.addClass(s))},valueX:function(e){var a=e.substr(7,e.length-8).split(", ");return parseInt(a[4])},valueName:function(e,a,t,r,i){var s,n,o="\\d*\\.?\\d+(\\-+\\d*\\.?\\d+){0,3}",l="\\w*(\\-+\\w*){0,2}",d="#[0-9a-f]{3}([0-9a-f]{3})?",u="(\\s*(1|0?\\.?\\d*))?\\s*",c="(rgba|rgb)\\(\\s*((\\d{1,2}|1\\d+\\d|2([0-4]\\d|5[0-5]))\\s*,?){3}"+u+"\\)",f="(hsla|hsl)\\(\\s*(\\d{1,2}|[1-2]\\d{2}|3[0-5]\\d)\\s*,(\\s*(\\d{1,2}|100)\\%\\s*,?){2}"+u+"\\)",p=a+"\\-+("+d+"|"+c+"|"+f+"|"+o+"|"+l+")",h=/^\-?\d+$/g,m=function(e){return e=e.replace(a+"-",""),"object"==typeof r?-1!=r.indexOf(e)?e:t:h.test(e)?parseInt(e):e},v=function(a){if(/\w+\-+\w+/g.test(a)){var t=e.match(/\-+\d*\.?\d*/g);if("-"!=t[0]&&"-"!=t[1])for(var r=t.length-1;r>=0;r--)t[r]=t[r].replace(/^\-/g,""),t[r]=parseFloat(t[r]);else{t=e.match(/\-+\w+/g);for(var r=t.length-1;r>=0;r--)t[r]=t[r].replace(/^\-/g,""),/\d*\.?\d+/g.test(t[r])&&(t[r]=parseFloat(t[r]))}a=t}else/\d*\.?\d+/g.test(a)&&(a=parseFloat(a));return a};if(s=new RegExp(p,"g"),n=e.match(s),null!=n){for(var g=n.length,w=[],y=0;g>y;y++)w[y]=m(n[y]),h.test(w[y])?w[y]=parseInt(w[y]):""==w[y]&&void 0!=t&&(w[y]=t),i&&(w[y]=v(w[y]));return 1==g&&(w=w[0]),w}return void 0!=t?t:!1},is:function(e,a,t){if(void 0!==t){var r=G.valueName(e,a);return"string"==typeof r||"number"==typeof r?-1!="on true 1".indexOf(r)?"number"==typeof t?1:!0:-1!="off false 1".indexOf(r)?"number"==typeof t?0:!1:t:t}return-1!=e.indexOf(a)?1:0},isCanvas:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},prefixed:function(e,a){var t=document.createElement("p").style,r=["Webkit","Moz","ms","O"],i=["-webkit-","-moz-","-ms-","-o-"];if(""===t[Q])return"is"==a?1:"pre"==a?"":Q;e=e.charAt(0).toUpperCase()+e.slice(1);for(var s=r.length;s--;)if(""===t[r[s]+e])return"is"==a?1:"pre"==a?i[s]:r[s]+e;return 0},re0:function(){t.idCur=0,Z.codeWidth(),K.reLine(),!!console&&console.log("m.re0")},proto:{array:function(){Array.prototype.indexOf=function(e){for(var a=this.length>>>0,t=0;a>t;t++)if(t in this&&this[t]===e)return t;return-1}}},r:function(e){return Math.round(e)},r6:function(e){return Math.round(1e6*e)/1e6},c:function(e){return Math.ceil(e)},ra:function(){return Math.random()},rm:function(e,a){return Math.random()*(a-e)+e},cssD1:function(){S[k]=w[t.idCur]+"ms"},tl:function(e,a,t){var t=t?t:"px";return W.tl0+e+t+", "+a+t+W.tl1},tlx:function(e,a){var a=a?a:"px";return W.tlx0+e+a+W.tlx1},tly:function(e,a){var a=a?a:"px";return W.tly0+e+a+W.tly1},ts:function(e,a,t,r){t=t?" "+t:"",r=r?" "+r+"ms":"";var i={};return i[L]=e.toString()+" "+a+"ms"+t+r,i},tlx2:function(e,a){var a=a?a:"px";return z.ts?W.tlx0+e+a+W.tlx1:e+a},mConvert:function(e){return[[e[0],e[2],e[4]],[e[1],e[3],e[5]],[0,0,1]]},mReturn:function(e){return[G.r6(e[0][0]),G.r6(e[1][0]),G.r6(e[0][1]),G.r6(e[1][1]),e[0][2],e[1][2]]},mCombine:function(e,a){for(var t=[[1,0,0],[0,1,0],[0,0,1]],r=2,i=3,s=0;r>s;s++)for(var n=0;i>n;n++)t[s][n]=e[s][0]*a[0][n]+e[s][1]*a[1][n]+e[s][2]*a[2][n];return t},abbr:function(){t.ns=t.namespace}},Q={split:function(e,a,t,r){var i=a[0]?a[0]:X.data(a[1]);if(void 0!=i&&""!=i){for(var s=i.replace(/\s+/g," ").replace(/^\s*|\s*$/g,"").split(" "),n=0;n<s.length;n++){var o=s[n].match(/^\w*/g)[0],l=s[n].replace(o+"-",""),d="is"==o.substr(0,2)?1:0,u=t[o],c=r?s[n]:i;""!=l&&(d?-1!=="ontrue1".indexOf(l)?e[o]=1:-1!=="offalse0".indexOf(l)&&(e[o]=0):(u=u?u:0,e[o]=G.valueName(c,o,e[o],u[o],r)))}r||(e.strData=i)}},get:function(){!Array.prototype.indexOf&&G.proto.array();var e={layout:["line","dot","dash","free"],fx:t.fxName,height:["auto","fixed","max","min"],imgWidth:["none","autofit","smallfit","largefit"],imgHeight:["none","autofit","smallfit","largefit"],img:["autofit","autofill","smallfit","largefit","smallfill","largefill"],thumb:["none","list","bar"],timer:["none","bar","arc","number"]};Q.split(t,["",t.dataSlider],e),Q.split(t.arc,["","arc"],{})},setup:function(){z.setupInit||(t.height0=t.height),z.setupInit&&(t.isTouch=z.ontouch&&t.isTouch),"line"==t.layout&&"carousel"!=t.fx?t.layout="dot":"dot"==t.layout&&"carousel"==t.fx&&(t.layout="line"),"free"!=t.layout||z.ts||(t.layout=t.layoutFall),g=s.length-1,0==g&&(t.isNav&&(t.isNav=0),t.isPag&&(t.isPag=0)),1==g&&"line"==t.layout&&(t.isLoop=0),z.timer="none"!=t.timer?1:0,"arc"!=t.timer||z.cs||(t.timer="bar");var a=X.data("pagtext");if(void 0!=a&&(t.isPag=1,t.pagText=a),"none"!=t.thumb?(t.isPag=1,z.thumb=1):z.thumb=0,t.speed<200&&(t.speed=200),t.delay<500&&(t.delay=500),I={},$={},S={},$[k]="0s",R=100,"free"!=t.layout){if(z.ts){var n={};n[O]=G.easeName(t.easeTouch),r.css(n)}else z.jEase=!!e.easing,W.ease=z.jEase?t.easeTouch:"swing";z.ease=z.easeLast="touch"}var o="translate3d(";W.tl0=z.ie?"translate(":o,W.tl1=z.ie?")":",0)",W.tlx0=z.ie?"translateX(":o,W.tlx1=z.ie?")":",0,0)",W.tly0=z.ie?"translateY(0,":o+"0,",W.tly1=z.ie?")":",0)",z.rePosLine="line"==t.layout&&t.isLoop&&g?1:0,"line"==t.layout&&!z.rePosLine&&0==t.idCur&&0!=F&&K.translateX(0,!0,!0),z.rePosLine&&void 0==z.begin&&(z.begin=1),"dash"==t.layout?(z.thumb=0,M.nBegin=0,M.nEnd=0,M.pMin=0,M.pMax=0):(t.stepNav=1,t.stepPlay=1),t.hCanvas&&"fixed"!=t.height&&(t.height="fixed");var l=t.responsive;if(l){if("number"==typeof l)t.wRes=l,t.hRes=0;else if("string"==typeof l){var d=l.split("-");t.wRes=parseInt(d[0]),t.hRes=parseInt(d[1]),t.hRes&&(t.height="fixed")}z.setupInit&&!t.hRes&&t.height0!=t.height&&(t.height=t.height0)}if(z.res=l?1:0,W.mCanvas=t.mCanvas,t.media){if("string"==typeof t.media){var u=t.media;t.media=[u]}W.media={},W.media.num=t.media.length;for(var c=0,f=W.media.num-1;f>=0;f--){var p=t.media[f].split("-");W.media[f]={width:parseInt(p[0]),from:parseInt(p[1]),to:parseInt(p[2])},c=c<parseInt(p[2])?p[2]:c}W.media.wMax=parseInt(c)}if(z.setupInit||(z.res?(ia.varible(),W.rateLast=W.rate):W.rate=1),t.showFrom){if("string"==typeof t.showFrom){var u=t.showFrom;t.showFrom=[u]}else if("number"==typeof t.showFrom){var u=t.showFrom;t.showFrom=[u+"-100000"]}W.showFrom={},W.showFrom.num=t.showFrom.length;for(var f=W.showFrom.num-1;f>=0;f--){var p=[],h=t.showFrom[f];"number"==typeof h?(p[0]=h,p[1]=1e5):p=h.split("-"),W.showFrom[f]={from:parseInt(p[0]),to:parseInt(p[1])}}Z.codeShow()}else z.showFrom=1;t.isDrag?G.toggleClass("grab",1):G.toggleClass("grab",-1),t.isViewGrabStop?i.addClass(t.ns+"grabstop"):i.removeClass(t.ns+"grabstop"),!z.setupInit&&_.way(),z.setupInit&&"fixed"==t.height&&r.css("height",""),z.setupInit||(H.layer=[])},storeLast:function(){z.overlay1=t.isOverlay,z.shadow1=t.isShadow,z.slideshow1=t.isSlideshow,z.hoverPause1=t.isHoverPause,W.timer1=t.timer},slider:function(){Q.setup(),void 0==z.setupInit&&(z.setupInit=1),X.removeAttr("data-slider data-pagtext data-arc").removeData("slider pagtext arc"),X.addClass(t.ns+t.layout).addClass("fx-"+t.fx).addClass("height-"+t.height),!z.ts&&X.addClass(t.ns+"old"),!z.showFrom&&X.addClass(t.ns+"hide"),!!t.isLoadAll&&X.addClass(t.ns+"ready")},slide:function(){var a=0,r=[],i=[],n=[],o=[];z.fxLine="carousel"==t.fx,s.each(function(){var s=e(this),l=s.data(t.dataSlide);1==z.setupInit&&(0==a&&(W.$s0=s),1==a&&(W.$s1=s),2==a&&(W.$s2=s),a==g&&(W.$sn=s)),s.data({id:a}),a++,void 0!=l&&""!=l?(z.fxLine?n.push(t.fx):n.push(G.valueName(l,"fx",t.fx)),o.push(G.valueName(l,"slot",t.slot)),i.push(G.valueName(l,"speed",t.speed)),r.push(G.valueName(l,"delay",t.delay))):(n.push(t.fx),o.push(t.slot),i.push(t.speed),r.push(t.delay))}),"free"==t.layout&&Q.slideAddon(),W.fx=n,W.slot=o,t.fxNum=t.fxName.length-1,w=i,y=r,E=y[t.idCur],1==z.setupInit&&(z.setupInit=2)},slideAddon:function(){for(var a=0,r=t.fLoop>1?t.fLoop-1:g,i=0,n=0,o=function(){i=n,n=G.r(G.ra()*r)},l=0;g>=l;l++){var d=s.eq(l);if(d.addClass(t.fName+l),t.isInOutBegin&&(l==t.idCur?d.addClass(t.fName+"-in"):d.addClass(t.fName+"-out")),t.isClassRandom){do o();while(n==i&&t.fLoop>2);d.addClass("fx"+n)}else t.fLoop>1&&(d.addClass("fx"+a),a++,a>=t.fLoop&&(a=0))}if(t.isSlAsPag){t.isPag||(c=e(""));for(var l=0;g>=l;l++)c=c.add(s.eq(l));t.isPag||ea.pag(),X.addClass("slide-as-pag")}}},_={way:function(){if(W.aLoad=[],W.nLoad=void 0==W.nLoad?0:W.nLoad,W.loadNext=t.preload-1,z.preload=0,"all"==t.preload&&(t.preload=g+1),t.idCur>g&&(t.idCur=0),0==t.idCur)for(var e=0;g>=e;e++)W.aLoad[e]=e;else{var a=1,r=1,i=0,s=0;W.aLoad[0]=t.idCur;for(var e=1;g>=e;e++)t.idCur!=g&&(a||i)?(W.aLoad[e]=t.idCur+r,i?r++:a=0,W.aLoad[e]>=g&&(s=1)):(W.aLoad[e]=t.idCur-r,r++,a=s?0:1,W.aLoad[e]<=0&&(i=1))}},setupBegin:function(){W.nLoad<W.loadNext&&W.nLoad<g&&(W.nLoad++,_.slideBegin(s.eq(W.aLoad[W.nLoad])))},setupEnd:function(){if(z.preload){for(var e=1,a=W.loadNext-t.loadAmount;a<=W.loadNext;a++)s.eq(W.aLoad[a]).data("img-load")||(e=0);e&&W.nLoad<g?(W.loadNext+=t.loadAmount,W.nLoad++,_.slideBegin(s.eq(W.aLoad[W.nLoad]))):W.nLoad>=g&&(z.loadAll=1)}else{z.preload=1;for(var a=0;a<t.preload;a++)s.eq(W.aLoad[a]).data("img-load")||(z.preload=0);z.preload&&W.nLoad<g&&(W.loadNext+=t.loadAmount,W.nLoad++,_.slideBegin(s.eq(W.aLoad[W.nLoad])))}},add:function(e){var a=e.data("img-load"),r=e.data("isLoading");if(!z.loadALL&&!a&&!r)for(var i=W.nLoad;g>i;i++)W.aLoad[i]==t.idCur&&(i!=W.nLoad+1&&W.aLoad.splice(W.nLoad+1,0,W.aLoad.splice(i,1)[0]),W.loadNext++,W.nLoad++,_.slideBegin(s.eq(W.aLoad[W.nLoad])))},slideBegin:function(a){_.setupBegin();var r=a.find("img, a."+t.ns+t.imgName),i=r.length,s=0;a.data({"img-num":i,"img-load":0,isLoading:1,height:0}),"fixed"==t.height&&a.data("id")==W.aLoad[t.preload-1]&&Z.canvasHeightFix(),i?(U.icon.render(a),r.each(function(){var r=e(this);"a"==this.tagName.toLowerCase()&&(r=U.tagSwap(r));var n=void 0==r.data(t.layerName)&&r.parent("."+t.ns+t.slideName).length&&"dash"!=t.layout?1:0;r.data("isImgBack",n),n&&U.wrap(r),r.data("csvideo")&&U.videoAdd(r);var o=r.attr("data-"+t.lazyName),l=new Image,d=function(){s++,s==i&&setTimeout(function(){_.slideEnd(a)},1)};l.onload=function(){U.prop(a,r,l),d()},l.onerror=function(){r.attr("alt","[ img load fail ]"),!!console&&console.warn("[ codeslider: img load fail ] -> ("+o+")"),d()},void 0==o?(o=r.attr("src"),""==o&&(o="//:0"),l.src=o):(l.src=o,r.attr("src",o).removeAttr("data-"+t.lazyName))})):_.slideEnd(a)},slideEnd:function(e){var a=e.height(),i=e.data("id"),n=i==W.aLoad[t.preload-1];e.data({"img-load":1,height:a}),n&&("fixed"!=t.height&&(C=a,r.css("height",a)),"fixed"==t.height&&Z._slideVerCenter(e)),n&&j.load(),e.addClass(t.ns+"ready"),ra.init(s.eq(e.data("id"))),i==t.idCur&&ra.run(i,"start"),U.icon.remove(e),_.setupEnd(),!!e.data("isPlayNext")&&V.play();var o="loadSlide."+i;V.ev.trigger(o),i==W.aLoad[g]&&(t.isLoadAll=1,V.ev.trigger("loadAll"))}},U={prop:function(a,r,i){var s=i.width,n=i.height,o=s/n;if(r.data({width:s,height:n,rate:o}),z.res&&W.rate<1&&r.css({width:G.r(s*W.rate),height:G.r(n*W.rate)}),r.data("isImgBack")&&t.hRes&&U._fit(r),z.thumb&&!a.data("isGetThumb")){var l=function(e){var r,i=p.eq(a.data("id")),s=t.wThumb?t.wThumb:i.width(),n=t.hThumb?t.hThumb:i.height(),o=s/n,l=e.data("rate"),d={};s&&!n?(d={width:s},r=t.fitWidth):!s&&n?(d={height:n},r=t.fitHeight):s&&n&&(d={width:s,height:n},l>o?(r=t.fitHeight,e.css({left:-G.r((l*n-s)/2)})):(r=t.fitWidth,e.css({top:-G.r((s/l-n)/2)}))),e.css({width:"",height:""}),i.css(d).addClass(r).append(e)},d=a.data("imgthumb"),u="data";if(d||(d=r.data("imgthumb")),!d&&r.data("isImgBack")&&(d=r.attr("src"),u="bg"),d)if("data"==u){var c,f=new Image;f.onload=function(){c=e("<img></img>",{src:d}).data("rate",f.width/f.height),l(c)},f.onerror=function(){!!console&&console.warn("[ codeslider: thumb load fail ] -> ("+d+")")},f.src=d}else c=r.clone().data("rate",o),l(c)}},tagSwap:function(a){var r={};r["data-"+t.lazyName]=a.attr("href");var i=a.attr("class"),s=a.attr("id"),n=a.attr("style"),o=a.attr("data-csvideo"),l=a.attr("data-imgthumb"),d=t.isCap?"[img]":a.text(),u=t.ns+t.imgName,c="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",f=e("<img>",{src:c,alt:d}).attr(r);i!=u&&f.addClass(i).removeClass(u),s&&f.attr("id",s),n&&f.attr("style",n),o&&f.data("csvideo",o),l&&f.attr("data-imgthumb",l);var p="data-"+t.layerName,h=a.attr(p);if(h){var m={};m[p]=h,f.attr(m)}return z.ie&&f.removeAttr("width height"),a.after(f).remove(),f},wrap:function(a){var r=t.ns+t.imgName,i=e("<div></div>",{"class":r});"dash"!=t.layout&&a.wrap(i).removeClass(r)},videoAdd:function(a){var t=e("<div></div>",{"class":"cs-citeplay"});a.after(t)},icon:{render:function(a){var r=e("<div></div>",{"class":t.ns+"loader",text:"loading"});a.data("loader",r).append(r)},remove:function(e){var a=e.data("loader");a&&a.remove()}},slideWH:function(){s.each(function(){var a=e(this),r=a.find("."+t.ns+t.imgName+"> img");r.length&&void 0==r.data(t.layerName)&&(U._fit(r),"fix"==t.height&&"autofit"!=t.imgHeight&&"autofill"!=t.img&&(r.height()>C&&!a.hasClass("sl-hfit")?a.addClass("sl-hfit"):r.height()<C&&a.hasClass("sl-hfit")&&a.removeClass("sl-hfit")))})},_fit:function(e){var a=e.data("rate"),r=e.data("width"),i=e.data("height"),s=function(){e.css({width:x,height:G.r(x/a)})},n=function(){e.css({width:G.r(C*a),height:C})},o=function(){z.res&&W.rate<1||e.css({width:"",height:""})};"autofit"==t.imgWidth||"smallfit"==t.imgWidth&&x>r||"largefit"==t.imgWidth&&r>x?s(e):"fixed"==t.height||t.hRes?"autofit"==t.imgHeight||"smallfit"==t.imgHeight&&C>i||"largefit"==t.imgHeight&&i>C?n(e):"autofit"==t.img?a>b?s(e):n(e):"smallfit"==t.img&&x>r&&C>i?a>b?s(e):n(e):"largefit"==t.img&&r>x&&i>C?a>b?s(e):n(e):"autofill"==t.img?a>b?n(e):s(e):"smallfill"==t.img&&x>r&&C>i?a>b?n(e):s(e):"largefill"==t.img&&r>x&&i>C?a>b?n(e):s(e):o(e):o(e)},autoShow:function(){var e=s.eq(t.idCur).find("."+t.ns+t.imgName+"> img");e.length&&(e.css("position","static"),setTimeout(function(){e.css("position","")},1))}},Y={structure:function(){var a=t.ns+t.canvasName,n=t.ns+t.slideName,o=t.ns+t.viewportName,l=X.children(),d="div";r=X.find("."+a),r.length?(l=r.children(),d=r[0].tagName.toLowerCase(),"ul"==d&&(s=r.children("li"))):(l.wrapAll(e("<div></div>",{"class":a})),r=X.find("."+a)),r.children().each(function(){var a=e(this),t="ul"==d?"<li></li>":"<div></div>",r=this.tagName.toLowerCase();"li"==r||"div"==r||a.hasClass(n)?(!a.hasClass(n)&&a.addClass(n),!a.children().length&&a.removeClass(n)):a.wrap(e(t,{"class":n}))}),s=r.find("."+n),W.aCap=[],W.aPag=[];for(var u=0;u<s.length;u++){var c=s.eq(u),f=c.find("img, a."+t.ns+t.imgName),p="",h="";f.length&&void 0==f.data(t.layerName)&&f.parent("."+t.ns+t.slideName).length&&f.each(function(){var a=e(this),t=this.tagName.toLowerCase();"img"==t?p=a.attr("alt"):"a"==t&&(p=a.html())});var m=c.find("."+t.ns+"capitem");m.length&&(p=m.html(),m.remove()),W.aCap[u]=p;var v=c.find("."+t.ns+"pagitem");v.length&&(h=v.html(),v.remove()),W.aPag[u]=h}r.wrap(e("<div></div>",{"class":o})),i=X.find("."+o)},searchDOM:function(a){var r=e();if(t.name||t.name>=0&&null!=t.name){var i=e(a);i.length&&i.each(function(){var a,i=e(this).data(t.dataSlider);void 0!=i&&""!=i&&(a=G.valueName(i,"name")),a==t.name&&(r=e(this))})}return r.length?r:X.find(a)},nav:function(){var a="."+t.ns+t.navName,r=Y.searchDOM(a);if(r.length){n=r;var i=X.find("."+t.ns+t.nextName),s=X.find("."+t.ns+t.prevName),u=X.find("."+t.ns+t.playName);i.length&&(l=i),s.length&&(o=s),u.length&&(d=u,t.isPlayPause=1)}void 0==n&&(n=e("<div></div>",{"class":t.ns+t.navName})),void 0==o&&(o=e("<div></div>",{"class":t.ns+t.prevName,text:"prev"}),n.append(o)),void 0==l&&(l=e("<div></div>",{"class":t.ns+t.nextName,text:"next"}),n.append(l)),r.length||n.appendTo(X)},play:function(){var a="."+t.ns+t.playName,r=Y.searchDOM(a);r.length?d=r:(d=e("<div></div>",{"class":t.ns+t.playName,text:"play/pause"}),n?n.append(d):n=e("<div></div>",{"class":t.ns+t.navName}).append(d).appendTo(X))},pag:function(){var a="."+t.ns+t.pagName,r=Y.searchDOM(a);u=r.length?r:e("<div></div>",{"class":t.ns+t.pagName}),z.thumb&&(f=u.addClass(t.ns+t.thumbName)),"dash"==t.layout&&(M.pagItem0={}),c=e(""),p=e("");for(var i=0;g>=i;i++){var s=t.isPagNum?i:"",n=e("<div></div>",{"class":t.ns+"pagitem",html:'<span class="pagnum">'+t.pagText+s+"</span>"});if(n.data({id:i}).append(W.aPag[i]),c=c.add(n),"dash"==t.layout?M.pagItem0[i]=n:n.appendTo(u),z.thumb){var o=e("<div></div>",{"class":t.thumbWrap});n.append(o),p=p.add(o)}}r.length||u.appendTo(X),t.isPagWrap&&u.wrap(e("<div></div>",{"class":t.ns+"pagwrap"}))},cap:function(){var a="."+t.ns+t.capName,r=Y.searchDOM(a);v=r.length?r:e("<div></div",{"class":t.ns+t.capName}),r.length||v.appendTo(X)},timer:function(){if(!!h&&h.remove(),"none"!=t.timer){var a=t.ns+t.timerName,r=t.timerName+"-"+t.timer,i=Y.searchDOM("."+a);if(i.length?h=i.addClass(r):(h=e("<div></div>",{"class":a+" "+r}),h.appendTo(X)),"bar"==t.timer)m=e("<span></span>",{"class":t.timer}),h.append(m),sa.setup.bar();else if("arc"==t.timer){m=e("<canvas></canvas>"),h.append(m);var s={angCur:0,pi:Math.PI/180,width:null==t.arc.width?h.width():t.arc.width,height:null==t.arc.height?h.height():t.arc.height};W.arc=e.extend(t.arc,s),m.attr({width:W.arc.width,height:W.arc.height}),W.tContext=m[0].getContext("2d");var n=function(){var e=W.tContext;e.setTransform(1,0,0,1,0,0),e.translate(W.arc.width/2,W.arc.height/2),e.rotate(-W.arc.pi*(90-W.arc.rotate)),e.strokeStyle=W.arc.stroke,e.fillStyle=W.arc.fill,e.lineWidth=W.arc.weight};n(),window.reqAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,W.arc.update)}}()}else"number"==t.timer&&h.attr("data-num",0).text(0)}},divImg:function(a,r){var i=t[a+"Name"];i=t.ns+i;var s=a.charAt(0).toUpperCase()+a.slice(1),n=t["is"+s];if(W[a]=X.find("."+i),n){if(!W[a].length){var o=X.data("img"+a),l=o?'<div class="'+i+'"><img src="'+o+'" alt="['+a+']"></div>':'<div class="'+i+'"></div>';r.after(e(l))}}else W[a].length&&W[a].remove()},refresh:function(){z.overlay1!=t.isOverlay&&Y.divImg("overlay",r),z.shadow1!=t.isShadow&&Y.divImg("shadow",i)},other:function(){var e=s.find("[data-layer]");e.length&&e.addClass(t.ns+t.layerName),Y.refresh()}},K={reLine:function(){z.rePosLine&&(0==t.idCur&&(z.begin||z.pull0||K.translateX(g+1,!0),z.pull0||(K.objTranslateX(W.$s0,g+1,1),z.pull0=1),z.pull1||(K.objTranslateX(W.$s1,g+1,1),z.pull1=1),z.begin&&(K.translateX(g+1,!0),z.pull=1,z.begin=0),z.pull=1),1==t.idCur&&(z.pull&&(K.translateX(-(g+1),!0),z.pull=0),z.pull0&&(K.objTranslateX(W.$s0,-(g+1),1),z.pull0=0),z.pull1&&(K.objTranslateX(W.$s1,-(g+1),1),z.pull1=0)),t.idCur==g&&(z.pull0||(K.objTranslateX(W.$s0,g+1,1),z.pull0=1),z.pull1&&(K.objTranslateX(W.$s1,-(g+1),1),z.pull1=0),z.pull=0))},reLineAZ:function(){z.pull&&(K.translateX(-(g+1),1),z.pull=0),z.pull0&&(K.objTranslateX(W.$s0,-(g+1),1),z.pull0=0),z.pull1&&(K.objTranslateX(W.$s1,-(g+1),1),z.pull1=0)},preSlide:function(){0==t.idCur&&(!z.pull1&&z.pull0&&(K.objTranslateX(W.$s1,g+1,1),z.pull1=1),z.pulln||z.pull0||(K.objTranslateX(W.$sn,-(g+1),1),z.pulln=1)),1==t.idCur&&(z.pull0&&!z.pull1&&(K.objTranslateX(W.$s0,-(g+1),1),z.pull0=0),!z.pull2&&z.pull1&&(K.objTranslateX(W.$s2,g+1,1),z.pull2=1)),t.idCur==g&&(z.pull0||(K.objTranslateX(W.$s0,g+1,1),z.pull0=1),z.pull1&&(K.objTranslateX(W.$s1,-(g+1),1),z.pull1=0))},translateX:function(e,a,i,s){var n=N,o=i?e:F+-e*n,l={},d=function(){if(a&&r.css($),s){var e={};e[k]=s+"ms",r.css(e)}l[T]=W.tlx0+o+"px"+W.tlx1,r.css(l),a&&setTimeout(function(){G.cssD1(),r.css(S)},0)},u=function(){l[T]=o,a?r.stop(!0,!0).css(l):r.animate(l,{duration:w[t.idCur],queue:!1,easing:W.ease})};F=o,z.ts?d():u(),(W.wMin>-F||-F>W.wMax)&&G.re0()},stopX:function(){G.cssD1(),r.css($).css(S)},objTranslateX:function(e,a,r,i){var s="dash"==t.layout?M.pBegin[a]:a*N,n=function(){r&&(s+=G.valueX(e.css(T)))},o=function(){if(r){var a=parseInt(e.css(T));"auto"==a&&(a=0),s+=a}};z.ts?n():o(),"number"==typeof i&&(s+=i);var l={};l[T]=z.ts?G.tlx(s):s,e.css(l)},bufferX:function(){if("dot"==t.layout&&(q.offset/=2),(!t.isLoop||t.isLoop&&!g)&&((0==t.idCur&&q.offset>0||t.idCur==g&&q.offset<0)&&(q.offset/=4),t.isViewGrabStop&&(0==t.idCur&&q.offset>0?G.toggleClass("stop",1):t.idCur==g&&q.offset<0&&G.toggleClass("stop",0))),"free"!=t.layout){q.buffer=F+q.offset;var e={};e[T]=G.tlx2(q.buffer),r.css(e)}},nearX:function(){var e=q.offset;if(z.ease="touch","line"==t.layout&&!t.isLoop&&z.ts&&(F=W.pBegin[t.idCur]),"dash"==t.layout){var a,i=M.nBegin;if(0>e)for(;M.pBegin[i]<-q.buffer;)i++;else if(e>0)for(;M.pBegin[i]>-q.buffer;)i--;var a=i==M.nBegin?0:1;J.run(i,a)}else{var s=W.mCanvas?N-2*W.mCanvas:N,n=t.isTouch?600:300,o=G.r(s/2),l=G.r(s/4),d=G.r(s/10),u=W.tDrag1-W.tDrag0<n?d:"dot"==t.layout?l:o,c=function(e){z.ts&&("dot"==t.layout?S[k]=e?"600ms":"0ms":G.cssD1(),r.css(S))};-u>e&&(t.isLoop||!t.isLoop&&t.idCur<g)&&g?(c(0),"dot"==t.layout&&K.translateX(0),J.run(1,0)):e>u&&(t.isLoop||!t.isLoop&&t.idCur>0)&&g?(c(0),"dot"==t.layout&&K.translateX(0),J.run(-1,0)):(c(1),K.translateX(0)),(-u>e||e>u)&&t.isSlideshow&&(z.hoverAction=1)}},translateW:function(){("line"==t.layout||"dot"==t.layout||"free"==t.layout)&&(N=x,F=0),"dash"==t.layout&&(F=0)},animRebound:function(e){if(t.isAnimRebound){"dot"==t.layout?F=0:("line"==t.layout||"free"==t.layout)&&(F=W.pBegin[t.idCur]),G.cssD1(),r.css(S);var a=150,i=.05,s="next"==e?i:-i,n="next"==e?-i:i;K.translateX(s,0,0,a),clearTimeout(H.rebound),H.rebound=setTimeout(function(){G.cssD1(),r.css(S),K.translateX(n)},a)}}},Z={codeWidth:function(){z.res||(x=i.width()),K.translateW(),("line"==t.layout||"dot"==t.layout)&&s.css("width",N),"line"==t.layout&&Z._lineWidth(),"dash"==t.layout&&Z._dashWidth(),W.wMax=(g+2)*x,W.wMin=-x},_lineWidth:function(){if("line"==t.layout&&!t.isLoop&&z.ts){W.pBegin=[];for(var e=0,a=s.length;a>e;e++)W.pBegin[e]=-x*e}for(var r=s.length-1;r>=0;r--)K.objTranslateX(s.eq(r),r,0);z.pull=z.pull0=z.pull1=0,0==t.idCur?z.begin=1:(z.begin=0,K.translateX(t.idCur,!0))},_dashWidth:function(){M.pBegin=[],M.pEnd=[],M.width=[],M.mCanvas=parseInt(r.css("margin-left")),z.canvasEnd=0;for(var e=s.length,a=0,i=0;e>i;i++){var n=s.eq(i),o=n.outerWidth(!0);M.pBegin[i]=a,a+=o,M.pEnd[i]=a,M.width[i]=o,K.objTranslateX(n,i,0)}if(t.isPag){M.pagID=[0],c.remove(),M.pagItem0[0].data({id:0}).appendTo(u);for(var i=0,l=0;e>i;i++)l+=M.width[i],l>x-M.mCanvas&&(M.pagItem0[i].data({id:i}).appendTo(u),M.pagID.push(i),l=M.width[i]);c=u.find("li"),M.pagNum=M.pagID.length-1,ea.pag()}if(M.pMax=-(M.pEnd[e-1]-x+M.mCanvas),M.lastBegin=M.nBegin,M.nBegin=0,J.run(M.lastBegin,0),t.isLoop)for(var d=M.pagID[1]-M.pagID[0],i=0;d>i;i++){var f=s.eq(i).clone();f.data({id:-1}).appendTo(r)}},canvasHeight:function(){var e=s.eq(t.idCur),a=e.data("height"),i=function(){C=a,setTimeout(function(){r.animate({height:a},{duration:t.heightSpeed,queue:!1})},0)};("auto"==t.height&&C!=a&&a>0||"max"==t.height&&a>C&&a>0||"min"==t.height&&C>a&&a>0)&&i(),"auto"!=t.height&&e.data("img-load")&&Z._slideVerCenter(e)},canvasHeightFix:function(){if(t.hRes)C=G.r(t.hRes*W.rate),r.css("height",C);else{var e=r.height();!e&&t.hCanvas&&(e=t.hCanvas,r.css("height",e)),e||(e=0),C=e}z.res||(x=i.width()),b=x/C},slideHeight:function(){"max"==t.height&&(C=0),"min"==t.height&&(C=1e4),!z.res&&"auto"==t.height&&U.slideWH(),s.each(function(){var a=e(this);a.data("img-load")&&a.css("top","").data("height",a.height())})},_slideVerCenter:function(e){var a=G.r((C-e.height())/2);0!=a&&e.css("top",a)},codeShow:function(){var e=W.showFrom,a=D.width();z.showFrom=0;for(var t=e.num-1;t>=0&&!z.showFrom;t--)a>=e[t].from&&a<=e[t].to&&(z.showFrom=1)}},J={line:function(e){K.stopX(),K.reLine(),e.isID&&K.reLineAZ(),J.idCur(e),z.firefox&&U.autoShow(),clearTimeout(H.line),H.line=setTimeout(function(){Z.canvasHeight(),K.translateX(e.num),J.lineEnd(w[t.idLast]+10)},1)},lineEnd:function(e){clearTimeout(H.lineEnd),H.lineEnd=setTimeout(function(){K.reLine(),V.ev.trigger("after"),t.idCur==g&&V.ev.trigger("end"),ra.slideStart(t.idCur),J.end()},e)},dash:function(e){K.stopX(),J.dashNum(e),G.toggleDash(),!t.isLoop&&e.num>0&&M.nEnd==g?(K.translateX(M.pMax,0,1),z.canvasEnd=1):!t.isLoop&&e.num<0&&z.canvasEnd?(K.translateX(-M.pBegin[M.nBegin],0,1),z.canvasEnd=0):K.translateX(-M.pBegin[M.nBegin],0,1),setTimeout(J.end,w[0]+10)},dot:function(e){var a={};a.$sCur=s.eq(t.idCur),a.$sLast=s.eq(t.idLast),a.$tar=a.$sCur.find("."+t.ns+t.imgName),a.direct=e.num>0?"in":"out",a.$tar.length&&ta.init(a),Z.canvasHeight()},free:function(e){J.idCur(e),G.toggleFree()},idCur:function(e){t.idLast=t.idCur,t.idCur+=e.num,t.isLoop&&(e.num<0&&t.idCur<0?t.idCur=g:e.num>0&&t.idCur>g&&(t.idCur=0)),"dot"==t.layout?setTimeout(G.toggle,30):G.toggle()},dashNum:function(e){var a=M.nBegin,r=a+e.num;!t.isLoop&&e.num<0&&0>r?(e.num=-a,M.nBegin=0):!t.isLoop&&e.num>0&&r>g?(e.num=g-a,M.nBegin=g):M.nBegin+=e.num;var i=0,s=0;if(e.num>0)for(;s<e.num;s++)i+=M.width[a+1];else for(;s>e.num;s--)i-=M.width[a-1];for(var n=M.nBegin,o=-F-M.mCanvas+x+i;M.pEnd[n]<=o;)n++;if(M.nEnd=n-1,M.nEnd==g){for(var l=M.pEnd[g]-x+M.mCanvas,d=g;M.pBegin[d]>=l;)d--;M.nBegin=d+1}t.idCur=e.num>0?M.nEnd:M.nBegin},run:function(e,a){var i="dash"==t.layout?M.nBegin:t.idCur;if(!a||a&&i!=e){var s={num:e,isID:!!a},n=function(){if(s.isID?0==s.num&&V.ev.trigger("start"):(i+s.num==0||i+s.num-g==1)&&V.ev.trigger("start"),V.ev.trigger("before"),s.isID&&(s.num-=i),"dot"==t.layout&&J.idCur(s),"free"!=t.layout){var e,a={};"touch"==z.ease&&"move"==z.easeLast?e=t.easeTouch:"move"==z.ease&&"touch"==z.easeLast&&(e=t.easeMove),e&&(z.ts?(a[O]=G.easeName(e),r.css(a)):z.jEase&&(W.ease=e),z.easeLast=z.ease)}switch(t.layout){case"dot":J.dot(s);break;case"line":J.line(s);break;case"dash":J.dash(s);break;case"free":J.free(s)}};"dash"!=t.layout&&ra.slidePause(i),n()}},end:function(){z.fxRun=0,t.isSlideshow&&(z.hoverAction=1,!t.isHoverPause&&sa.go())}},ea={prev:function(){var e;if("visible"==t.stepNav){var a=M.nBegin-1,r=x-M.mCanvas,i=0;if(M.pEnd[a]<r)e=M.nBegin;else{for(;r>=i;)i+=M.width[a--];e=M.nBegin-(a+2)}}else e=t.stepNav;return z.ease="move",t.isLoop||!t.isLoop&&t.idCur>0?J.run(-e):K.animRebound("prev"),!1},next:function(e){var a=e?t.stepPlay:t.stepNav,r="visible"==a?M.nEnd-M.nBegin+1:a;return z.ease="move",t.isLoop||!t.isLoop&&t.idCur<g?J.run(r):K.animRebound("next"),!1},nav:function(){o.on(W.clickName,function(){return ea.prev(),!1}),l.on(W.clickName,function(){return ea.next(),!1})},pag:function(){c.off(W.clickName),c.on(W.clickName,function(){return z.ease="move",J.run(e(this).data("id"),1),!1})},touch:function(){ea.touchOFF(),t.isTouch&&ea.touchON()},touchON:function(){i.on("touchmove.cs",function(a){var t=a.originalEvent.touches[0];q.offset=t.pageX-q.o,q.y=Math.abs(q.y0-t.pageY),null==W.touchmove&&q.y>5&&(W.touchmove="page"),null==W.touchmove&&Math.abs(q.offset)>5&&(W.touchmove="slider"),(null==W.touchmove||"slider"==W.touchmove)&&(a.preventDefault(),K.bufferX());var r=e("#output");r.length&&r.text(W.touchmove)}),i.on("touchstart.cs",function(e){W.tDrag0=W.tDrag1=+new Date;var a=e.originalEvent.touches[0];q.o=a.pageX,q.y0=a.pageY,W.touchmove=null,q.offset=0,r.css($)}),i.on("touchend.cs",function(){W.tDrag1=+new Date,K.nearX()})},touchOFF:function(){i.off("touchmove.cs touchstart.cs touchend.cs")},drag:function(){z.move=0,ea.dragOFF(),t.isDrag&&ea.dragON()},dragEnd:function(){W.tDrag1=+new Date,z.move=0,K.nearX(),t.isDrag&&G.toggleClass("grab",1),t.isViewGrabStop&&G.toggleClass("stop",-1)},dragON:function(){i.on("dragstart",function(){return!1}),i.on("mousemove.cs",function(e){z.move&&(q.offset=e.pageX-q.o,K.bufferX())}),i.on("mousedown.cs",function(e){if(!z.move){if(W.tDrag0=+new Date,q.o=e.pageX,q.offset=0,r.css($),z.move=1,"line"==t.layout&&!t.isLoop&&z.ts){var a=r.css(T);F="none"==a?0:G.valueX(a)}t.isDrag&&G.toggleClass("grab",0)
  }}),i.on("mouseup.cs",function(){z.move&&ea.dragEnd()}),i.on("mouseleave.cs",function(){z.move&&ea.dragEnd()})},dragOFF:function(){i.off("dragstart mousemove.cs mousedown.cs mouseup.cs mouseleave.cs")},keyboard:function(){e(document).off("keyup.cs"),t.isKeyboard&&e(document).on("keyup.cs",function(e){if(sa.scroll.check(1),z.into){var a=e.keyCode;z.ease="move",37==a?t.isLoop||!t.isLoop&&t.idCur>0?J.run(-1):K.animRebound("prev"):39==a&&(t.isLoop||!t.isLoop&&t.idCur<g?J.run(1):K.animRebound("next"))}})},resize:function(){var e=t.isTouch?100:300,a=function(){clearTimeout(H.resize),H.resize=setTimeout(function(){if(V.ev.trigger("resize"),t.showFrom){Z.codeShow();var e=t.ns+"hide";z.showFrom||X.hasClass(e)||X.addClass(e),z.showFrom&&X.hasClass(e)&&X.removeClass(e)}(i.width()!=x||r.height()!=C)&&(aa.resize(),("line"==t.layout||"dot"==t.layout)&&s())},e)},s=function(){clearTimeout(H.resize),H.resize=setTimeout(function(){i.width()!=x&&aa.resize()},t.heightSpeed+10)};D.on("resize.cs",function(){a()})}},aa={removeClass:function(){var e=t.ns+"one "+t.ns+"multi",a=t.ns+"line "+t.ns+"dot "+t.ns+"dash";X.removeClass(e+" "+a)},slide:function(){if("dot"==t.layout){var e={};e[T]="",s.css(e),K.translateX(0,1,1)}},resize:function(){z.res&&ia.setup(),"fixed"==t.height&&Z.canvasHeightFix(),Z.slideHeight(),Z.codeWidth(),z.rePosLine&&K.reLine(),!z.res&&U.slideWH(),setTimeout(ra.update,0),setTimeout(Z.canvasHeight,10)}},ta={init:function(e){var a="random"==W.fx[t.idCur]?t.fxName[G.r(G.rm(2,t.fxNum))]:W.fx[t.idCur];ta[a](e)},setup:function(a,r,n,o){var l=a.$sLast.find(".fx-overlay"),d="."+t.ns+t.imgName,u=a.$sLast.find(d+"> img");switch(u.length&&u.css("visibility",""),l.length&&l.remove(),a.d={},a.direct){case"in":a.d={is:1,fade:1,reFade:0,mark:-1};break;case"out":a.d={is:0,fade:0,reFade:1,mark:1}}r&&(a.d.is=1);var c=(t.idCur,"<div></div>");a.$cur=a.$sLast.find(d),a.wCur0=a.$cur.width(),a.wTar0=a.$tar.width(),a.hTar=a.$tar.height(),a.wCur=a.wCur0<x?a.wCur0:x,a.wTar=a.wTar0<x?a.wTar0:x,a.isW=a.wCur>a.wTar,a.wLarge=a.isW?a.wCur:a.wTar,a.wSmall=a.isW?a.wTar:a.wCur,a.$wrapBack=a.d.is?a.$cur.clone():a.$tar.clone(),a.$wrapFront=a.d.is?a.$tar.clone():a.$cur.clone(),a.$fxOver=e(c,{"class":"fx-overlay"}).css("width",a.wLarge),a.$fxInner=e(c,{"class":"fx-inner"}).css({width:a.wLarge,height:a.hTar}),a.$fxBack=e(c,{"class":"fx-back"}),a.$fxFront=e(c,{"class":"fx-front"}),a.$wrapBack.add(a.$wrapFront).find("img").css("visibility",""),a.$fxOver.append(a.$fxInner).appendTo(s.eq(t.idCur)),a.$fxBack.append(a.$wrapBack).appendTo(a.$fxInner);var f="background-color",p={};if(p[f]=i.css(f),a.$fxInner.css(p),a.wCur!=a.wTar&&a.$wrapFront.css(p),o){var h=a.d.is?1:.5,m=a.d.is?.5:1;a.$fxBack.find("img").css("opacity",h).animate({opacity:m},w[t.idCur])}var v=a.$wrapBack,g=a.$wrapFront,y=v.find("img"),b=g.find("img"),N={width:x,height:"auto"},F={width:"auto",height:C};if(v.hasClass(t.fitWidth)?y.css(N):v.hasClass(t.fitHeight)&&y.css(F),g.hasClass(t.fitWidth)?b.css(N):g.hasClass(t.fitHeight)&&b.css(F),a.$wrapFront.appendTo(a.$fxFront),n){var I;a.hSlot=G.c(a.hTar/a.slot),a.slotHor=G.r(a.wLarge/a.hSlot),I=a.wLarge-a.hSlot*a.slotHor,a.wFront=a.hSlot+G.c(I/a.slotHor),a.$fxFront.css({width:a.wFront,height:a.hSlot}),a.$wrapFront.css({width:"100%",height:"100%"})}else a.wFront=G.c(a.wLarge/a.slot),a.$fxFront.css({width:a.wFront,height:"100%"}),a.$wrapFront.css({width:a.wFront,height:"100%"});a.pSlideView=G.c((x-a.wLarge)/2),a.pTarView=a.wTar0>x?G.r((a.wTar0-x)/2):0,a.pCurView=a.wCur0>x?G.r((a.wCur0-x)/2):0,a.pFView=a.d.is?a.pTarView:a.pCurView,a.pBView=a.d.is?a.pCurView:a.pTarView;var T=a.d.is?a.isW:!a.isW,L=(a.wLarge-a.wSmall)/2;a.pImgBack=T?0:L,a.pImgFront=T?L:0,a.$fxBack.find("img").css("left",-a.pBView+a.pImgBack),a.top=G.r((a.$sCur.height()-a.$sLast.height())/2),n?a.d.is&&(a.$fxBack.css("top",a.top),a.top=0):a.d.is?a.$fxBack.css("top",a.top):a.$wrapFront.find("img").css("top",a.top),a.d.is&&a.$tar.find("img").css("visibility","hidden")},transformEnd:function(a,r){a.$fxInner.on("dragstart",function(){return!1}),W.fxTime0=+new Date;var i=a.easeIn?a.easeIn:"easeOutCubic",s=a.easeOut?a.easeOut:"easeInCubic",n=a.d.is?G.easeName(i):G.easeName(s);a.$fxFront=a.$fxInner.find(".fx-front"),a.$fxFront.each(function(){var a,i=e(this),s=i.data("speed"),o=i.data("tfEnd"),l="number"!=typeof o.opacity?G.ts(T,s,n):G.ts("opacity",s,n);"this"==r&&(a=i),"wrap"==r&&(a=i.find("."+t.ns+t.imgName)),setTimeout(function(){z.ts?a.css(l).css(o):a.animate(o,s)},i.data("delay"))}),setTimeout(function(){ta.end(a)},w[t.idCur])},end:function(e){e&&(e.d.is&&e.$tar.find("img").css("visibility",""),e.$fxOver.remove()),V.ev.trigger("after"),t.idCur==g&&V.ev.trigger("end"),ra.slideStart(t.idCur),J.end()},fade:function(e){e.slot=1,ta.setup(e,!1,!1,!1);var a={};a.opacity=e.d.reFade,e.$fxFront.css(a),e.$wrapFront.find("img").css({left:-e.pFView+e.pImgFront,top:e.top});var r={};r.opacity=e.d.fade,e.$fxFront.data({speed:w[t.idCur],delay:0,tfEnd:r}).appendTo(e.$fxInner),e.easeIn="linear",e.easeOut="linear",ta.transformEnd(e,"this")},rectMove:function(e,a){if(void 0==a){var r=x>768?5:3,i=W.slot[t.idCur];e.slot="auto"==i?G.r(G.rm(0,r+3)):parseInt(i)}else e.slot=a;ta.setup(e,!0,!1,!1);var s={},n={};s[T]=z.ts?G.tlx(e.d.mark*e.wFront):e.d.mark*e.wFront,n[T]=z.ts?G.tlx(0):0,e.$wrapFront.css(s);for(var o=0;o<e.slot;o++)e.$wrapFront.find("img").css("left",-(o*e.wFront)-e.pFView+e.pImgFront),e.$fxFront.clone().css({left:o*e.wFront,top:0}).data({speed:w[t.idCur],delay:0,tfEnd:n}).appendTo(e.$fxInner);var l={};if(l[T]=z.ts?G.tlx(-e.d.mark*e.wFront):-e.d.mark*e.wFront,z.ts){e.easeIn="easeOutCubic",e.easeOut="easeInCubic";var d=e.d.is?G.easeName(e.easeIn):G.easeName(e.easeOut),u={};u=G.ts(T,w[t.idCur],d),e.$wrapBack.css(u),setTimeout(function(){e.$wrapBack.css(l)},1)}else e.$wrapBack.animate(l,w[t.idCur]);ta.transformEnd(e,"wrap")},move:function(e){ta.rectMove(e,1)},rectRun:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(3,6)):parseInt(a),ta.setup(e,!1,!1,!0);var r={};r.speed=w[t.idCur]/4,r.delayAll=w[t.idCur]-r.speed,r.delay=r.delayAll/e.slot;for(var i,s,n,o=0;o<e.slot;o++){e.$wrapFront.find("img").css({left:-(o*e.wFront)-e.pFView+e.pImgFront});var n=r.delayAll-o*r.delay,l=e.d.is?-(e.wFront+e.pSlideView):o*e.wFront,d=e.d.is?G.r(o*e.wFront):e.wLarge+e.pSlideView;i={},i[T]=z.ts?G.tlx(l):l,e.$fxFront.css(i),s={},s[T]=z.ts?G.tlx(d):d,e.$fxFront.clone().data({speed:r.speed,delay:n,tfEnd:s}).appendTo(e.$fxInner)}ta.transformEnd(e,"this")},rectSlice:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(4,10)):parseInt(a),ta.setup(e,!1,!1,!0);var r={};r.speed=w[t.idCur]/4,r.delayAll=w[t.idCur]-r.speed,r.delay=r.delayAll/e.slot;for(var i,s,n,o=0;o<e.slot;o++){e.$wrapFront.find("img").css({left:-(o*e.wFront)-e.pFView+e.pImgFront}),n=e.d.is?o*r.delay:r.delayAll-o*r.delay;var l=G.r(o/2)>o/2?100:-100,d=e.d.is?l:0,u=e.d.is?0:l;i={},z.ts?i[T]=G.tly(d,"%"):i.top=d+"%",e.$fxFront.css({left:o*e.wFront}).css(i),s={},z.ts?s[T]=G.tly(u,"%"):s.top=u+"%",e.$fxFront.clone().data({speed:r.speed,delay:n,tfEnd:s}).appendTo(e.$fxInner)}ta.transformEnd(e,"this")},rubyFade:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(2,4)):parseInt(a),ta.setup(e,!1,!0,!1),e.$fxFront.css("opacity",e.d.reFade);for(var r,i={},s=0;s<e.slot;s++)for(var n=0;n<e.slotHor;n++)e.$wrapFront.find("img").css({left:-(n*e.wFront)-e.pFView+e.pImgFront,top:-(s*e.hSlot)+e.top}),i.speed=G.r(G.rm(100,w[t.idCur])),i.delay=w[t.idCur]-i.speed,r={},r.opacity=e.d.fade,e.$fxFront.clone().css({left:n*e.wFront,top:s*e.hSlot}).data({speed:i.speed,delay:i.delay,tfEnd:r}).appendTo(e.$fxInner);e.easeOut="easeOutCubic",ta.transformEnd(e,"this")},rubyMove:function(e){function a(e){var a={};switch(e){case 0:a.x=0,a.y=-100;break;case 1:a.x=100,a.y=0;break;case 2:a.x=0,a.y=100;break;case 3:a.x=-100,a.y=0}return a}var r=W.slot[t.idCur];e.slot="auto"==r?G.r(G.rm(2,4)):parseInt(r),ta.setup(e,!1,!0,!1);for(var i,s,n,o={},l=0;l<e.slot;l++)for(var d=0;d<e.slotHor;d++)e.$wrapFront.find("img").css({left:-(d*e.wFront)-e.pFView+e.pImgFront,top:-(l*e.hSlot)+e.top}),i=a(G.r(3*G.ra())),z.ts?(s={},s[T]=G.tl(i.x,i.y,"%"),n={},n[T]=G.tl(0,0,"%")):(s={},s.left=i.x,s.top=i.y,n={},n.left=0,n.top=0),e.d.is?e.$wrapFront.css(s):e.$wrapFront.css(n),o.speed=G.rm(100,300),o.delay=G.ra()*(w[t.idCur]-o.speed),e.$fxFront.clone().css({left:d*e.wFront,top:l*e.hSlot}).data({speed:o.speed,delay:o.delay,tfEnd:e.d.is?n:s}).appendTo(e.$fxInner);ta.transformEnd(e,"wrap")},rubyRun:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(2,4)):parseInt(a),ta.setup(e,!1,!0,!1);for(var r,i,s={},n={},o=0;o<e.slot;o++)for(var l=0;l<e.slotHor;l++){switch(e.$wrapFront.find("img").css({left:-(l*e.wFront)-e.pFView+e.pImgFront,top:-(o*e.hSlot)+e.top}),G.r(3*G.ra())){case 0:n.x=l*e.wFront,n.y=-e.hSlot;break;case 1:n.x=e.wLarge+e.pSlideView,n.y=o*e.hSlot;break;case 2:n.x=l*e.wFront,n.y=e.hTar;break;case 3:n.x=-e.wFront-e.pSlideView,n.y=o*e.hSlot}z.ts?(r={},r[T]=G.tl(n.x,n.y),i={},i[T]=G.tl(l*e.wFront,o*e.hSlot)):(r={},r.left=n.x,r.top=n.y,i={},i.left=l*e.wFront,i.top=o*e.hSlot),e.d.is?e.$fxFront.css(r):e.$fxFront.css(i),s.speed=G.rm(100,300),s.delay=G.ra()*(w[t.idCur]-s.speed),e.$fxFront.clone().data({speed:s.speed,delay:s.delay,tfEnd:e.d.is?i:r}).appendTo(e.$fxInner)}ta.transformEnd(e,"this")},rubyScale:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(2,4)):parseInt(a),ta.setup(e,!1,!0,!1);var r=e.d.is?0:1,i=e.d.is?1:0;z.ts?(I={},I[T]="scale("+r+")",e.$wrapFront.css({width:"100%",height:"100%"}).css(I),I={},I[T]="scale("+i+")",i=I):(e.$wrapFront.css({width:100*r+"%",height:100*r+"%",left:50*i+"%",top:50*i+"%"}),I={},I.width=100*i+"%",I.height=100*i+"%",I.left=50*r+"%",I.top=50*r+"%",i=I);for(var s={},n=0;n<e.slot;n++)for(var o=0;o<e.slotHor;o++)e.$wrapFront.find("img").css({left:-(o*e.wFront)-e.pFView+e.pImgFront,top:-(n*e.hSlot)+e.top}),s.speed=G.rm(100,300),s.delay=G.ra()*(w[t.idCur]-s.speed),e.$fxFront.css({left:o*e.wFront,top:n*e.hSlot}),e.$fxFront.clone().data({speed:s.speed,delay:s.delay,tfEnd:i}).appendTo(e.$fxInner);ta.transformEnd(e,"wrap")},zigzagRun:function(e){var a=W.slot[t.idCur];e.slot="auto"==a?G.r(G.rm(2,5)):parseInt(a),ta.setup(e,!1,!0,!1);var r={};r.speed=G.r(w[t.idCur]/(e.slot*e.slotHor)-.5),r.delay=r.speed;for(var i,s,n,o,l,d,u,c=e.slot,f=e.slotHor,p=0,h=0;h<e.slot;h++)for(var m=0;m<e.slotHor;m++)e.$wrapFront.find("img").css({left:-(m*e.wFront)-e.pFView+e.pImgFront,top:-(h*e.hSlot)+e.top}),n=f-m,s=G.r(n/2)>n/2?h:c-h-1,p=s+c*(f-m-1),d=e.d.is?-(e.pSlideView+e.wFront):m*e.wFront,o={},o[T]=z.ts?G.tlx(d):d,e.$fxFront.css(o),u=e.d.is?m*e.wFront:e.pSlideView+e.wLarge,l={},l[T]=z.ts?G.tlx(u):u,i=r.delay*p,e.$fxFront.clone().css({top:h*e.hSlot}).data({speed:r.speed,delay:i,tfEnd:l}).appendTo(e.$fxInner);ta.transformEnd(e,"this")}},ra={init:function(a){var r=a.find("[data-"+t.dataLayer+"]"),i={is:0};if(r.length){i=e.extend(i,{num:0,maxspeed:0,isLayerRunComplete:0});var s=e("");r.each(function(){var r=e(this),n=r.data(t.dataLayer);if(""!=n){s=s.add(r),i.num++,n=n.replace(/\s+/g," ").replace(/^\s*|\s*$/g,"");var o={data:n,xyValue:null,xyOut:[],update:{rValue:[]},is:{},idSlide:a.data("id"),tagName:r[0].tagName.toLowerCase(),animSet:{count:G.valueName(n,"count",1),direction:G.valueName(n,"direction","normal"),delay:G.valueName(n,"delay",0)}},l=G.valueName(n,"isRaUp");o.is.raUp=l===!1?t.isLayerRaUp:l,o.css={fontsize:parseInt(r.css("font-size")),lineheight:parseInt(r.css("line-height")),width:G.valueName(n,"width"),height:G.valueName(n,"height")};for(var d,u,c=["left","right","top","bottom"],f=["border","margin","padding"],p=["-width","",""],h={},m=0;3>m;m++){h={},d=f[m],o.css["is"+d]=0;for(var v=0;4>v;v++)u=c[v],h[u]=parseInt(r.css(d+"-"+c[v]+p[m])),o.css["is"+d]+=Math.abs(h[u]);o.css[d]=h}z.res&&ra.style(r,o),ra.animRaw(o),ra.animPre(o),ra.tfSetup(o),ra.tfPre(o),ra.tfOut(r,o),ra.tsOut(o),r.css(o.tfOut[0]),r.data(t.dataLayer,o).removeAttr("data-"+t.dataLayer,"")}}),i.is=i.num>0?1:0,i.select=s}a.data("layer",i)},style:function(e,a){var t=W.rate,r=["left","right","top","bottom"],i=a.css,s={};if("img"!=a.tagName&&(s["font-size"]=1!=t?G.r(i.fontsize*t)+"px":"",s["line-height"]=1!=t?G.r(i.lineheight*t)+"px":""),i.width&&(s.width=G.r(i.width*t)+"px"),i.height&&(s.height=G.r(i.height*t)+"px"),i.isborder)for(var n=0;4>n;n++){var o,l="border-"+r[n]+"-width";0!=i.border[r[n]]&&(o=G.r(i.border[r[n]]*t),s[l]=o>1?o+"px":"1px")}if(i.ismargin)for(var n=0;4>n;n++)0!=i.margin[r[n]]&&(s["margin-"+r[n]]=G.r(i.margin[r[n]]*t)+"px");if(i.ispadding)for(var n=0;4>n;n++)0!=i.padding[r[n]]&&(s["padding-"+r[n]]=G.r(i.padding[r[n]]*t)+"px");e.css(s)},animRaw:function(e){for(var a=e.data,t=a.split(";"),r=0,i=[],s=t.length,n=0;s>n;n++){var o={};/^\s*$/g.test(t[n])&&0!=n||(Q.split(o,[t[n],""],{},1),i[r]=o,r++)}1==r&&(i=[{},i[0]],r=2),e.animRaw=i,e.animNum=r-1},animPre:function(e){for(var a,r,i=e.animRaw,s=i.length,n=["x","y","rotate","scale","skew","opacity","start","speed","es"],o=[0,0,0,[1,1],[0,0],1,t.layerStart,t.layerSpeed,"ease"],l=n.length,d=[],u=0;s>u;u++)d[u]={};for(var u=0;l>u;u++){a=o[u];for(var c=0;s>c;c++)r=a,a=i[c][n[u]],void 0==a&&(a=r),d[c][n[u]]=a}if(void 0==i[0].opacity&&(d[0].opacity=0),void 0==i[s-1].opacity&&e.animNum>1&&(d[s-1].opacity=0),z.ts)for(var u=0;s>u;u++)d[u].es=G.easeName(d[u].es);else for(var u=0;s>u;u++)"ease"==d[u].es&&(d[u].es="swing");void 0==i[0].x&&(d[0].x=d[1].x),void 0==i[0].y&&(d[0].y=d[1].y),e.animPre=d},xy:function(e,a){var t=[1,0,0,1,0,0];return t[4]=e,t[5]=a,t},rotate:function(e){var a=[1,0,0,1,0,0],t=parseInt(e)*Math.PI/180,r=Math.cos(t),i=Math.sin(t);return a[0]=r,a[1]=i,a[2]=-i,a[3]=r,a},scale:function(e,a){var t=[1,0,0,1,0,0];return void 0==a&&(a=e),t[0]=e,t[3]=a,t},skew:function(e,a){var t=[1,0,0,1,0,0],r=parseInt(e)*Math.PI/180,i=parseInt(a)*Math.PI/180;return r=Math.tan(r),i=Math.tan(i),t[2]=r,t[1]=i,t},tfSetup:function(e){for(var a=e.animPre,t=[],r=[],i="ra",s=0,n=0;n<=e.animNum;n++){r[n]=[];var o,l=a[n].x,d=a[n].y;"string"==typeof l&&l==i&&(s=1,r[n].push("x")),"string"==typeof d&&d==i&&(s=1,r[n].push("y")),o=ra.xy(l,d);var u,c=a[n].rotate;"object"==typeof c&&"number"==typeof c[0]?c=c[0]:"string"==typeof c||"string"==typeof c[0]?((c==i||c[0]==i)&&(s=1,r[n].push("rotate")),c=0):"boolean"==typeof c&&(c=0),u=ra.rotate(c);var f,p,h,m=a[n].scale;"object"==typeof m?("number"==typeof m[0]?p=m[0]:(m[0]==i&&(s=1,r[n].push("scaleX")),p=1),"number"==typeof m[1]?h=m[1]:(m[1]==i&&(s=1,r[n].push("scaleY")),h=1)):"string"==typeof m?(m==i&&(s=1,r[n].push("scale")),p=h=1):p=h="boolean"==typeof m?1:m,f=ra.scale(p,h);var v,g,w,y=a[n].skew;"object"==typeof y?("number"==typeof y[0]?v=y[0]:(y[0]==i&&(s=1,r[n].push("skewX")),v=0),"number"==typeof y[1]?g=y[1]:(y[1]==i&&(s=1,r[n].push("skewY")),g=0)):"string"==typeof y?(y==i&&(s=1,r[n].push("skew")),v=g=0):"boolean"==typeof y?v=g=0:(v=y,g=0),w=ra.skew(v,g),t[n]=[o,u,f,w],r[n]=r[n].length?r[n]:0}e.tfSetup=t,e.update.random=r,e.is.random=s},tfPre:function(e){for(var a=e.tfSetup,t=[],r=0;r<=e.animNum;r++){for(var i=G.mConvert(a[r][1]),s=2;s<a[r].length;s++){var n=G.mConvert(a[r][s]);i=G.mCombine(i,n)}t[r]=G.mReturn(i),t[r][4]=a[r][0][4],t[r][5]=a[r][0][5]}e.tfPre=t},randomUpdate:function(e){for(var a=e.update.random,t=e.tfPre,r=[],i=0;i<=e.animNum;i++)if("object"==typeof a[i]){for(var s,n=[[t[i][0],t[i][2],0],[t[i][1],t[i][3],0],[0,0,1]],o=a[i].length-1;o>=0;o--)s=ra.randomValue(a[i][o]),"x"==a[i][o]?n[0][2]=s[0][2]:"y"==a[i][o]?n[1][2]=s[1][2]:n=G.mCombine(n,s);r[i]=G.mReturn(n)}else r[i]=0;e.update.rValue=r},randomValue:function(e){var a,t,r;switch(e){case"x":a=G.r(G.rm(0,x)),r=ra.xy(a,0);break;case"y":t=G.r(G.rm(0,C)),r=ra.xy(0,t);break;case"rotate":a=G.rm(-360,360),r=ra.rotate(a);break;case"scale":a=G.ra()>.5?G.rm(1,5):G.rm(.2,1),r=ra.scale(a);break;case"scaleX":a=G.ra()>.5?G.rm(1,5):G.rm(.2,1),r=ra.scale(a,1);break;case"scaleY":t=G.ra()>.5?G.rm(1,5):G.rm(.2,1),r=ra.scale(1,t);break;case"skew":case"skewX":a=G.rm(-60,60),r=ra.skew(a,0);break;case"skewY":t=G.rm(-60,60),r=ra.skew(0,t)}return G.mConvert(r)},xyValue:function(e,a){null==a.xyValue&&(a.xyValue={});var t=a.xyValue,r=W.mCanvas;void 0==t.hs&&(t.hs=s.eq(a.idSlide).data("height")),void 0==t.wl&&(t.wl=e.outerWidth()),void 0==t.hl&&(t.hl=e.outerHeight()),void 0==t.xl&&(t.xl=r),void 0==t.xc&&(t.xc=G.r((x-t.wl)/2)),void 0==t.xr&&(t.xr=x-r-t.wl),void 0==t.yt&&(t.yt=0),void 0==t.yc&&(t.yc=G.r((t.hs-t.hl)/2)),void 0==t.yb&&(t.yb=t.hs-t.hl)},xyGet:function(e,a,t,r){null==a.xyValue&&ra.xyValue(e,a);var i=a.xyValue,s=t.charAt(0);return i[r+s]},xyShort:function(e,a,r,i){var n=a.xyValue,o=a.xyOut,l=null,d=null,u=10,c=a.update.rValue[i],f=c?c:a.tfPre[i],p=function(){return!z.ts||1==f[0]&&0==f[1]&&0==f[2]&&1==f[3]?0:1},h=function(e){var r;void 0==a.layerGhost?(r=e.clone().addClass(t.ns+"layerghost").appendTo(s.eq(a.idSlide)),a.layerGhost=r):r=a.layerGhost;var i={};return i[T]="matrix("+f[0]+","+f[1]+","+f[2]+","+f[3]+",0,0)",r.css($).css(i),r[0].getBoundingClientRect()},m=function(){var a=p(),t=a?h(e):0,s=a?G.r(t.width):n.wl,c=a?G.r(t.height):n.hl;switch(r){case"leftOut":l=-s+(s-n.wl)/2-u,d=o[i][1];break;case"rightOut":l=x+(s-n.wl)/2+u,d=o[i][1];break;case"topOut":l=o[i][0],d=-c+(c-n.hl)/2-u;break;case"bottomOut":l=o[i][0],d=n.hs+(c-n.hl)/2+u}};return 0==i?m(i+1):m(i),null!=l&&null!=d?[l,d]:null},tfOut:function(e,a){var t=a.tfPre,r=a.xyOut;ra.randomUpdate(a);for(var i=0;i<=a.animNum;i++){var s=t[i];r[i]=[],r[i][0]="string"==typeof s[4]?"ra"==s[4]?a.update.rValue[i][4]:ra.xyGet(e,a,s[4],"x"):G.r(s[4]*W.rate)+W.mCanvas,r[i][1]="string"==typeof s[5]?"ra"==s[5]?a.update.rValue[i][5]:ra.xyGet(e,a,s[5],"y"):G.r(s[5]*W.rate)}for(var i=0;i<=a.animNum;i++){var n=a.animRaw[i].xy;if("string"==typeof n){null==a.xyValue&&ra.xyValue(e,a);var o=ra.xyShort(e,a,n,i);null!=o&&(r[i][0]=o[0],r[i][1]=o[1])}i==a.animNum&&void 0!=a.layerGhost&&(a.layerGhost.remove(),a.layerGhost=void 0)}var l=[],d=a.update.rValue;if(z.ts)for(var i=0;i<=a.animNum;i++){var s=d[i]?d[i]:t[i];l[i]={},l[i][T]="matrix("+s[0]+","+s[1]+","+s[2]+","+s[3]+","+r[i][0]+","+r[i][1]+")",l[i].opacity=a.animPre[i].opacity}else for(var i=0;i<=a.animNum;i++)l[i]={},l[i].left=r[i][0]+"px",l[i].top=r[i][1]+"px",l[i].opacity=a.animPre[i].opacity;a.tfOut=l},tsOut:function(e){for(var a=[],t=0;t<=e.animNum;t++)a[t]={},a[t][k]=e.animPre[t].speed+"ms",a[t][O]=e.animPre[t].es;e.tsOut=a},run:function(a,t){if("number"==typeof a){var r=s.eq(a).data("layer");r&&r.is&&r.select.each(function(){ra.start(e(this),t)})}else"object"==typeof a&&ra.start(a,t)},start:function(e,a){var r=e.data(t.dataLayer),i=r.animSet,s=r.animPre,n=function(a){var t=setTimeout(function(){if(i.countCur++,"normal"==i.direction)z.ts?e.css($).css(r.tfOut[0]):(e.stop(!0),e.css(r.tfOut[0])),l();else if("alternate"==i.direction){var a=i.countCur/2==G.r(i.countCur/2);a?d():l()}},a);H.layer.push(t)},o=function(a,t){var o=setTimeout(function(){z.ts?e.css(r.tsOut[a]).css(r.tfOut[a]):e.animate(r.tfOut[a],s[a].speed,s[a].es);var t=i.direction,o="infinite"==i.count||i.countCur<i.count;("normal"==t&&a==r.animNum||"alternate"==t&&0==i.startDirect&&a==r.animNum||"alternate"==t&&1==i.startDirect&&0==a)&&o&&(r.is.raUp&&r.is.random&&ra.tfOut(e,r),n(r.animPre[a].speed))},t);H.layer.push(o)},l=function(){i.startDirect=0;for(var e=s[1].start,a=1;a<=r.animNum;a++)o(a,e),a<r.animNum&&(e+=s[a+1].start)},d=function(){i.startDirect=1;for(var e=r.animNum,a=s[e-1].start,t=e-1;t>=0;t--)o(t,a),t>=1&&(a+=s[t-1].start)};switch(a){case"start":var u=setTimeout(function(){i.countCur=1,l()},r.animSet.delay);H.layer.push(u);break;case"initless":z.ts?(e.css($),setTimeout(function(){e.css(r.tfOut[0])},1)):(e.stop(!0),e.css(r.tfOut[0]))}},slidePause:function(e){ra.clear(),ra.run(e,"initless")},slideStart:function(e){ra.clear(),ra.run(e,"initless"),setTimeout(function(){ra.run(e,"start")},50)},clear:function(){if(H.layer)for(;H.layer.length>0;)clearTimeout(H.layer.pop())},update:function(){s.each(function(){var a=e(this),r=a.data("layer");if(r&&r.is){r.select.each(function(){var a=e(this),r=a.data(t.dataLayer);if(z.res)if(W.rateLast!=W.rate&&ra.style(a,r),"img"==r.tagName)ia.updateImgSize(a);else{var i=a.find("img");i.length&&i.each(function(){ia.updateImgSize(e(this))})}r.xyValue=null,ra.tfOut(a,r)});var i=a.data("id");i==t.idCur?ra.slideStart(i):ra.slidePause(i)}})}},ia={setup:function(){ia.varible(),ia.updateImgWrap()},varible:function(){if(x=i.width(),t.media){var e=W.media.wMax,a=e>t.wRes?e>=x:t.wRes>x;if(a){for(var r,s=W.media,n=s.num-1;n>=0;n--)s[n].from<=x&&x<=s[n].to&&(r=(x-s[n].width)/2);W.mCanvas=void 0!=r?r:t.mCanvas}else W.mCanvas=(x-t.wRes)/2}else W.mCanvas=t.wRes>x?t.mCanvas:(x-t.wRes)/2;W.mCanvas=G.r(W.mCanvas),W.rateLast=W.rate,t.media&&e>t.wRes&&e>=x?W.rate0=W.rate=(x-2*W.mCanvas)/t.wRes:(W.rate0=x/t.wRes,W.rate=W.rate0>1?1:W.rate0-2*W.mCanvas/t.wRes)},updateImgWrap:function(){var a=r.find("."+t.ns+t.imgName+"> img");a.length&&a.each(function(){ia.updateImgSize(e(this))})},updateImgSize:function(e){W.rate<1?e.css({width:G.r(e.data("width")*W.rate),height:G.r(e.data("height")*W.rate)}):e.css({width:"",height:""})}},sa={init:function(){z.hoverAction=0,sa.focus(),sa.scroll.setup(),sa.hover(),t.isPlayPause&&sa.toggle(),z.stop=0,sa.go()},go:function(){z.stop||(z.pauseActive?z.playing&&sa.pause():z.focus&&z.into&&!z.hover?z.fxRun||(z.hoverAction?sa.reset():sa.play()):z.playing&&sa.pause())},update:function(){W.timer1&&W.timer1!=t.timer&&(clearInterval(H.timer),Y.timer(),!!W.tTimer0&&sa.pause(),sa.play()),void 0!=z.slideshow1&&z.slideshow1!=t.isSlideshow&&(t.isSlideshow?sa.init():(sa.pause(1),D.off("focus.cs blur.cs scroll.cs"),X.off("mouseenter.cs mouseleave.cs"))),z.hoverPause1!=t.isHoverPause&&sa.hover()},setup:{bar:function(){var e={};if(e[T]=G.tlx2(-100,"%"),z.ts){var a={};a=G.ts(T,0,"linear"),m.css(a).css(e)}else m.css(e)},arc:function(){W.tContext},number:function(){h.text(0)},none:function(){}},play:function(){var e=function(){clearTimeout(H.play),H.play=setTimeout(sa.reset,w[t.idCur]+10)};z.playing=1,W.tTimer0=+new Date,z.timer&&sa.updateTimer[t.timer](),clearTimeout(H.play),H.play=setTimeout(function(){var a="dash"==t.layout?M.nEnd:t.idCur,r=a>=g?0:a+1,i=s.eq(r);i.data("img-load")?(z.fxRun=1,t.isLoop||a!=g?ea.next(1):J.run(0,1),e()):(i.data({isPlayNext:1}),V.stop())},E)},reset:function(){E!=y[t.idCur]&&(E=y[t.idCur]),"bar"==t.timer&&100!=R?R=100:"arc"==t.timer?W.arc.angCur=0:"number"==t.timer&&0!=R&&(R=0),sa.play()},pause:function(e){if(z.playing=0,z.hoverAction=0,e)E=y[t.idCur],sa.setup[t.timer]();else{var a=E;W.tTimer1=+new Date,E=y[t.idCur]-(W.tTimer1-W.tTimer0),y[t.idCur]!=a&&(E-=y[t.idCur]-a),0>E&&(E=0,z.hoverAction=1)}z.timer&&sa.stopTimer(),clearTimeout(H.play)},updateTimer:{bar:function(){var e=function(){var e={};e[T]=G.tlx2(-R,"%"),z.ts?(m.hide().show(),m.css($).css(e)):m.css(e)},a=function(){var e={};if(e[T]=G.tlx2(0),z.ts){var a={};a[k]=E+"ms",m.hide().show(),m.css(a).css(e)}else m.animate(e,{duration:E,easing:"linear"})};e(),setTimeout(a,20)},arc:function(){var e=function(){var a=W.tContext;a.clearRect(-W.arc.width/2,-W.arc.height/2,W.arc.width,W.arc.height),a.beginPath(),a.arc(0,0,W.arc.oRadius,0,360*W.arc.pi,!1),a.lineWidth=W.arc.oWeight,a.strokeStyle=W.arc.oStroke,a.fillStyle=W.arc.oFill,a.stroke(),a.fill(),a.closePath(),a.beginPath(),a.arc(0,0,W.arc.radius,0,W.arc.pi*W.arc.angCur,!1),a.lineWidth=W.arc.weight,a.strokeStyle=W.arc.stroke,a.fillStyle=W.arc.fill,a.stroke(),a.fill(),a.closePath(),reqAnimFrame(e)};e(),clearInterval(H.timer),H.timer=setInterval(function(){W.arc.angCur+=360/y[t.idCur]*W.arc.update,W.arc.angCur>360&&clearInterval(H.timer)},W.arc.update)},number:function(){var e=E,a=function(){e-=100,R=100-e/y[t.idCur]*100,R=G.r(R),R>100&&(R=0),h.attr("data-num",R).text(R)};clearInterval(H.timer),H.timer=setInterval(a,100)}},stopTimer:function(){if("bar"==t.timer){R=E/y[t.idCur]*100;var e={};e[T]=G.tlx(-R,"%"),z.ts?m.css($).css(e):m.stop(!0).css(e)}else"arc"==t.timer?(W.arc.angCur=360-E/y[t.idCur]*360,clearInterval(H.timer)):"number"==t.timer&&clearInterval(H.timer)},focus:function(){z.focus=1,D.on("focus.cs",function(){z.focus||(z.focus=1,sa.go())}).on("blur.cs",function(){z.focus&&(z.focus=0,sa.go())})},scroll:{setup:function(){z.into=0,sa.scroll.check();var e=200;D.on("scroll.cs",function(){clearTimeout(H.scroll),H.scroll=setTimeout(function(){!z.pauseActive&&sa.scroll.check()},e)})},check:function(e){sa.scroll.position(),W.topW<=W.topCS+100&&W.botW>=W.botCS-100?z.into||(z.into=1,!e&&sa.go()):z.into&&(z.into=0,!e&&sa.go())},position:function(){var e=document;W.topW=Math.max(e.body.scrollTop,e.documentElement.scrollTop),W.hW=window.innerHeight?window.innerHeight:e.documentElement.clientHeight,W.botW=W.hW+W.topW,W.topCS=X.offset().top,W.botCS=W.topCS+C}},hover:function(){t.isHoverPause?(z.hover=0,X.off("mouseenter.cs mouseleave.cs").on("mouseenter.cs",function(){sa.hover1()}).on("mouseleave.cs",function(){sa.hover0()})):X.off("mouseenter.cs mouseleave.cs")},hover0:function(){z.hover=0,sa.go()},hover1:function(){z.hover=1,sa.go()},toggle:function(){z.pauseActive=0,d.on(W.clickName,function(){return d.hasClass(t.actived)?(z.pauseActive=0,d.removeClass(t.actived)):(z.pauseActive=1,d.addClass(t.actived)),sa.go(),!1})}};j.check(),V={prev:function(){ea.prev()},next:function(){ea.next()},goTo:function(e){e>=0&&g>=e&&J.run(e,1)},play:function(){t.isSlideshow?!z.stop||z.playing||z.fxRun?sa.play():(z.stop=0,sa.reset()):(t.isSlideshow=1,sa.init())},pause:function(){z.playing&&sa.pause()},stop:function(){z.stop||(z.stop=1,sa.pause(1)),t.isSlideshow&&(t.isSlideshow=0)},prop:function(a,r){Q.storeLast(),t=e.extend(t,a),!r&&V.refresh()},refresh:function(){aa.removeClass(),Q.slider(),Q.slide(),G.toggle(),aa.slide(),aa.resize(),Y.refresh(),ea.touch(),ea.drag(),ea.keyboard(),sa.update()},width:function(){return x},height:function(){return C},curId:function(){return t.idCur},slideLength:function(){return g+1},slideCur:function(){return s.eq(t.idCur)},opts:function(){return t},varible:function(){return W},browser:function(){return z.browser},ev:e("<div></div>",{"class":"cs-event"})},z.show&&e.data(a[0],"codeslider",V)},e.fn.codeslider=function(){var a=arguments;return e(this).each(function(){var t=e(this),r=t.data("codeslider");if(void 0==a[0]&&(a[0]={}),"object"==typeof a[0])if(r)r.prop(a[0]);else{var i=e.extend({},e.fn.codeslider.defaults,a[0]);i.class0=t.attr("class"),new e.codeslider(t,i)}else try{r[a[0]](a[1])}catch(s){void 0!=console&&console.warn("[ codeslider: function not exist! ]")}})},e.fn.codeslider.defaults={namespace:"cs-",canvasName:"canvas",viewportName:"viewport",slideName:"slide",navName:"nav",nextName:"next",prevName:"prev",playName:"playpause",pagName:"pag",pagText:"",capName:"cap",thumbName:"thumb",timerName:"timer",layerName:"layer",overlayName:"overlay",shadowName:"shadow",imgName:"img",lazyName:"src",className:{grab:["cursor-grab","cursor-grabbing"],stop:["stop-left","stop-right"]},fxName:["carousel","random","fade","move","rectMove","rectRun","rectSlice","rubyFade","rubyMove","rubyRun","rubyScale","zigzagRun"],name:null,dataSlider:"slider",dataSlide:"slide",dataLayer:"layer",layout:"line",fx:"carousel",height:"auto",imgWidth:"none",imgHeight:"none",img:"none",thumb:"none",timer:"none",current:"sl-cur",last:"sl-last",thumbWrap:"thumb",fitWidth:"fit-width",fitHeight:"fit-height",actived:"actived",inActived:"in-actived",easeTouch:"easeOutQuint",easeMove:"easeOutQuad",speed:400,layerSpeed:400,layerStart:400,heightSpeed:200,delay:8e3,slot:"auto",stepNav:"visible",stepPlay:1,responsive:null,media:null,mCanvas:0,hCanvas:null,wThumb:null,hThumb:null,idCur:0,preload:1,loadAmount:2,show:"all",showFrom:0,isNav:1,isPag:0,isPagNum:0,isPagWrap:1,isCap:0,isLayerRaUp:1,isSlideshow:0,isPlayPause:0,isHoverPause:0,isTouch:1,isDrag:1,isLoop:1,isAnimRebound:1,isKeyboard:0,isOverlay:0,isShadow:0,isViewGrabStop:0,arc:{width:null,height:null,update:30,rotate:0,radius:7,weight:2,stroke:"#fff",fill:"transparent",oRadius:6,oWeight:10,oStroke:"hsla(0,0%,0%,.2)",oFill:"transparent"},layoutFall:"line",fName:"sl",fLoop:1,isInOutBegin:0,isClassRandom:0,isSlAsPag:0},e.extend(jQuery.easing,{easeOutQuad:function(e,a,t,r,i){return-r*(a/=i)*(a-2)+t},easeOutQuint:function(e,a,t,r,i){return r*((a=a/i-1)*a*a*a*a+1)+t},easeInCubic:function(e,a,t,r,i){return r*(a/=i)*a*a+t},easeOutCubic:function(e,a,t,r,i){return r*((a=a/i-1)*a*a+1)+t}})}(jQuery);