/*!Extend detect.js*/
(function(e,a){var d=a.userAgent,c=e.browser,f={qq:/MQQBrowser\/([\d.]+)/i,uc:/UCBrowser\/([\d.]+)/i,baidu:/baidubrowser\/.*?([\d.]+)/i},b;e.each(f,function(g,h){if((b=d.match(h))){c[g]=true;c.version=b[1];return false}});if(!c.uc&&/Uc/i.test(a.appVersion)){c.uc=true}})(Zepto,navigator);
/*!Extend matchMedia.js*/
(function(a){a.matchMedia=(function(){var e=0,c="gmu-media-detect",b=a.fx.transitionEnd,f=a.fx.cssPrefix,d=a("<style></style>").append("."+c+"{"+f+"transition: width 0.001ms; width: 0; position: absolute; top: -10000px;}\n").appendTo("head");return function(i){var k=c+e++,j,h=[],g;d.append("@media "+i+" { #"+k+" { width: 1px; } }\n");if("matchMedia" in window){return window.matchMedia(i)}j=a('<div class="'+c+'" id="'+k+'"></div>').appendTo("body").on(b,function(){g.matches=j.width()===1;a.each(h,function(l,m){a.isFunction(m)&&m.call(g,g)})});g={matches:j.width()===1,media:i,addListener:function(l){h.push(l);return this},removeListener:function(m){var l=h.indexOf(m);~l&&h.splice(l,1);return this}};return g}}())})(Zepto);
/*!Extend event.ortchange.js*/
$(function(){$.mediaQuery={ortchange:"screen and (width: "+window.innerWidth+"px)"};$.matchMedia($.mediaQuery.ortchange).addListener(function(){$(window).trigger("ortchange")})});
/*!Extend throttle.js*/
(function(a){a.extend(a,{throttle:function(b,c,g){var e=0,d;if(typeof c!=="function"){g=c;c=b;b=250}function f(){var k=this,l=Date.now()-e,j=arguments;function i(){e=Date.now();c.apply(k,j)}function h(){d=undefined}if(g&&!d){i()}d&&clearTimeout(d);if(g===undefined&&l>b){i()}else{d=setTimeout(g?h:i,g===undefined?b-l:b)}}f._zid=c._zid=c._zid||a.proxy(c)._zid;return f},debounce:function(b,d,c){return d===undefined?a.throttle(250,b,false):a.throttle(b,d,c===undefined?false:c!==false)}})})(Zepto);
/*!Extend event.scrollStop.js*/
(function(c,d){function b(){c(d).on("scroll",c.debounce(80,function(){c(d).trigger("scrollStop")},false))}function a(){c(d).off("scroll");b()}b();c(d).on("pageshow",function(f){f.persisted&&c(d).off("touchstart",a).one("touchstart",a)})})(Zepto,window);
/*!Extend fix.js*/
(function(a,b){a.extend(a.fn,{fix:function(e){var d=this;if(d.attr("isFixed")){return d}d.css(e).css("position","fixed").attr("isFixed",true);var h=a('<div style="position:fixed;top:10px;"></div>').appendTo("body"),f=h[0].getBoundingClientRect().top,c=function(){if(window.pageYOffset>0){if(h[0].getBoundingClientRect().top!==f){d.css("position","absolute");g();a(window).on("scrollStop",g);a(window).on("ortchange",g)}a(window).off("scrollStop",c);h.remove()}},g=function(){d.css({top:window.pageYOffset+(e.bottom!==b?window.innerHeight-d.height()-e.bottom:(e.top||0)),left:e.right!==b?document.body.offsetWidth-d.width()-e.right:(e.left||0)});e.width=="100%"&&d.css("width",document.body.offsetWidth)};a(window).on("scrollStop",c);return d}})}(Zepto));
/*!Extend highlight.js*/
(function(c){var e=c(document),a,d;function b(){var f=a.attr("hl-cls");clearTimeout(d);a.removeClass(f).removeAttr("hl-cls");a=null;e.off("touchend touchmove touchcancel",b)}c.fn.highlight=function(g,f){return this.each(function(){var h=c(this);h.css("-webkit-tap-highlight-color","rgba(255,255,255,0)").off("touchstart.hl");g&&h.on("touchstart.hl",function(j){var i;a=f?(i=c(j.target).closest(f,this))&&i.length&&i:h;if(a){a.attr("hl-cls",g);d=setTimeout(function(){a.addClass(g)},100);e.on("touchend touchmove touchcancel",b)}})})}})(Zepto);
/*!Extend imglazyload.js*/
(function(b){var a=[];b.fn.imglazyload=function(c){var g=Array.prototype.splice,c=b.extend({threshold:0,container:window,urlName:"data-url",placeHolder:"",eventName:"scrollStop",innerScroll:false,isVertical:true},c),l=b(c.container),m=c.isVertical,f=b.isWindow(l.get(0)),h={win:[m?"scrollY":"scrollX",m?"innerHeight":"innerWidth"],img:[m?"top":"left",m?"height":"width"]},d=b(c.placeHolder).length?b(c.placeHolder):null,i=b(this).is("img");!f&&(h.win=h.img);function n(r){var q=f?window:l.offset(),o=q[h.win[0]],p=q[h.win[1]];return o>=r[h.img[0]]-c.threshold-p&&o<=r[h.img[0]]+r[h.img[1]]}a=Array.prototype.slice.call(b(a.reverse()).add(this),0).reverse();if(b.isFunction(b.fn.imglazyload.detect)){e();return this}function k(r){var p=b(r),o={},q=p;if(!i){b.each(p.get(0).attributes,function(){~this.name.indexOf("data-")&&(o[this.name]=this.value)});q=b("<img />").attr(o)}p.trigger("startload");q.on("load",function(){!i&&p.replaceWith(q);p.trigger("loadcomplete");q.off("load")}).on("error",function(){var s=b.Event("error");p.trigger(s);s.defaultPrevented||a.push(r);q.off("error").remove()}).attr("src",p.attr(c.urlName))}function j(){var o,p,q,r;for(o=a.length;o--;){p=b(r=a[o]);q=p.offset();n(q)&&(g.call(a,o,1),k(r))}}function e(){!i&&d&&b(a).append(d)}b(document).ready(function(){e();j()});!c.innerScroll&&b(window).on(c.eventName+" ortchange",function(){j()});b.fn.imglazyload.detect=j;return this}})(Zepto);
/*!Extend iscroll.js*/
/*
 * iScroll v4.2.2 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org
 * Released under MIT license, http://cubiq.org/license
 */
(function(h,E){var u=Math,o=[],l=E.createElement("div").style,z=(function(){var H="webkitT,MozT,msT,OT,t".split(","),G,F=0,m=H.length;for(;F<m;F++){G=H[F]+"ransform";if(G in l){return H[F].substr(0,H[F].length-1)}}return false})(),D=z?"-"+z.toLowerCase()+"-":"",k=s("transform"),x=s("transitionProperty"),j=s("transitionDuration"),n=s("transformOrigin"),B=s("transitionTimingFunction"),e=s("transitionDelay"),A=(/android/gi).test(navigator.appVersion),r=(/hp-tablet/gi).test(navigator.appVersion),i=s("perspective") in l,y="ontouchstart" in h&&!r,d=!!z,f=s("transition") in l,g="onorientationchange" in h?"orientationchange":"resize",b=y?"touchstart":"mousedown",t=y?"touchmove":"mousemove",c=y?"touchend":"mouseup",w=y?"touchcancel":"mouseup",a=(function(){if(z===false){return false}var m={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"otransitionend",ms:"MSTransitionEnd"};return m[z]})(),q=(function(){return h.requestAnimationFrame||h.webkitRequestAnimationFrame||h.mozRequestAnimationFrame||h.oRequestAnimationFrame||h.msRequestAnimationFrame||function(m){return setTimeout(m,1)}})(),p=(function(){return h.cancelRequestAnimationFrame||h.webkitCancelAnimationFrame||h.webkitCancelRequestAnimationFrame||h.mozCancelRequestAnimationFrame||h.oCancelRequestAnimationFrame||h.msCancelRequestAnimationFrame||clearTimeout})(),C=i?" translateZ(0)":"",v=function(G,m){var H=this,F;H.wrapper=typeof G=="object"?G:E.getElementById(G);H.wrapper.style.overflow="hidden";H.scroller=H.wrapper.children[0];H.translateZ=C;H.options={hScroll:true,vScroll:true,x:0,y:0,bounce:true,bounceLock:false,momentum:true,lockDirection:true,useTransform:true,useTransition:false,topOffset:0,checkDOMChanges:false,handleClick:true,onRefresh:null,onBeforeScrollStart:function(I){I.preventDefault()},onScrollStart:null,onBeforeScrollMove:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:null,onTouchEnd:null,onDestroy:null};for(F in m){H.options[F]=m[F]}H.x=H.options.x;H.y=H.options.y;H.options.useTransform=d&&H.options.useTransform;H.options.useTransition=f&&H.options.useTransition;H.scroller.style[x]=H.options.useTransform?D+"transform":"top left";H.scroller.style[j]="0";H.scroller.style[n]="0 0";if(H.options.useTransition){H.scroller.style[B]="cubic-bezier(0.33,0.66,0.66,1)"}if(H.options.useTransform){H.scroller.style[k]="translate("+H.x+"px,"+H.y+"px)"+C}else{H.scroller.style.cssText+=";position:absolute;top:"+H.y+"px;left:"+H.x+"px"}H.refresh();H._bind(g,h);H._bind(b);if(H.options.checkDOMChanges){H.checkDOMTime=setInterval(function(){H._checkDOMChanges()},500)}};v.prototype={enabled:true,x:0,y:0,steps:[],scale:1,currPageX:0,currPageY:0,pagesX:[],pagesY:[],aniTime:null,isStopScrollAction:false,handleEvent:function(F){var m=this;switch(F.type){case b:if(!y&&F.button!==0){return}m._start(F);break;case t:m._move(F);break;case c:case w:m._end(F);break;case g:m._resize();break;case a:m._transitionEnd(F);break}},_checkDOMChanges:function(){if(this.moved||this.animating||(this.scrollerW==this.scroller.offsetWidth*this.scale&&this.scrollerH==this.scroller.offsetHeight*this.scale)){return}this.refresh()},_resize:function(){var m=this;setTimeout(function(){m.refresh()},A?200:0)},_pos:function(m,F){m=this.hScroll?m:0;F=this.vScroll?F:0;if(this.options.useTransform){this.scroller.style[k]="translate("+m+"px,"+F+"px) scale("+this.scale+")"+C}else{m=u.round(m);F=u.round(F);this.scroller.style.left=m+"px";this.scroller.style.top=F+"px"}this.x=m;this.y=F},_start:function(K){var J=this,F=y?K.touches[0]:K,G,m,L,I,H;if(!J.enabled){return}if(J.options.onBeforeScrollStart){J.options.onBeforeScrollStart.call(J,K)}if(J.options.useTransition){J._transitionTime(0)}J.moved=false;J.animating=false;J.distX=0;J.distY=0;J.absDistX=0;J.absDistY=0;J.dirX=0;J.dirY=0;J.isStopScrollAction=false;if(J.options.momentum){if(J.options.useTransform){G=getComputedStyle(J.scroller,null)[k].replace(/[^0-9\-.,]/g,"").split(",");m=+G[4];L=+G[5]}else{m=+getComputedStyle(J.scroller,null).left.replace(/[^0-9-]/g,"");L=+getComputedStyle(J.scroller,null).top.replace(/[^0-9-]/g,"")}if(u.round(m)!=u.round(J.x)||u.round(L)!=u.round(J.y)){J.isStopScrollAction=true;if(J.options.useTransition){J._unbind(a)}else{p(J.aniTime)}J.steps=[];J._pos(m,L);if(J.options.onScrollEnd){J.options.onScrollEnd.call(J)}}}J.startX=J.x;J.startY=J.y;J.pointX=F.pageX;J.pointY=F.pageY;J.startTime=K.timeStamp||Date.now();if(J.options.onScrollStart){J.options.onScrollStart.call(J,K)}J._bind(t,h);J._bind(c,h);J._bind(w,h)},_move:function(K){var H=this,F=y?K.touches[0]:K,G=F.pageX-H.pointX,m=F.pageY-H.pointY,L=H.x+G,J=H.y+m,I=K.timeStamp||Date.now();if(H.options.onBeforeScrollMove){H.options.onBeforeScrollMove.call(H,K)}H.pointX=F.pageX;H.pointY=F.pageY;if(L>0||L<H.maxScrollX){L=H.options.bounce?H.x+(G/2):L>=0||H.maxScrollX>=0?0:H.maxScrollX}if(J>H.minScrollY||J<H.maxScrollY){J=H.options.bounce?H.y+(m/2):J>=H.minScrollY||H.maxScrollY>=0?H.minScrollY:H.maxScrollY}H.distX+=G;H.distY+=m;H.absDistX=u.abs(H.distX);H.absDistY=u.abs(H.distY);if(H.absDistX<6&&H.absDistY<6){return}if(H.options.lockDirection){if(H.absDistX>H.absDistY+5){J=H.y;m=0}else{if(H.absDistY>H.absDistX+5){L=H.x;G=0}}}H.moved=true;H._beforePos?H._beforePos(J,m)&&H._pos(L,J):H._pos(L,J);H.dirX=G>0?-1:G<0?1:0;H.dirY=m>0?-1:m<0?1:0;if(I-H.startTime>300){H.startTime=I;H.startX=H.x;H.startY=H.y}if(H.options.onScrollMove){H.options.onScrollMove.call(H,K)}},_end:function(K){if(y&&K.touches.length!==0){return}var I=this,O=y?K.changedTouches[0]:K,L,N,G={dist:0,time:0},m={dist:0,time:0},H=(K.timeStamp||Date.now())-I.startTime,M=I.x,J=I.y,F;I._unbind(t,h);I._unbind(c,h);I._unbind(w,h);if(I.options.onBeforeScrollEnd){I.options.onBeforeScrollEnd.call(I,K)}if(!I.moved){if(y&&this.options.handleClick&&!I.isStopScrollAction){I.doubleTapTimer=setTimeout(function(){I.doubleTapTimer=null;L=O.target;while(L.nodeType!=1){L=L.parentNode}if(L.tagName!="SELECT"&&L.tagName!="INPUT"&&L.tagName!="TEXTAREA"){N=E.createEvent("MouseEvents");N.initMouseEvent("click",true,true,K.view,1,O.screenX,O.screenY,O.clientX,O.clientY,K.ctrlKey,K.altKey,K.shiftKey,K.metaKey,0,null);N._fake=true;L.dispatchEvent(N)}},0)}I._resetPos(400);if(I.options.onTouchEnd){I.options.onTouchEnd.call(I,K)}return}if(H<300&&I.options.momentum){G=M?I._momentum(M-I.startX,H,-I.x,I.scrollerW-I.wrapperW+I.x,I.options.bounce?I.wrapperW:0):G;m=J?I._momentum(J-I.startY,H,-I.y,(I.maxScrollY<0?I.scrollerH-I.wrapperH+I.y-I.minScrollY:0),I.options.bounce?I.wrapperH:0):m;M=I.x+G.dist;J=I.y+m.dist;if((I.x>0&&M>0)||(I.x<I.maxScrollX&&M<I.maxScrollX)){G={dist:0,time:0}}if((I.y>I.minScrollY&&J>I.minScrollY)||(I.y<I.maxScrollY&&J<I.maxScrollY)){m={dist:0,time:0}}}if(G.dist||m.dist){F=u.max(u.max(G.time,m.time),10);I.scrollTo(u.round(M),u.round(J),F);if(I.options.onTouchEnd){I.options.onTouchEnd.call(I,K)}return}I._resetPos(200);if(I.options.onTouchEnd){I.options.onTouchEnd.call(I,K)}},_resetPos:function(G){var m=this,H=m.x>=0?0:m.x<m.maxScrollX?m.maxScrollX:m.x,F=m.y>=m.minScrollY||m.maxScrollY>0?m.minScrollY:m.y<m.maxScrollY?m.maxScrollY:m.y;if(H==m.x&&F==m.y){if(m.moved){m.moved=false;if(m.options.onScrollEnd){m.options.onScrollEnd.call(m)}if(m._afterPos){m._afterPos()}}return}m.scrollTo(H,F,G||0)},_transitionEnd:function(F){var m=this;if(F.target!=m.scroller){return}m._unbind(a);m._startAni()},_startAni:function(){var K=this,F=K.x,m=K.y,I=Date.now(),J,H,G;if(K.animating){return}if(!K.steps.length){K._resetPos(400);return}J=K.steps.shift();if(J.x==F&&J.y==m){J.time=0}K.animating=true;K.moved=true;if(K.options.useTransition){K._transitionTime(J.time);K._pos(J.x,J.y);K.animating=false;if(J.time){K._bind(a)}else{K._resetPos(0)}return}G=function(){var L=Date.now(),N,M;if(L>=I+J.time){K._pos(J.x,J.y);K.animating=false;if(K.options.onAnimationEnd){K.options.onAnimationEnd.call(K)}K._startAni();return}L=(L-I)/J.time-1;H=u.sqrt(1-L*L);N=(J.x-F)*H+F;M=(J.y-m)*H+m;K._pos(N,M);if(K.animating){K.aniTime=q(G)}};G()},_transitionTime:function(m){m+="ms";this.scroller.style[j]=m},_momentum:function(L,F,J,m,N){var K=0.0006,G=u.abs(L)*(this.options.speedScale||1)/F,H=(G*G)/(2*K),M=0,I=0;if(L>0&&H>J){I=N/(6/(H/G*K));J=J+I;G=G*J/H;H=J}else{if(L<0&&H>m){I=N/(6/(H/G*K));m=m+I;G=G*m/H;H=m}}H=H*(L<0?-1:1);M=G/K;return{dist:H,time:u.round(M)}},_offset:function(m){var G=-m.offsetLeft,F=-m.offsetTop;while(m=m.offsetParent){G-=m.offsetLeft;F-=m.offsetTop}if(m!=this.wrapper){G*=this.scale;F*=this.scale}return{left:G,top:F}},_bind:function(G,F,m){o.concat([F||this.scroller,G,this]);(F||this.scroller).addEventListener(G,this,!!m)},_unbind:function(G,F,m){(F||this.scroller).removeEventListener(G,this,!!m)},destroy:function(){var G=this;G.scroller.style[k]="";G._unbind(g,h);G._unbind(b);G._unbind(t,h);G._unbind(c,h);G._unbind(w,h);if(G.options.useTransition){G._unbind(a)}if(G.options.checkDOMChanges){clearInterval(G.checkDOMTime)}if(G.options.onDestroy){G.options.onDestroy.call(G)}for(var F=0,m=o.length;F<m;){o[F].removeEventListener(o[F+1],o[F+2]);o[F]=null;F=F+3}o=[]},refresh:function(){var m=this,F;m.wrapperW=m.wrapper.clientWidth||1;m.wrapperH=m.wrapper.clientHeight||1;m.minScrollY=-m.options.topOffset||0;m.scrollerW=u.round(m.scroller.offsetWidth*m.scale);m.scrollerH=u.round((m.scroller.offsetHeight+m.minScrollY)*m.scale);m.maxScrollX=m.wrapperW-m.scrollerW;m.maxScrollY=m.wrapperH-m.scrollerH+m.minScrollY;m.dirX=0;m.dirY=0;if(m.options.onRefresh){m.options.onRefresh.call(m)}m.hScroll=m.options.hScroll&&m.maxScrollX<0;m.vScroll=m.options.vScroll&&(!m.options.bounceLock&&!m.hScroll||m.scrollerH>m.wrapperH);F=m._offset(m.wrapper);m.wrapperOffsetLeft=-F.left;m.wrapperOffsetTop=-F.top;m.scroller.style[j]="0";m._resetPos(400)},scrollTo:function(m,L,K,J){var I=this,H=m,G,F;I.stop();if(!H.length){H=[{x:m,y:L,time:K,relative:J}]}for(G=0,F=H.length;G<F;G++){if(H[G].relative){H[G].x=I.x-H[G].x;H[G].y=I.y-H[G].y}I.steps.push({x:H[G].x,y:H[G].y,time:H[G].time||0})}I._startAni()},scrollToElement:function(m,G){var F=this,H;m=m.nodeType?m:F.scroller.querySelector(m);if(!m){return}H=F._offset(m);H.left+=F.wrapperOffsetLeft;H.top+=F.wrapperOffsetTop;H.left=H.left>0?0:H.left<F.maxScrollX?F.maxScrollX:H.left;H.top=H.top>F.minScrollY?F.minScrollY:H.top<F.maxScrollY?F.maxScrollY:H.top;G=G===undefined?u.max(u.abs(H.left)*2,u.abs(H.top)*2):G;F.scrollTo(H.left,H.top,G)},scrollToPage:function(G,F,I){var H=this,m,J;I=I===undefined?400:I;if(H.options.onScrollStart){H.options.onScrollStart.call(H)}m=-H.wrapperW*G;J=-H.wrapperH*F;if(m<H.maxScrollX){m=H.maxScrollX}if(J<H.maxScrollY){J=H.maxScrollY}H.scrollTo(m,J,I)},disable:function(){this.stop();this._resetPos(0);this.enabled=false;this._unbind(t,h);this._unbind(c,h);this._unbind(w,h)},enable:function(){this.enabled=true},stop:function(){if(this.options.useTransition){this._unbind(a)}else{p(this.aniTime)}this.steps=[];this.moved=false;this.animating=false},isReady:function(){return !this.moved&&!this.animating}};function s(m){if(z===""){return m}m=m.charAt(0).toUpperCase()+m.substr(1);return z+m}l=null;if(typeof exports!=="undefined"){exports.iScroll=v}else{h.iScroll=v}(function(H,F,K){if(!H){return}var G=F.iScroll,J=[].slice,m=(function(){var L={},N=0,M="_sid";return function(P,Q){var O=P[M]||(P[M]=++N);Q!==K&&(L[O]=Q);Q===null&&delete L[O];return L[O]}})(),I;F.iScroll=I=function(O,N){var M=[].slice.call(arguments,0),L=new G(O,N);m(O,L);return L};I.prototype=G.prototype;H.fn.iScroll=function(N){var M=J.call(arguments,1),P=typeof N==="string"&&N,L,O;H.each(this,function(Q,R){O=m(R)||I(R,H.isPlainObject(N)?N:K);if(P==="this"){L=O;return false}else{if(P){if(!H.isFunction(O[P])){throw new Error("iScroll\u6ca1\u6709\u6b64\u65b9\u6cd5\uff1a"+P)}L=O[P].apply(O,M);if(L!==K&&L!==O){return false}L=K}}});return L!==K?L:this}})(h.Zepto||null,h)})(window,document);
/*!Extend offset.js*/
(function(c){var b=c.fn.offset,a=Math.round;function d(e){return this.each(function(g){var h=c(this),i=c.isFunction(e)?e.call(this,g,h.offset()):e,f=h.css("position"),j=f==="absolute"||f==="fixed"||h.position();if(f==="relative"){j.top-=parseFloat(h.css("top"))||parseFloat(h.css("bottom"))*-1||0;j.left-=parseFloat(h.css("left"))||parseFloat(h.css("right"))*-1||0}parentOffset=h.offsetParent().offset(),props={top:a(i.top-(j.top||0)-parentOffset.top),left:a(i.left-(j.left||0)-parentOffset.left)};if(f=="static"){props.position="relative"}if(i.using){i.using.call(this,props,g)}else{h.css(props)}})}c.fn.offset=function(e){return e?d.call(this,e):b.call(this)}})(Zepto);
/*!Extend parseTpl.js*/
(function(a,b){a.parseTpl=function(f,e){var c="var __p=[];with(obj||{}){__p.push('"+f.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/<%=([\s\S]+?)%>/g,function(g,h){return"',"+h.replace(/\\'/,"'")+",'"}).replace(/<%([\s\S]+?)%>/g,function(g,h){return"');"+h.replace(/\\'/,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+'\');}return __p.join("");',d=new Function("obj",c);return e?d(e):d}})(Zepto);
/*!Extend position.js*/
(function(e,a){var g=e.fn.position,k=Math.round,c=/^(left|center|right)([\+\-]\d+%?)?$/,h=/^(top|center|bottom)([\+\-]\d+%?)?$/,b=/%$/;function i(n,m){return(parseInt(n,10)||0)*(b.test(n)?m/100:1)}function l(p,o,n,m){return[p[0]==="right"?n:p[0]==="center"?n/2:0,p[1]==="bottom"?m:p[1]==="center"?m/2:0,i(o[0],n),i(o[1],m)]}function f(n){var m=n[0],o=m.preventDefault;m=m.touches&&m.touches[0]||m;if(m.nodeType===9||m===window||o){return{width:o?0:n.width(),height:o?0:n.height(),top:m.pageYOffset||m.pageY||0,left:m.pageXOffset||m.pageX||0}}return n.offset()}function j(n){var m=e(n=(n||window)),o=f(m);n=m[0];return{$el:m,width:o.width,height:o.height,scrollLeft:n.pageXOffset||n.scrollLeft,scrollTop:n.pageYOffset||n.scrollTop}}function d(n,m){["my","at"].forEach(function(p){var r=(n[p]||"").split(" "),o=n[p]=["center","center"],q=m[p]=[0,0];r.length===1&&r[h.test(r[0])?"unshift":"push"]("center");c.test(r[0])&&(o[0]=RegExp.$1)&&(q[0]=RegExp.$2);h.test(r[1])&&(o[1]=RegExp.$1)&&(q[1]=RegExp.$2)})}e.fn.position=function(o){if(!o||!o.of){return g.call(this)}o=e.extend({},o);var r=e(o.of),t=o.collision,m=t&&j(o.within),q={},p=f(r),s={left:p.left,top:p.top},n;r[0].preventDefault&&(o.at="left top");d(o,q);n=l(o.at,q.at,p.width,p.height);s.left+=n[0]+n[2];s.top+=n[1]+n[3];return this.each(function(){var u=e(this),v=u.offset(),x=e.extend({},s),w=l(o.my,q.my,v.width,v.height);x.left=k(x.left+w[2]-w[0]);x.top=k(x.top+w[3]-w[1]);t&&t.call(this,x,{of:p,offset:v,my:o.my,at:o.at,within:m,$el:u});x.using=o.using;u.offset(x)})}})(Zepto);
/*!Extend support.js*/
(function(c,d){function a(){}var b=c.browser;c.support=c.extend(c.support||{},{orientation:!(b.uc||(parseFloat(c.os.version)<5&&(b.qq||b.chrome)))&&!(c.os.android&&parseFloat(c.os.version)>3)&&"orientation" in window&&"onorientationchange" in window,touch:"ontouchend" in document,cssTransitions:"WebKitTransitionEvent" in window,has3d:"WebKitCSSMatrix" in window&&"m11" in new WebKitCSSMatrix(),pushState:"pushState" in history&&"replaceState" in history,scrolling:"",requestAnimationFrame:"webkitRequestAnimationFrame" in window})})(Zepto);
/*!Extend touch.js*/
(function(i){var g={},b,k,h,e=750,a;function c(m){return"tagName" in m?m:m.parentNode}function j(n,m,p,o){var r=Math.abs(n-m),q=Math.abs(p-o);return r>=q?(n-m>0?"Left":"Right"):(p-o>0?"Up":"Down")}function l(){a=null;if(g.last){g.el.trigger("longTap");g={}}}function d(){if(a){clearTimeout(a)}a=null}function f(){if(b){clearTimeout(b)}if(k){clearTimeout(k)}if(h){clearTimeout(h)}if(a){clearTimeout(a)}b=k=h=a=null;g={}}i(document).ready(function(){var m,n;i(document.body).bind("touchstart",function(o){m=Date.now();n=m-(g.last||m);g.el=i(c(o.touches[0].target));b&&clearTimeout(b);g.x1=o.touches[0].pageX;g.y1=o.touches[0].pageY;if(n>0&&n<=250){g.isDoubleTap=true}g.last=m;a=setTimeout(l,e)}).bind("touchmove",function(o){d();g.x2=o.touches[0].pageX;g.y2=o.touches[0].pageY;if(Math.abs(g.x1-g.x2)>10){o.preventDefault()}}).bind("touchend",function(o){d();if((g.x2&&Math.abs(g.x1-g.x2)>30)||(g.y2&&Math.abs(g.y1-g.y2)>30)){h=setTimeout(function(){g.el.trigger("swipe");g.el.trigger("swipe"+(j(g.x1,g.x2,g.y1,g.y2)));g={}},0)}else{if("last" in g){k=setTimeout(function(){var p=i.Event("tap");p.cancelTouch=f;g.el.trigger(p);if(g.isDoubleTap){g.el.trigger("doubleTap");g={}}else{b=setTimeout(function(){b=null;g.el.trigger("singleTap");g={}},250)}},0)}}}).bind("touchcancel",f);i(window).bind("scroll",f)});["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(n){i.fn[n]=function(m){return this.bind(n,m)}})})(Zepto);
/*!Extend gmu.js*/
var gmu=gmu||{version:"@version",$:window.Zepto,staticCall:(function(c){var b=c.fn,d=[].slice,a=c();a.length=1;return function(f,e){a[0]=f;return b[e].apply(a,d.call(arguments,2))}})(Zepto)};
/*!Extend event.js*/
(function(e,f){var i=[].slice,g=/\s+/,a=function(){return false},d=function(){return true};function k(l,n,m){(l||"").split(g).forEach(function(o){m(o,n)})}function h(l){return new RegExp("(?:^| )"+l.replace(" "," .* ?")+"(?: |$)")}function c(l){var m=(""+l).split(".");return{e:m[0],ns:m.slice(1).sort().join(" ")}}function b(l,m,q,n){var p,o;o=c(m);o.ns&&(p=h(o.ns));return l.filter(function(r){return r&&(!o.e||r.e===o.e)&&(!o.ns||p.test(r.ns))&&(!q||r.cb===q||r.cb._cb===q)&&(!n||r.ctx===n)})}function j(m,l){if(!(this instanceof j)){return new j(m,l)}l&&f.extend(this,l);this.type=m;return this}j.prototype={isDefaultPrevented:a,isPropagationStopped:a,preventDefault:function(){this.isDefaultPrevented=d},stopPropagation:function(){this.isPropagationStopped=d}};e.event={on:function(l,p,m){var n=this,o;if(!p){return this}o=this._events||(this._events=[]);k(l,p,function(q,s){var r=c(q);r.cb=s;r.ctx=m;r.ctx2=m||n;r.id=o.length;o.push(r)});return this},one:function(l,o,m){var n=this;if(!o){return this}k(l,o,function(p,r){var q=function(){n.off(p,q);return r.apply(m||n,arguments)};q._cb=r;n.on(p,q,m)});return this},off:function(l,o,n){var m=this._events;if(!m){return this}if(!l&&!o&&!n){this._events=[];return this}k(l,o,function(p,q){b(m,p,q,n).forEach(function(r){delete m[r.id]})});return this},trigger:function(m){var q=-1,o,p,n,l,r;if(!this._events||!m){return this}typeof m==="string"&&(m=new j(m));o=i.call(arguments,1);m.args=o;o.unshift(m);p=b(this._events,m.type);if(p){l=p.length;while(++q<l){if((n=m.isPropagationStopped())||false===(r=p[q]).cb.apply(r.ctx2,o)){n||(m.stopPropagation(),m.preventDefault());break}}}return this}};e.Event=j})(gmu,gmu.$);
/*!Extend widget.js*/
(function(j,f,h){var m=[].slice,n=Object.prototype.toString,q=function(){},d=["options","template","tpl2html"],e=(function(){var t={},v=0,u="_gid";return function(z,y,A){var w=z[u]||(z[u]=++v),x=t[w]||(t[w]={});A!==h&&(x[y]=A);A===null&&delete x[y];return x[y]}})(),o=j.event;function i(t){return n.call(t)==="[object Object]"}function k(u,t){u&&Object.keys(u).forEach(function(v){t(v,u[v])})}function c(u){try{u=u==="true"?true:u==="false"?false:u==="null"?null:+u+""===u?+u:/(?:\{[\s\S]*\}|\[[\s\S]*\])$/.test(u)?JSON.parse(u):u}catch(t){u=h}return u}function g(x){var v={},u=x&&x.attributes,t=u&&u.length,w,y;while(t--){y=u[t];w=y.name;if(w.substring(0,5)!=="data-"){continue}w=w.substring(5);y=c(y.value);y===h||(v[w]=y)}return v}function l(u){var v=u.substring(0,1).toLowerCase()+u.substring(1),t=f.fn[v];f.fn[v]=function(y){var x=m.call(arguments,1),A=typeof y==="string"&&y,w,z;f.each(this,function(B,C){z=e(C,u)||new j[u](C,i(y)?y:h);if(A==="this"){w=z;return false}else{if(A){if(!f.isFunction(z[A])){throw new Error("\u7ec4\u4ef6\u6ca1\u6709\u6b64\u65b9\u6cd5\uff1a"+A)}w=z[A].apply(z,x);if(w!==h&&w!==z){return false}w=h}}});return w!==h?w:this};f.fn[v].noConflict=function(){f.fn[v]=t;return this}}function a(t,v){var u=this;if(t.superClass){a.call(u,t.superClass,v)}k(e(t,"options"),function(w,x){x.forEach(function(z){var A=z[0],y=z[1];if(A==="*"||(f.isFunction(A)&&A.call(u,v[w]))||A===v[w]){y.call(u)}})})}function s(t,v){var u=this;if(t.superClass){s.call(u,t.superClass,v)}k(e(t,"plugins"),function(w,x){if(v[w]===false){return}k(x,function(y,A){var z;if(f.isFunction(A)&&(z=u[y])){u[y]=function(){var B=u.origin,C;u.origin=z;C=A.apply(u,arguments);B===h?delete u.origin:(u.origin=B);return C}}else{u[y]=A}});x._init.call(u)})}function p(){var t=m.call(arguments),u=t.length,v;while(u--){v=v||t[u];i(t[u])||t.splice(u,1)}return t.length?f.extend.apply(null,[true,{}].concat(t)):v}function b(v,t,w,x,u){var z=this,y;if(i(x)){u=x;x=h}u&&u.el&&(x=f(u.el));x&&(z.$el=f(x),x=z.$el[0]);y=z._options=p(t.options,g(x),u);z.template=p(t.template,y.template);z.tpl2html=p(t.tpl2html,y.tpl2html);z.widgetName=v.toLowerCase();z.eventNs="."+z.widgetName+w;z._init(y);z._options.setup=(z.$el&&z.$el.parent()[0])?true:false;a.call(z,t,y);s.call(z,t,y);z._create();z.trigger("ready");x&&e(x,v,z)&&z.on("destroy",function(){e(x,v,null)});return z}function r(w,v,y){if(typeof y!=="function"){y=j.Base}var x=1,u=1;function t(A,z){if(w==="Base"){throw new Error("Base\u7c7b\u4e0d\u80fd\u76f4\u63a5\u5b9e\u4f8b\u5316")}if(!(this instanceof t)){return new t(A,z)}return b.call(this,w,t,x++,A,z)}f.extend(t,{register:function(A,B){var z=e(t,"plugins")||e(t,"plugins",{});B._init=B._init||q;z[A]=B;return t},option:function(A,B,C){var z=e(t,"options")||e(t,"options",{});z[A]||(z[A]=[]);z[A].push([B,C]);return t},inherits:function(z){return r(w+"Sub"+u++,z,t)},extend:function(B){var A=t.prototype,z=y.prototype;d.forEach(function(C){B[C]=p(y[C],B[C]);B[C]&&(t[C]=B[C]);delete B[C]});k(B,function(C,D){if(typeof D==="function"&&z[C]){A[C]=function(){var F=this.$super,E;this.$super=function(){var G=m.call(arguments,1);return z[C].apply(this,G)};E=D.apply(this,arguments);F===h?(delete this.$super):(this.$super=F);return E}}else{A[C]=D}})}});t.superClass=y;t.prototype=Object.create(y.prototype);t.extend(v);return t}j.define=function(u,t,v){j[u]=r(u,t,v);l(u)};j.isWidget=function(u,t){t=typeof t==="string"?j[t]||q:t;t=t||j.Base;return u instanceof t};j.Base=r("Base",{_init:q,_create:q,getEl:function(){return this.$el},on:o.on,one:o.one,off:o.off,trigger:function(v){var t=typeof v==="string"?new j.Event(v):v,u=[t].concat(m.call(arguments,1)),x=this._options[t.type],w=this.getEl();if(x&&f.isFunction(x)){false===x.apply(this,u)&&(t.stopPropagation(),t.preventDefault())}o.trigger.apply(this,u);w&&w.triggerHandler(t,(u.shift(),u));return this},tpl2html:function(v,u){var t=this.template;t=typeof v==="string"?t[v]:((u=v),t);return u||~t.indexOf("<%")?f.parseTpl(t,u):t},destroy:function(){this.$el&&this.$el.off(this.eventNs);this.trigger("destroy");this.off();this.destroyed=true}},Object);f.ui=j})(gmu,gmu.$);
/*!Widget slider/slider.js*/
(function(d,c,e){var f=c.fx.cssPrefix,a=c.fx.transitionEnd,b=" translateZ(0)";d.define("Slider",{options:{loop:false,speed:400,index:0,selector:{container:".ui-slider-group"}},template:{item:'<div class="ui-slider-item"><a href="<%= href %>"><img src="<%= pic %>" alt="" /></a><% if( title ) { %><p><%= title %></p><% } %></div>'},_create:function(){var i=this,g=i.getEl(),h=i._options;i.index=h.index;i._initDom(g,h);i._initWidth(g,i.index);i._container.on(a+i.eventNs,c.proxy(i._tansitionEnd,i));c(window).on("ortchange"+i.eventNs,function(){i._initWidth(g,i.index)})},_initDom:function(j,l){var g=l.selector,k=l.viewNum||1,i,h;h=j.find(g.container);if(!h.length){h=c("<div></div>");if(!l.content){if(j.is("ul")){this.$el=h.insertAfter(j);h=j;j=this.$el}else{h.append(j.children())}}else{this._createItems(h,l.content)}h.appendTo(j)}if((i=h.children()).length<k+1){l.loop=false}while(l.loop&&h.children().length<3*k){h.append(i.clone())}this.length=h.children().length;this._items=(this._container=h).addClass("ui-slider-group").children().addClass("ui-slider-item").toArray();this.trigger("done.dom",j.addClass("ui-slider"),l)},_createItems:function(h,j){var k=0,g=j.length;for(;k<g;k++){h.append(this.tpl2html("item",j[k]))}},_initWidth:function(h,g,k){var j=this,i;if(!k&&(i=h.width())===j.width){return}j.width=i;j._arrange(i,g);j.height=h.height();j.trigger("width.change")},_arrange:function(l,j){var h=this._items,k=0,m,g;this._slidePos=new Array(h.length);for(g=h.length;k<g;k++){m=h[k];m.style.cssText+="width:"+l+"px;left:"+(k*-l)+"px;";m.setAttribute("data-index",k);this._move(k,k<j?-l:k>j?l:0,0)}this._container.css("width",l*g)},_move:function(j,l,k,i){var g=this._slidePos,h=this._items;if(g[j]===l||!h[j]){return}this._translate(j,l,k);g[j]=l;i&&h[j].clientLeft},_translate:function(h,k,j){var g=this._items[h],i=g&&g.style;if(!i){return false}i.cssText+=f+"transition-duration:"+j+"ms;"+f+"transform: translate("+k+"px, 0)"+b+";"},_circle:function(i,h){var g;h=h||this._items;g=h.length;return(i%g+g)%h.length},_tansitionEnd:function(g){if(~~g.target.getAttribute("data-index")!==this.index){return}this.trigger("slideend",this.index)},_slide:function(n,l,g,h,k,j){var i=this,m;m=i._circle(n-g*l);if(!j.loop){g=Math.abs(n-m)/(n-m)}this._move(m,-g*h,0,true);this._move(n,h*g,k);this._move(m,0,k);this.index=m;return this.trigger("slide",m,n)},slideTo:function(m,k){if(this.index===m||this.index===this._circle(m)){return this}var j=this._options,h=this.index,l=Math.abs(h-m),g=l/(h-m),i=this.width;k=k||j.speed;return this._slide(h,l,g,i,k,j)},prev:function(){if(this._options.loop||this.index>0){this.slideTo(this.index-1)}return this},next:function(){if(this._options.loop||this.index+1<this.length){this.slideTo(this.index+1)}return this},getIndex:function(){return this.index},destroy:function(){this._container.off(this.eventNs);c(window).off("ortchange"+this.eventNs);return this.$super("destroy")}})})(gmu,gmu.$);
/*!Widget slider/$lazyloadimg.js*/
(function(a){a.Slider.template.item='<div class="ui-slider-item"><a href="<%= href %>"><img lazyload="<%= pic %>" alt="" /></a><% if( title ) { %><p><%= title %></p><% } %></div>';a.Slider.register("lazyloadimg",{_init:function(){this.on("ready slide",this._loadItems)},_loadItems:function(){var g=this._options,c=g.loop,f=g.viewNum||1,d=this.index,e,b;for(e=d-f,b=d+2*f;e<b;e++){this.loadImage(c?this._circle(e):e)}},loadImage:function(c){var d=this._items[c],b;if(!d||!(b=a.staticCall(d,"find","img[lazyload]"),b.length)){return this}b.each(function(){this.src=this.getAttribute("lazyload");this.removeAttribute("lazyload")})}})})(gmu);
/*!Widget slider/$dynamic.js*/
(function(b,a){b.Slider.options.edgeThrottle=0;b.Slider.register("dynamic",{_init:function(){var c=this;c.on("slideend",c._adjustPos);c.getEl().on("touchstart"+c.eventNs,function(){c._adjustPos()})},_create:function(){var d=this,c=d._options,e;if(!c.content||c.content.length<3){throw new Error("\u4ee5\u52a8\u6001\u6a21\u5f0f\u4f7f\u7528slider\uff0c\u81f3\u5c11\u9700\u8981\u4f20\u51653\u7ec4\u6570\u636e")}c.viewNum=1;c.loop=false;this._group=e=a('<div class="ui-slider-group"></div>');d._renderItems(c.content,c.index,e);e.appendTo(d.getEl());c.index=d.index;d.origin();d._adjustPos(true)},trigger:function(c,d){if(c==="slide"||c.type==="slide"){this._active=this._pool[d];this._flag=true}return this.origin.apply(this,arguments)},slideTo:function(e,d){var c=this.getIndex();if(Math.abs(e-c)!==1){return}this._adjustPos();return this.origin(e+this.index-c,d)},prev:function(){var c=this.getIndex();c>0&&this.slideTo(c-1);return this},next:function(){var c=this.getIndex();c<this._content.length-1&&this.slideTo(c+1);return this},_adjustPos:function(d,l){if(!d&&!this._flag){return}var i=this,c=i._options,h=i._content,k=i._group,g=a.inArray(i._active,h),j=i.index-1,f=g+j,m,e;if(j&&f<h.length&&f>=0){m=h[f];e=a(i.tpl2html("item",m));b.staticCall(i._items[1-j],"remove");k[j<0?"prepend":"append"](e);i.trigger("dom.change");i._pool.splice(1-j,1);i._pool[j<0?"unshift":"push"](m);i.index-=j;i._items=k.children().toArray();i._arrange(i.width,i.index)}if(!l&&(g===c.edgeThrottle||g===h.length-c.edgeThrottle-1)){i.trigger("edge",g===c.edgeThrottle,i._active)}i._flag=false;return i},_renderItems:function(f,d,g){var c=f.slice(d,d+(d>0?2:3)),e=3-c.length;this._content=f.concat();this._active=f[d];e&&(c=f.slice(d-e,d).concat(c));this.index=e;this._createItems(g,this._pool=c)},getIndex:function(){return a.inArray(this._active,this._content)},active:function(){return this._active},content:function(e){if(!a.isArray(e)){return this._content.concat()}var d=this,g=d._active,c=a.inArray(g,e),f=this._group.empty();~c||(c=0);d._renderItems(e,c,f);d._items=f.children().toArray();d._arrange(d.width,d.index);d._adjustPos(false,true);d.trigger("dom.change")}})})(gmu,gmu.$);
/*!Widget slider/$autoplay.js*/
(function(b,a){a.extend(true,b.Slider,{options:{autoPlay:true,interval:4000}});b.Slider.register("autoplay",{_init:function(){var c=this;c.on("slideend ready",c.resume).on("destory",c.stop);c.getEl().on("touchstart"+c.eventNs,a.proxy(c.stop,c)).on("touchend"+c.eventNs,a.proxy(c.resume,c))},resume:function(){var d=this,c=d._options;if(c.autoPlay&&!d._timer){d._timer=setTimeout(function(){d.slideTo(d.index+1);d._timer=null},c.interval)}return d},stop:function(){var c=this;if(c._timer){clearTimeout(c._timer);c._timer=null}return c}})})(gmu,gmu.$);
/*!Widget slider/$multiview.js*/
(function(b,a,c){a.extend(b.Slider.options,{viewNum:2,travelSize:2});b.Slider.register("multiview",{_arrange:function(d,g){var h=this._items,m=this._options.viewNum,k=g%m,e=0,j=this.perWidth=Math.ceil(d/m),l,f;this._slidePos=new Array(h.length);for(f=h.length;e<f;e++){l=h[e];l.style.cssText+="width:"+j+"px;left:"+(e*-j)+"px;";l.setAttribute("data-index",e);e%m===k&&this._move(e,e<g?-d:e>g?d:0,0,Math.min(m,f-e))}this._container.css("width",j*f)},_move:function(f,l,k,e,j){var d=this.perWidth,h=this._options,g=0;j=j||h.viewNum;for(;g<j;g++){this.origin(h.loop?this._circle(f+g):f+g,l+g*d,k,e)}},_slide:function(m,n,g,e,f,d,i){var k=this,o=d.viewNum,j=this._items.length,h,l;d.loop||(n=Math.min(n,g>0?m:j-o-m));l=k._circle(m-g*n);d.loop||(g=Math.abs(m-l)/(m-l));n%=j;if(j-n<o){n=j-n;g=-1*g}h=Math.max(0,o-n);if(!i){this._move(l,-g*this.perWidth*Math.min(n,o),0,true);this._move(m+h*g,h*g*this.perWidth,0,true)}this._move(m+h*g,e*g,f);this._move(l,0,f);this.index=l;return this.trigger("slide",l,m)},prev:function(){var e=this._options,d=e.travelSize;if(e.loop||(this.index>0,d=Math.min(this.index,d))){this.slideTo(this.index-d)}return this},next:function(){var f=this._options,e=f.travelSize,d=f.viewNum;if(f.loop||(this.index+d<this.length&&(e=Math.min(this.length-1-this.index,e)))){this.slideTo(this.index+e)}return this}})})(gmu,gmu.$);
/*!Widget slider/$touch.js*/
(function(c,b,e){var d={touchstart:"_onStart",touchmove:"_onMove",touchend:"_onEnd",touchcancel:"_onEnd",click:"_onClick"},h,g,f,a;b.extend(c.Slider.options,{stopPropagation:false,disableScroll:false});c.Slider.register("touch",{_init:function(){var j=this,i=j.getEl();j._handler=function(k){j._options.stopPropagation&&k.stopPropagation();return d[k.type]&&j[d[k.type]].call(j,k)};j.on("ready",function(){i.on("touchstart"+j.eventNs,j._handler);j._container.on("click"+j.eventNs,j._handler)})},_onClick:function(){return !a},_onStart:function(m){if(m.touches.length>1){return false}var l=this,n=m.touches[0],k=l._options,i=l.eventNs,j;g={x:n.pageX,y:n.pageY,time:+new Date()};f={};a=false;h=e;j=k.viewNum||1;l._move(k.loop?l._circle(l.index-j):l.index-j,-l.width,0,true);l._move(k.loop?l._circle(l.index+j):l.index+j,l.width,0,true);l.$el.on("touchmove"+i+" touchend"+i+" touchcancel"+i,l._handler)},_onMove:function(o){if(o.touches.length>1||o.scale&&o.scale!==1){return false}var j=this._options,r=j.viewNum||1,k=o.touches[0],m=this.index,l,n,p,q;j.disableScroll&&o.preventDefault();f.x=k.pageX-g.x;f.y=k.pageY-g.y;if(typeof h==="undefined"){h=Math.abs(f.x)<Math.abs(f.y)}if(!h){o.preventDefault();if(!j.loop){f.x/=(!m&&f.x>0||m===this._items.length-1&&f.x<0)?(Math.abs(f.x)/this.width+1):1}q=this._slidePos;for(l=m-r,n=m+2*r;l<n;l++){p=j.loop?this._circle(l):l;this._translate(p,f.x+q[p],0)}a=true}},_onEnd:function(){this.$el.off("touchmove"+this.eventNs+" touchend"+this.eventNs+" touchcancel"+this.eventNs,this._handler);if(!a){return}var s=this,j=s._options,w=j.viewNum||1,r=s.index,v=s._slidePos,o=+new Date()-g.time,n=Math.abs(f.x),k=!j.loop&&(!r&&f.x>0||r===v.length-w&&f.x<0),m=f.x>0?1:-1,l,u,p,q,t;if(o<250){l=n/o;u=Math.min(Math.round(l*w*1.2),w)}else{u=Math.round(n/(s.perWidth||s.width))}if(u&&!k){s._slide(r,u,m,s.width,j.speed,j,true);if(w>1&&o>=250&&Math.ceil(n/s.perWidth)!==u){s.index<r?s._move(s.index-1,-s.perWidth,j.speed):s._move(s.index+w,s.width,j.speed)}}else{for(p=r-w,q=r+2*w;p<q;p++){t=j.loop?s._circle(p):p;s._translate(t,v[t],j.speed)}}}})})(gmu,gmu.$);
/*!Widget slider/imgzoom.js*/
(function(a){a.Slider.options.imgZoom=true;a.Slider.option("imgZoom",function(){return !!this._options.imgZoom},function(){var e=this,b=e._options.imgZoom,c;b=typeof b==="string"?b:"img";function d(){c&&c.off("load"+e.eventNs,f)}function g(){d();c=e._container.find(b).on("load"+e.eventNs,f)}function f(i){var h=i.target||this,j=Math.min(1,e.width/h.naturalWidth,e.height/h.naturalHeight);h.style.width=j*h.naturalWidth+"px"}e.on("ready dom.change",g);e.on("width.change",function(){c&&c.each(f)});e.on("destroy",d)})})(gmu);
/*!Widget slider/dots.js*/
(function(b,a,c){a.extend(true,b.Slider,{template:{dots:'<p class="ui-slider-dots"><%= new Array( len + 1 ).join("<b></b>") %></p>'},options:{dots:true,selector:{dots:".ui-slider-dots"}}});b.Slider.option("dots",true,function(){var d=function(g,f){var e=this._dots;typeof f==="undefined"||b.staticCall(e[f%this.length],"removeClass","ui-state-active");b.staticCall(e[g%this.length],"addClass","ui-state-active")};this.on("done.dom",function(h,f,g){var i=f.find(g.selector.dots);if(!i.length){i=this.tpl2html("dots",{len:this.length});i=a(i).appendTo(f)}this._dots=i.children().toArray()});this.on("slide",function(f,h,g){d.call(this,h,g)});this.on("ready",function(){d.call(this,this.index)})})})(gmu,gmu.$);
/*!Widget slider/arrow.js*/
(function(b,a,c){a.extend(true,b.Slider,{template:{prev:'<span class="ui-slider-pre"></span>',next:'<span class="ui-slider-next"></span>'},options:{arrow:true,select:{prev:".ui-slider-pre",next:".ui-slider-next"}}});b.Slider.option("arrow",true,function(){var e=this,d=["prev","next"];this.on("done.dom",function(i,g,h){var f=h.selector;d.forEach(function(j){var k=g.find(f[j]);k.length||g.append(k=a(e.tpl2html(j)));e["_"+j]=k})});this.on("ready",function(){d.forEach(function(f){e["_"+f].on("tap"+e.eventNs,function(){e[f].call(e)})})});this.on("destroy",function(){e._prev.off(e.eventNs);e._next.off(e.eventNs)})})})(gmu,gmu.$);
/*!Widget refresh/refresh.js*/
(function(b,a,c){b.define("Refresh",{options:{load:null,statechange:null},_init:function(){var e=this,d=e._options;e.on("ready",function(){a.each(["up","down"],function(h,g){var f=d["$"+g+"Elem"],j=f.get(0);if(f.length){e._status(g,true);if(!j.childNodes.length||(f.find(".ui-refresh-icon").length&&f.find(".ui-refresh-label").length)){!j.childNodes.length&&e._createBtn(g);d.refreshInfo||(d.refreshInfo={});d.refreshInfo[g]={$icon:f.find(".ui-refresh-icon"),$label:f.find(".ui-refresh-label"),text:f.find(".ui-refresh-label").html()}}f.on("click",function(){if(!e._status(g)||d._actDir){return}e._setStyle(g,"loading");e._loadingAction(g,"click")})}})});e.on("destroy",function(){e.$el.remove()})},_create:function(){var f=this,e=f._options,d=f.$el;if(f._options.setup){e.$upElem=d.find(".ui-refresh-up");e.$downElem=d.find(".ui-refresh-down");d.addClass("ui-refresh")}},_createBtn:function(d){this._options["$"+d+"Elem"].html('<span class="ui-refresh-icon"></span><span class="ui-refresh-label">\u52a0\u8f7d\u66f4\u591a</span>');return this},_setStyle:function(e,g){var f=this,d=a.Event("statechange");f.trigger(d,f._options["$"+e+"Elem"],g,e);if(d.defaultPrevented){return f}return f._changeStyle(e,g)},_changeStyle:function(d,g){var e=this._options,f=e.refreshInfo[d];switch(g){case"loaded":f["$label"].html(f.text);f["$icon"].removeClass();e._actDir="";break;case"loading":f["$label"].html("\u52a0\u8f7d\u4e2d...");f["$icon"].addClass("ui-loading");e._actDir=d;break;case"disable":f["$label"].html("\u6ca1\u6709\u66f4\u591a\u5185\u5bb9\u4e86");break}return this},_loadingAction:function(d,e){var g=this,f=g._options,h=f.load;a.isFunction(h)&&h.call(g,d,e);g._status(d,false);return g},afterDataLoading:function(d){var e=this,d=d||e._options._actDir;e._setStyle(d,"loaded");e._status(d,true);return e},_status:function(e,d){var f=this._options;return d===c?f["_"+e+"Open"]:f["_"+e+"Open"]=!!d},_setable:function(e,d,f){var h=this,g=h._options,i=d?[d]:["up","down"];a.each(i,function(l,k){var j=g["$"+k+"Elem"];if(!j.length){return}e?j.show():(f?j.hide():h._setStyle(k,"disable"));h._status(k,e)});return h},disable:function(d,e){return this._setable(false,d,e)},enable:function(d){return this._setable(true,d)}})})(gmu,gmu.$);
/*!Widget refresh/$lite.js*/
(function(b,a,c){b.Refresh.register("lite",{_init:function(){var f=this,e=f._options,d=f.$el;e.seamless&&a(document).on("scrollStop",a.proxy(f._eventHandler,f));d.on("touchstart touchmove touchend touchcancel",a.proxy(f._eventHandler,f));e.wrapperH=d.height();e.wrapperTop=d.offset().top;e._win=window;e._body=document.body;return f},_changeStyle:function(d,g){var e=this,f=e._options.refreshInfo[d];if(g=="beforeload"){f["$icon"].removeClass("ui-loading");f["$label"].html("\u677e\u5f00\u7acb\u5373\u52a0\u8f7d")}return e.origin(d,g)},_startHandler:function(d){this._options._startY=d.touches[0].pageY},_moveHandler:function(j){var i=this,h=i._options,f=h._startY,k=f-j.touches[0].pageY,g=h._win.innerHeight,d=h.threshold||(h.wrapperH<g?(h.wrapperH/2+h.wrapperTop||0):g/2);if(!i._status("down")||k<0){return}if(!h._refreshing&&(f>=h._body.scrollHeight-g+d)&&k>10){i._setStyle("down","beforeload");h._refreshing=true}return i},_endHandler:function(){var e=this,d=e._options;e._setStyle("down","loading");e._loadingAction("down","pull");d._refreshing=false;return e},_eventHandler:function(g){var f=this,d=f._options;switch(g.type){case"touchstart":f._startHandler(g);break;case"touchmove":clearTimeout(d._endTimer);d._endTimer=setTimeout(function(){f._endHandler()},300);f._moveHandler(g);break;case"touchend":case"touchcancel":clearTimeout(d._endTimer);d._refreshing&&f._endHandler();break;case"scrollStop":(!d._refreshing&&d._win.pageYOffset>=d._body.scrollHeight-d._win.innerHeight+(d.threshold||-1))&&f._endHandler();break}return f}})})(gmu,gmu.$);
/*!Widget refresh/$iscroll.js*/
(function(b,a,c){b.Refresh.register("iscroll",{_init:function(){var g=this,f=g._options,d=g.$el,e=d.height();a.extend(f,{useTransition:true,speedScale:1,topOffset:f["$upElem"]?f["$upElem"].height():0});f.threshold=f.threshold||5;d.wrapAll(a('<div class="ui-refresh-wrapper"></div>').height(e)).css("height","auto");g.on("ready",function(){g._loadIscroll()})},_changeStyle:function(d,h){var f=this,e=f._options,g=e.refreshInfo[d];f.origin(d,h);switch(h){case"loaded":g["$icon"].addClass("ui-refresh-icon");break;case"beforeload":g["$label"].html("\u677e\u5f00\u7acb\u5373\u52a0\u8f7d");g["$icon"].addClass("ui-refresh-flip");break;case"loading":g["$icon"].removeClass().addClass("ui-loading");break}return f},_loadIscroll:function(){var f=this,e=f._options,d=e.threshold;e.iScroll=new iScroll(f.$el.parent().get(0),e.iScrollOpts=a.extend({useTransition:e.useTransition,speedScale:e.speedScale,topOffset:e.topOffset},e.iScrollOpts,{onScrollStart:function(g){f.trigger("scrollstart",g)},onScrollMove:(function(){var g=e.$upElem&&e.$upElem.length,h=e.$downElem&&e.$downElem.length;return function(m){var i=e._upRefreshed,j=e._downRefreshed,l=f._status("up"),k=f._status("down");if(g&&!l||h&&!k||this.maxScrollY>=0){return}if(k&&h&&!j&&this.y<(this.maxScrollY-d)){f._setMoveState("down","beforeload","pull")}else{if(l&&g&&!i&&this.y>d){f._setMoveState("up","beforeload","pull");this.minScrollY=0}else{if(k&&j&&this.y>(this.maxScrollY+d)){f._setMoveState("down","loaded","restore")}else{if(l&&i&&this.y<d){f._setMoveState("up","loaded","restore");this.minScrollY=-e.topOffset}}}}f.trigger("scrollmove",m)}})(),onScrollEnd:function(h){var g=e._actDir;if(g&&f._status(g)){f._setStyle(g,"loading");f._loadingAction(g,"pull")}f.trigger("scrollend",h)}}))},_setMoveState:function(d,h,g){var f=this,e=f._options;f._setStyle(d,h);e["_"+d+"Refreshed"]=g=="pull";e._actDir=g=="pull"?d:"";return f},afterDataLoading:function(d){var f=this,e=f._options,d=d||e._actDir;e.iScroll.refresh();e["_"+d+"Refreshed"]=false;return f.origin(d)}})})(gmu,gmu.$);
/*!Widget refresh/$iOS5.js*/
(function(b,a,c){b.Refresh.register("iOS5",{_init:function(){var f=this,e=f._options,d=f.$el;d.css({overflow:"scroll","-webkit-overflow-scrolling":"touch"});e.topOffset=e["$upElem"]?e["$upElem"].height():0;e.iScroll=f._getiScroll();d.get(0).scrollTop=e.topOffset;d.on("touchstart touchmove touchend",a.proxy(f._eventHandler,f))},_changeStyle:function(d,h){var f=this,e=f._options,g=e.refreshInfo[d];f.origin(d,h);switch(h){case"loaded":g["$icon"].addClass("ui-refresh-icon");e._actDir="";break;case"beforeload":g["$label"].html("\u677e\u5f00\u7acb\u5373\u52a0\u8f7d");g["$icon"].addClass("ui-refresh-flip");break;case"loading":g["$icon"].removeClass().addClass("ui-loading");break}return f},_scrollStart:function(i){var h=this,g=h._options,f=g.topOffset,d=g.$upElem,k=h.$el.get(0),j=function(){clearTimeout(g.topOffsetTimer);if(d&&d.length&&k.scrollTop<=f&&!g._upRefreshed){k.scrollTop=f}};h.trigger("scrollstart",i);h._enableScroll()._bindScrollStop(k,j);g.maxScrollY=k.offsetHeight-k.scrollHeight;g._scrollFn=j;return h},_scrollMove:function(){var g=this,f=g._options,e=f.$upElem&&f.$upElem.length,i=f.$downElem&&f.$downElem.length,h=g.$el.get(0),d=f.threshold||5;g._scrollMove=function(q){var m=f.maxScrollY,p=h.scrollTop,j=f.lastMoveY||p,k=f._upRefreshed,l=f._downRefreshed,o=g._status("up"),n=g._status("down");if(e&&!o||i&&!n){return}f.iScroll.deltaY=p-j;if(n&&i&&!l&&-p<(m-d)){g._setMoveState("down","beforeload","pull")}else{if(n&&i&&l&&-p>(m-d)&&-p!==m){g._setMoveState("down","loaded","restore")}else{if(o&&e&&!k&&-p>d){g._setMoveState("up","beforeload","pull")}else{if(o&&e&&k&&-p<d&&p){g._setMoveState("up","loaded","restore")}}}}f.lastMoveY=p;f._moved=true;return g.trigger("scrollmove",q,p,p-j)};g._scrollMove.apply(g,arguments)},_scrollEnd:function(j){var g=this,f=g._options,k=g.$el.get(0),d=f.topOffset,h=f._actDir,i=f._restoreDir;if((i=="up"||k.scrollTop<=d)&&!h&&f._moved){g._options.topOffsetTimer=setTimeout(function(){a(k).off("scroll",f._scrollFn);k.scrollTop=d},800)}if(h&&g._status(h)){g._setStyle(h,"loading");g._loadingAction(h,"pull")}f._moved=false;return g.trigger("scrollend",j)},_enableScroll:function(){var d=this,f=d.$el.get(0),e=f.scrollTop;e<=0&&(f.scrollTop=1);if(e+f.offsetHeight>=f.scrollHeight){f.scrollTop=f.scrollHeight-f.offsetHeight-1}return d},_bindScrollStop:function(g,e){var f=this,d=a(g);d.off("scroll",f._options._scrollFn).on("scroll",a.debounce(100,function(){d.off("scroll",arguments.callee).one("scroll",e)},false));return f},_getiScroll:function(){var d=this,e=d.$el,f=e[0];return{el:f,deltaY:0,scrollTo:function(i,h,g){if(g){i=f.scrollTop+i}e.css({"-webkit-transition-property":"scrollTop","-webkit-transition-duration":i+"ms"});f.scrollTop=i},disable:function(g){g&&d.destroy();e.css("overflow","hidden")},enable:function(){e.css("overflow","scroll")}}},_setMoveState:function(d,h,g){var f=this,e=f._options;f._setStyle(d,h);e["_"+d+"Refreshed"]=g=="pull";e._actDir=g=="pull"?d:"";e._restoreDir=d=="up"&&g=="restore"?d:"";return f},_eventHandler:function(f){var d=this;switch(f.type){case"touchstart":d._scrollStart(f);break;case"touchmove":d._scrollMove(f);break;case"touchend":d._scrollEnd(f);break}},afterDataLoading:function(d){var f=this,e=f._options,d=d||e._actDir;e["_"+d+"Refreshed"]=false;d=="up"&&(f.$el.get(0).scrollTop=e.topOffset);return f.origin(d)}})})(gmu,gmu.$);
/*!Widget suggestion/suggestion.js*/
(function(b,c){var a=0;gmu.define("Suggestion",{options:{historyShare:true,confirmClearHistory:true,autoClose:false},template:{wrapper:'<div class="ui-suggestion"><div class="ui-suggestion-content"></div><div class="ui-suggestion-button"><span class="ui-suggestion-clear">\u6e05\u9664\u5386\u53f2\u8bb0\u5f55</span><span class="ui-suggestion-close">\u5173\u95ed</span></div></div>'},_initDom:function(){var d=this,f=d.getEl().attr("autocomplete","off"),e=f.parent(".ui-suggestion-mask");e.length?d.$mask=e:f.wrap(d.$mask=b('<div class="ui-suggestion-mask"></div>'));d.$mask.append(d.tpl2html("wrapper"));d.$wrapper=d.$mask.find(".ui-suggestion").prop("id","ui-suggestion-"+(a++));d.$content=d.$wrapper.css("top",f.height()+(d.wrapperTop=parseInt(d.$wrapper.css("top"),10)||0)).find(".ui-suggestion-content");d.$btn=d.$wrapper.find(".ui-suggestion-button");d.$clearBtn=d.$btn.find(".ui-suggestion-clear");d.$closeBtn=d.$btn.find(".ui-suggestion-close");return d.trigger("initdom")},_bindEvent:function(){var f=this,d=f.getEl(),e=f.eventNs;f._options.autoClose&&b(document).on("tap"+e,function(g){!b.contains(f.$mask.get(0),g.target)&&f.hide()});d.on("focus"+e,function(){!f.isShow&&f._showList().trigger("open")});d.on("input"+e,function(){f._showList()});f.$clearBtn.on("click"+e,function(){f.history(null)}).highlight("ui-suggestion-highlight");f.$closeBtn.on("click"+e,function(){f.getEl().blur();f.hide().trigger("close")}).highlight("ui-suggestion-highlight");return f},_create:function(){var f=this,e=f._options,d=e.historyShare;e.container&&(f.$el=b(e.container));f.key=d?((b.type(d)==="boolean"?"":d+"-")+"SUG-Sharing-History"):f.getEl().attr("id")||("ui-suggestion-"+(a++));f.separator=encodeURIComponent(",");f._initDom()._bindEvent();return f},_showList:function(){var d=this,f=d.value(),e;if(f){d.trigger("sendrequest",f,b.proxy(d._render,d),b.proxy(d._cacheData,d))}else{(e=d._localStorage())?d._render(f,e.split(d.separator)):d.hide()}return d},_render:function(e,d){this.trigger("renderlist",d,e,b.proxy(this._fillWrapper,this))},_fillWrapper:function(d){this.$clearBtn[this.value()?"hide":"show"]();d?(this.$content.html(d),this.show()):this.hide();return this},_localStorage:function(i){var g=this,f=g.key,j=g.separator,d,h;try{d=c.localStorage;if(i===undefined){return d[f]}else{if(i===null){d[f]=""}else{if(i){h=d[f]?d[f].split(j):[];if(!~b.inArray(i,h)){h.unshift(i);d[f]=h.join(j)}}}}}catch(e){console.log(e.message)}return g},_cacheData:function(d,e){this.cacheData||(this.cacheData={});return e!==undefined?this.cacheData[d]=e:this.cacheData[d]},value:function(){return this.getEl().val()},history:function(e){var d=this,f=e!==null||function(){return d._localStorage(null).hide()};return e===null?(d._options.confirmClearHistory?c.confirm("\u6e05\u9664\u5168\u90e8\u67e5\u8be2\u5386\u53f2\u8bb0\u5f55\uff1f")&&f():f()):d._localStorage(e)},show:function(){if(!this.isShow){this.$wrapper.show();this.isShow=true;return this.trigger("show")}else{return this}},hide:function(){if(this.isShow){this.$wrapper.hide();this.isShow=false;return this.trigger("hide")}else{return this}},destroy:function(){var f=this,d=f.getEl(),e=f.ns;f.trigger("destroy");d.off(e);f.$mask.replaceWith(d);f.$clearBtn.off(e);f.$closeBtn.off(e);f.$wrapper.children().off().remove();f.$wrapper.remove();f._options.autoClose&&b(document).off(e);this.destroyed=true;return f}})})(gmu.$,window);
/*!Widget suggestion/compatdata.js*/
(function(a,b){gmu.Suggestion.options.compatdata=true;gmu.Suggestion.option("compatdata",true,function(){this.on("ready",function(){var d=this.key,c="SUG-History-DATATRANS",h,f;try{h=b.localStorage[d];if(h&&!b.localStorage[c]){b.localStorage[c]="\u001e";f=h.split(",");b.localStorage[d]=f.join(this.separator)}}catch(g){console.log(g.message)}})})})(gmu.$,window);
/*!Widget suggestion/$iscroll.js*/
(function(b,a){b.Suggestion.register("iscroll",{_init:function(){var c=this;c.on("ready",function(){c.$scroller=a('<div class="ui-suggestion-scroller"></div>');c.$content.wrapInner(c.$scroller).iScroll({hScroll:false,onRefresh:function(){this.y&&this.scrollTo(0,0)}});c.on("destroy",function(){c.$content.iScroll("destroy")})});return c},_fillWrapper:function(c){this.$clearBtn[this.value()?"hide":"show"]();if(c){this.show().$scroller.html(c);this.$content.iScroll("refresh")}else{this.hide()}return this}})})(gmu,gmu.$);
/*!Widget suggestion/renderlist.js*/
(function(a){a.extend(gmu.Suggestion.options,{isHistory:true,usePlus:false,listCount:5,renderlist:null});gmu.Suggestion.option("renderlist",function(){return a.type(this._options.renderlist)!=="function"},function(){var d=this,b=a("<div></div>"),c=function(f){return b.text(f).html()},e=function(m,h){var l=d._options,k=[],n="",g,f,j;if(!h||!h.length){d.hide();return k}h=h.slice(0,l.listCount);m=c(m||"");for(j=0,f=h.length;j<f;j++){n=c(g=h[j]);m&&(n=a.trim(g).replace(m,"<span>"+m+"</span>"));l.usePlus&&(n+='<div class="ui-suggestion-plus" data-item="'+g+'"></div>');k.push("<li>"+n+"</li>")}return k};d.on("ready",function(){var h=this,g=h.eventNs,f=a(h._options.form||h.getEl().closest("form"));f.size()&&(h.$form=f.on("submit"+g,function(j){var i=gmu.Event("submit");h._options.isHistory&&h._localStorage(h.value());h.trigger(i);i.isDefaultPrevented()&&j.preventDefault()}));h.$content.on("touchstart"+g,function(i){i.preventDefault()});h.$content.on("tap"+g,function(j){var k=h.getEl(),i=a(j.target);if(i.hasClass("ui-suggestion-plus")){k.val(i.attr("data-item"))}else{if(a.contains(h.$content.get(0),i.get(0))){setTimeout(function(){k.val(i.text());h.trigger("select",i).hide().$form.submit()},400)}}}).highlight("ui-suggestion-highlight");h.on("destroy",function(){f.size()&&f.off(g);h.$content.off()})});d.on("renderlist",function(i,h,g,j){var f=e(g,h);return j(f.length?"<ul>"+f.join(" ")+"</ul>":"")})})})(gmu.$);
/*!Widget suggestion/sendrequest.js*/
(function(a,b){a.extend(gmu.Suggestion.options,{isCache:true,queryKey:"wd",cbKey:"cb",sendrequest:null});gmu.Suggestion.option("sendrequest",function(){return a.type(this._options.sendrequest)!=="function"},function(){var g=this,f=g._options,e=f.queryKey,c=f.cbKey,i=f.param,d=f.isCache,h;this.on("sendrequest",function(n,m,o,k){var l=f.source,j="suggestion_"+(+new Date());if(d&&(h=k(m))){o(m,h);return g}l=(l+"&"+e+"="+encodeURIComponent(m)).replace(/[&?]{1,2}/,"?");!~l.indexOf("&"+c)&&(l+="&"+c+"="+j);i&&(l+="&"+i);b[j]=function(p){o(m,p.s);d&&k(m,p.s);delete b[j]};a.ajax({url:l,dataType:"jsonp"});return g})})})(gmu.$,window);
/*!Widget suggestion/$quickdelete.js*/
(function(b,a){b.Suggestion.register("quickdelete",{_init:function(){var d=this,e,c;d.on("ready",function(){e=d.getEl();c=d.eventNs;d.$mask.append(d.$quickDel=a('<div class="ui-suggestion-quickdel"></div>'));e.on("focus"+c+" input"+c,function(){d["_quickDel"+(a.trim(e.val())?"Show":"Hide")]()});e.on("blur"+c,function(){d._quickDelHide()});d.$quickDel.on("touchstart"+c,function(f){f.preventDefault();f.formDelete=true;e.val("");d.trigger("delete").trigger("input")._quickDelHide();e.blur().focus()});d.on("destroy",function(){d.$quickDel.off().remove()})})},_quickDelShow:function(){if(!this.quickDelShow){b.staticCall(this.$quickDel.get(0),"css","visibility","visible");this.quickDelShow=true}},_quickDelHide:function(){if(this.quickDelShow){b.staticCall(this.$quickDel.get(0),"css","visibility","hidden");this.quickDelShow=false}}})})(gmu,gmu.$);
/*!Widget suggestion/$posadapt.js*/
(function(b,c){var a=Array.prototype.reverse;gmu.Suggestion.options.listSelector="li";gmu.Suggestion.register("posadapt",{_init:function(){var e=this,d;e.on("show ortchange",function(){if(e._checkPos()){e.$wrapper.css("top",-e.$wrapper.height()-e.wrapperTop);a.call(d=e.$content.find(e._options.listSelector));d.appendTo(d.parent());e.$btn.prependTo(e.$wrapper)}})},_checkPos:function(){var e=this._options.height||66,d=this.getEl().offset().top-c.pageYOffset;return b(c).height()-d<e&&d>=e}})})(gmu.$,window);
/*!Widget tabs/tabs.js*/
(function(e,d,f){var b=1,a=function(){return b++},c=/^#(.+)$/;e.define("Tabs",{options:{active:0,items:null,transition:"slide"},template:{nav:'<ul class="ui-tabs-nav"><% var item; for(var i=0, length=items.length; i<length; i++) { item=items[i]; %><li<% if(i==active){ %> class="ui-state-active"<% } %>><a href="javascript:;"><%=item.title%></a></li><% } %></ul>',content:'<div class="ui-viewport ui-tabs-content"><% var item; for(var i=0, length=items.length; i<length; i++) { item=items[i]; %><div<% if(item.id){ %> id="<%=item.id%>"<% } %> class="ui-tabs-panel <%=transition%><% if(i==active){ %> ui-state-active<% } %>"><%=item.content%></div><% } %></div>'},_init:function(){var j=this,i=j._options,h,g=d.proxy(j._eventHandler,j);j.on("ready",function(){h=j.$el;h.addClass("ui-tabs");i._nav.on("tap",g).children().highlight("ui-state-hover")});d(window).on("ortchange",g)},_create:function(){var h=this,g=h._options;if(h._options.setup&&h.$el.children().length>0){h._prepareDom("setup",g)}else{g.setup=false;h.$el=h.$el||d("<div></div>");h._prepareDom("create",g)}},_prepareDom:function(j,n){var m=this,k,o=m.$el,l,g,i,h;switch(j){case"setup":n._nav=m._findElement("ul").first();if(n._nav){n._content=m._findElement("div.ui-tabs-content");n._content=((n._content&&n._content.first())||d("<div></div>").appendTo(o)).addClass("ui-viewport ui-tabs-content");l=[];n._nav.addClass("ui-tabs-nav").children().each(function(){var r=m._findElement("a",this),p=r?r.attr("href"):d(this).attr("data-url"),s,q;s=c.test(p)?RegExp.$1:"tabs_"+a();(q=m._findElement("#"+s)||d('<div id="'+s+'"></div>')).addClass("ui-tabs-panel"+(n.transition?" "+n.transition:"")).appendTo(n._content);l.push({id:s,href:p,title:r?r.attr("href","javascript:;").text():d(this).text(),content:q})});n.items=l;n.active=Math.max(0,Math.min(l.length-1,n.active||d(".ui-state-active",n._nav).index()||0));m._getPanel().add(n._nav.children().eq(n.active)).addClass("ui-state-active");break}default:l=n.items=n.items||[];g=[];i=[];n.active=Math.max(0,Math.min(l.length-1,n.active));d.each(l,function(p,q){h="tabs_"+a();g.push({href:q.href||"#"+h,title:q.title});i.push({content:q.content||"",id:h});l[p].id=h});n._nav=d(this.tpl2html("nav",{items:g,active:n.active})).prependTo(o);n._content=d(this.tpl2html("content",{items:i,active:n.active,transition:n.transition})).appendTo(o);n.container=n.container||(o.parent().length?null:"body")}n.container&&o.appendTo(n.container);m._fitToContent(m._getPanel())},_getPanel:function(g){var h=this._options;return d("#"+h.items[g===f?h.active:g].id)},_findElement:function(g,i){var h=d(i||this.$el).find(g);return h.length?h:null},_eventHandler:function(i){var g,h=this._options;switch(i.type){case"ortchange":this.refresh();break;default:if((g=d(i.target).closest("li",h._nav.get(0)))&&g.length){i.preventDefault();this.switchTo(g.index())}}},_fitToContent:function(i){var h=this._options,g=h._content;h._plus===f&&(h._plus=parseFloat(g.css("border-top-width"))+parseFloat(g.css("border-bottom-width")));g.height(i.height()+h._plus);return this},switchTo:function(g){var j=this,k=j._options,i=k.items,n,l,m,h,o;if(!k._buzy&&k.active!=(g=Math.max(0,Math.min(i.length-1,g)))){l=d.extend({},i[g]);l.div=j._getPanel(g);l.index=g;m=d.extend({},i[k.active]);m.div=j._getPanel();m.index=k.active;n=e.Event("beforeActivate");j.trigger(n,l,m);if(n.isDefaultPrevented()){return j}k._content.children().removeClass("ui-state-active");l.div.addClass("ui-state-active");k._nav.children().removeClass("ui-state-active").eq(l.index).addClass("ui-state-active");if(k.transition){k._buzy=true;o=d.fx.animationEnd+".tabs";h=g>k.active?"":" reverse";k._content.addClass("ui-viewport-transitioning");m.div.addClass("out"+h);l.div.addClass("in"+h).on(o,function(p){if(p.target!=p.currentTarget){return}l.div.off(o,arguments.callee);k._buzy=false;m.div.removeClass("out reverse");l.div.removeClass("in reverse");k._content.removeClass("ui-viewport-transitioning");j.trigger("animateComplete",l,m);j._fitToContent(l.div)})}k.active=g;j.trigger("activate",l,m);k.transition||j._fitToContent(l.div)}return j},refresh:function(){return this._fitToContent(this._getPanel())},destroy:function(){var h=this._options,g=this._eventHandler;h._nav.off("tap",g).children().highlight();h.swipe&&h._content.off("swipeLeft swipeRight",g);if(!h.setup){this.$el.remove()}return this.$super("destroy")}})})(gmu,gmu.$);
/*!Widget tabs/$swipe.js*/
(function(c,b){var i=1000,e=30,h=70,g=30,f=[],d=false,j=function(l){for(var k=f.length;k--;){if(c.contains(f[k],l)){return true}}return false};function a(){c(document).on("touchstart.tabs",function(m){var k=m.touches?m.touches[0]:m,n,l;n={x:k.clientX,y:k.clientY,time:Date.now(),el:c(m.target)};c(document).on("touchmove.tabs",function(q){var o=q.touches?q.touches[0]:q,p;if(!n){return}l={x:o.clientX,y:o.clientY,time:Date.now()};if((p=Math.abs(n.x-l.x))>g||p>Math.abs(n.y-l.y)){j(q.target)&&q.preventDefault()}else{c(document).off("touchmove.tabs touchend.tabs")}}).one("touchend.tabs",function(){c(document).off("touchmove.tabs");if(n&&l){if(l.time-n.time<i&&Math.abs(n.x-l.x)>e&&Math.abs(n.y-l.y)<h){n.el.trigger(n.x>l.x?"tabsSwipeLeft":"tabsSwipeRight")}}n=l=b})})}gmu.Tabs.register("swipe",{_init:function(){var k=this._options;this.on("ready",function(){f.push(k._content.get(0));d=d||(a(),true);this.$el.on("tabsSwipeLeft tabsSwipeRight",c.proxy(this._eventHandler,this))})},_eventHandler:function(n){var m=this._options,k,l;switch(n.type){case"tabsSwipeLeft":case"tabsSwipeRight":k=m.items;if(n.type=="tabsSwipeLeft"&&m.active<k.length-1){l=m.active+1}else{if(n.type=="tabsSwipeRight"&&m.active>0){l=m.active-1}}l!==b&&(n.stopPropagation(),this.switchTo(l));break;default:return this.origin(n)}},destroy:function(){var l=this._options,k;~(k=c.inArray(l._content.get(0),f))&&f.splice(k,1);this.$el.off("tabsSwipeLeft tabsSwipeRight",this._eventHandler);f.length||(c(document).off("touchstart.tabs"),d=false);return this.origin()}})})(Zepto);
/*!Widget tabs/$ajax.js*/
(function(d,e){var c=/^#.+$/,b={},a={loading:'<div class="ui-loading">Loading</div>',error:'<p class="ui-load-error">\u5185\u5bb9\u52a0\u8f7d\u5931\u8d25!</p>'};gmu.Tabs.register("ajax",{_init:function(){var h=this._options,f,g,j;this.on("ready",function(){f=h.items;for(g=0,j=f.length;g<j;g++){f[g].href&&!c.test(f[g].href)&&(f[g].isAjax=true)}this.on("activate",this._onActivate);f[h.active].isAjax&&this.load(h.active)})},destroy:function(){this.off("activate",this._onActivate);this.xhr&&this.xhr.abort();return this.origin()},_fitToContent:function(g){var f=this._options;if(!f._fitLock){return this.origin(g)}},_onActivate:function(f,g){g.isAjax&&this.load(g.index)},load:function(h,l){var k=this,i=k._options,g=i.items,j,m,f;if(h<0||h>g.length-1||!(j=g[h])||!j.isAjax||((m=k._getPanel(h)).text()&&!l&&b[h])){return this}(f=k.xhr)&&setTimeout(function(){f.abort()},400);i._loadingTimer=setTimeout(function(){m.html(a.loading)},50);i._fitLock=true;k.xhr=d.ajax(d.extend(i.ajax||{},{url:j.href,context:k.$el.get(0),beforeSend:function(p,n){var o=gmu.Event("beforeLoad");k.trigger(o,p,n);if(o.isDefaultPrevented()){return false}},success:function(n,p){var o=gmu.Event("beforeRender");clearTimeout(i._loadingTimer);k.trigger(o,n,m,h,p);if(!o.isDefaultPrevented()){m.html(n)}i._fitLock=false;b[h]=true;k.trigger("load",m);delete k.xhr;k._fitToContent(m)},error:function(){var n=gmu.Event("loadError");clearTimeout(i._loadingTimer);b[h]=false;k.trigger(n,m);if(!n.isDefaultPrevented()){m.html(a.error)}delete k.xhr}}))}})})(Zepto);
/*!Widget toolbar/toolbar.js*/
(function(b,a){b.define("Toolbar",{options:{container:document.body,title:"\u6807\u9898",leftBtns:[],rightBtns:[],fixed:false},_init:function(){var e=this,d=e._options,c;if(!d.container){d.container=document.body}e.on("ready",function(){c=e.$el;if(d.fixed){var i=a('<div class="ui-toolbar-placeholder"></div>').height(c.offset().height).insertBefore(c).append(c).append(c.clone().css({"z-index":1,position:"absolute",top:0})),h=c.offset().top,f=function(){document.body.scrollTop>h?c.css({position:"fixed",top:0}):c.css("position","absolute")},g;a(window).on("touchmove touchend touchcancel scroll scrollStop",f);a(document).on("touchend touchcancel",g=function(){setTimeout(function(){f()},200)});e.on("destroy",function(){a(window).off("touchmove touchend touchcancel scroll scrollStop",f);a(document).off("touchend touchcancel",g);c.insertBefore(i);i.remove();e._removeDom()});f()}});e.on("destroy",function(){e._removeDom()})},_create:function(){var g=this,c=g._options,k=g.getEl(),d=a(c.container),e=[],h=g.btnGroups={left:[],right:[]},j=h.left;if(!c.setup){(k&&k.length>0)?k.appendTo(d):(k=g.$el=a("<div>").appendTo(d))}e=k.children();$toolbarWrap=k.find(".ui-toolbar-wrap");if($toolbarWrap.length===0){$toolbarWrap=a('<div class="ui-toolbar-wrap"></div>').appendTo(k)}else{e=$toolbarWrap.children()}e.forEach(function(l){$toolbarWrap.append(l);/^[hH]/.test(l.tagName)?(j=h.right,g.title=l):j.push(l)});var i=$toolbarWrap.find(".ui-toolbar-left");var f=$toolbarWrap.find(".ui-toolbar-right");if(i.length===0){i=e.length?a('<div class="ui-toolbar-left">').insertBefore(e[0]):a('<div class="ui-toolbar-left">').appendTo($toolbarWrap);h.left.forEach(function(l){a(l).addClass("ui-toolbar-button");i.append(l)});f=a('<div class="ui-toolbar-right">').appendTo($toolbarWrap);h.right.forEach(function(l){a(l).addClass("ui-toolbar-button");f.append(l)})}k.addClass("ui-toolbar");a(g.title).length?a(g.title).addClass("ui-toolbar-title"):a('<h1 class="ui-toolbar-title">'+c.title+"</h1>").insertAfter(i);g.btnContainer={left:i,right:f};g.addBtns("left",c.leftBtns);g.addBtns("right",c.rightBtns)},_addBtn:function(c,d){var e=this;a(d).appendTo(c).addClass("ui-toolbar-button")},addBtns:function(c,f){var e=this,d=e.btnContainer[c],g=Object.prototype.toString;if(g.call(c)!="[object String]"){f=c;d=e.btnContainer.right}f.forEach(function(i,h){if(i instanceof b.Base){i=i.getEl()}e._addBtn(d,i)});return e},show:function(){var c=this;c.$el.show();c.trigger("show");c.isShowing=true;return c},hide:function(){var c=this;c.$el.hide();c.trigger("hide");c.isShowing=false;return c},toggle:function(){var c=this;c.isShowing===false?c.show():c.hide();return c},_removeDom:function(){var d=this,c=d.$el;if(d._options.setup===false){c.remove()}else{c.css("position","static").css("top","auto")}}})})(gmu,gmu.$);
/*!Widget toolbar/$position.js*/
(function(b,a){b.Toolbar.register("position",{position:function(c){this.$el.fix(c);return this}})})(gmu,gmu.$);
/*!Widget progressbar/progressbar.js*/
(function(b,a,c){b.define("Progressbar",{options:{initValue:0,horizontal:true,transitionDuration:300,_isShow:true,_current:0,_percent:0},_init:function(){var h=this,f,g,i,d,e;h.on("ready",function(){f=h.$el,g=a.proxy(h._eventHandler,h),i=f.find(".ui-progressbar-button"),d=f.find(".ui-progressbar-bg"),e=f.offset();i.on("touchstart touchmove touchend touchcancel",g);d.on("touchstart",g);a.extend(h._options,{_button:i[0],$_background:d,_filled:f.find(".ui-progressbar-filled")[0],_width:e.width,_height:e.height});h._options.horizontal&&e.width&&f.width(e.width);h._options.initValue>0&&h.value(h._options.initValue)});h.on("destroy",function(){if(!h._options.setup){h.$el.remove()}})},_create:function(){var d=this,e=d._options.horizontal?"h":"v";if(!d.$el){d.$el=a("<div></div>")}d.$el.addClass("ui-progressbar-"+e).appendTo(d._options.container||(d.$el.parent().length?"":document.body)).html(('<div class="ui-progressbar-bg"><div class="ui-progressbar-filled"></div><div class="ui-progressbar-button"><div><b></b></div></div></div>'))},_eventHandler:function(f){var d=this;switch(f.type){case"touchmove":d._touchMove(f);break;case"touchstart":a(f.target).hasClass("ui-progressbar-bg")?d._click(f):d._touchStart(f);break;case"touchcancel":case"touchend":d._touchEnd();break;case"tap":d._click(f);break}},_touchStart:function(g){var f=this,d=f._options;a.extend(f._options,{pageX:g.touches[0].pageX,pageY:g.touches[0].pageY,S:false,T:false,X:0,Y:0});d._button.style.webkitTransitionDuration="0ms";d._filled.style.webkitTransitionDuration="0ms";a(d._button).addClass("ui-progressbar-button-pressed");f.trigger("dragStart")},_touchMove:function(i){var h=this,g=h._options,l=i.touches[0],k=l.pageX-g.pageX,j=l.pageY-g.pageY,d;if(!g.T){var f=Math.abs(k)<Math.abs(l.pageY-g.pageY);g.T=true;g.S=f}if(g.horizontal){if(!g.S){i.stopPropagation();i.preventDefault();d=(k+g._current)/g._width*100;if(d<=100&&d>=0){g._percent=d;g.X=k;g._button.style.webkitTransform="translate3d("+(g.X+g._current)+"px,0,0)";g._filled.style.width=d+"%";h.trigger("valueChange")}h.trigger("dragMove")}}else{if(g.S){i.stopPropagation();i.preventDefault();d=-(g._current+j)/g._height*100;if(d<=100&&d>=0){g._percent=d;g.Y=j;g._button.style.webkitTransform="translate3d(0,"+(j+g._current)+"px,0)";g._filled.style.cssText+="height:"+d+"%;top:"+(g._height+j+g._current)+"px";h.trigger("valueChange")}h.trigger("dragMove")}}},_touchEnd:function(){var e=this,d=e._options;d._current+=d.horizontal?d.X:d.Y;a(d._button).removeClass("ui-progressbar-button-pressed");e.trigger("dragEnd")},_click:function(h){var g=this,f=g._options,d=f.$_background.offset(),i=h.touches[0];f.horizontal?g.value((i.pageX-d.left)/f._width*100):g.value((f._height-i.pageY+d.top)/f._height*100)},value:function(g){var f=this,e=f._options,d,h;if(g===c){return e._percent}else{g=parseFloat(g);if(isNaN(g)){return f}g=g>100?100:g<0?0:g;e._percent=g;h=";-webkit-transition-duration:"+e.transitionDuration+"ms";if(e.horizontal){d=e._current=e._width*g/100;e._button.style.cssText+="-webkit-transform:translate3d("+d+"px,0,0)"+h;e._filled.style.cssText+="width:"+g+"%"+h}else{d=e._current=e._height*g/-100;e._button.style.cssText+="-webkit-transform:translate3d(0,"+d+"px,0)"+h;e._filled.style.cssText+="height:"+g+"%;top:"+(e._height+d)+"px"+h}f.trigger("valueChange");return f}},show:function(){var d=this;if(!d._options._isShow){d.$el.css("display","block");d._options._isShow=true}return d},hide:function(){var d=this;if(d._options._isShow){d.$el.css("display","none");d._options._isShow=false}return d}})})(gmu,gmu.$);
/*!Widget popover/popover.js*/
(function(b,a,c){b.define("Popover",{options:{container:null,content:null,event:"click"},template:{frame:"<div>"},_create:function(){var f=this,e=f._options,d=e.target&&a(e.target)||f.getEl(),g=e.container&&a(e.container);g&&g.length||(g=a(f.tpl2html("frame")).addClass("ui-mark-temp"));f.$root=g;e.content&&f.setContent(e.content);f.trigger("done.dom",g.addClass("ui-"+f.widgetName),e);g.parent().length||d.after(g);f.target(d)},_checkTemp:function(d){d.is(".ui-mark-temp")&&d.off(this.eventNs)&&d.remove()},show:function(){var e=this,d=b.Event("beforeshow");e.trigger(d);if(d.isDefaultPrevented()){return}e.trigger("placement",e.$root.addClass("ui-in"),e.$target);e._visible=true;return e.trigger("show")},hide:function(){var e=this,d=new b.Event("beforehide");e.trigger(d);if(d.isDefaultPrevented()){return}e.$root.removeClass("ui-in");e._visible=false;return e.trigger("hide")},toggle:function(){var d=this;return d[d._visible?"hide":"show"].apply(d,arguments)},target:function(e){if(e===c){return this.$target}var g=this,d=a(e),h=g.$target,f=g._options.event+g.eventNs;h&&h.off(f);g.$target=d.on(f,function(i){i.preventDefault();g.toggle()});return g},setContent:function(e){var d=this.$root;d.empty().append(e);return this},destroy:function(){var d=this;d.$target.off(d.eventNs);d._checkTemp(d.$root);return d.$super("destroy")}})})(gmu,gmu.$);
/*!Widget popover/placement.js*/
(function(b,a){a.extend(b.Popover.options,{placement:"bottom",offset:null});b.Popover.option("placement",function(c){return ~["top","bottom","left","right"].indexOf(c)},function(){var f=this,d={top:"center top center bottom",right:"right center left center",bottom:"center bottom center top",left:"left center right center"},c={},g;a.each(d,function(j,i){i=i.split(/\s/g);i.unshift(j);c[j]=function(){return e.apply(null,i)}});function h(j,i){return j==="right"||j==="bottom"?i:j==="center"?i/2:0}function e(p,m,r,k,o){var q=g.of,l=g.coord,j=g.offset,n=q.top,i=q.left;i+=h(m,q.width)-h(k,l.width);n+=h(r,q.height)-h(o,l.height);j=typeof j==="function"?j.call(null,{left:i,top:n},p):j||{};return{left:i+(j.left||0),top:n+(j.top||0)}}this.on("placement",function(n,j,m){var l=this,k=l._options,i=k.placement,o;g={coord:j.offset(),of:m.offset(),placement:i,$el:j,$of:m,offset:k.offset};o=c[i]();l.trigger("before.placement",o,g,c);g.preset&&(g.placement=g.preset);j.offset(o);l.trigger("after.placement",o,g)});a(window).on("ortchange",function(){f._visible&&f.trigger("placement",f.$target,f.$root)})})})(gmu,gmu.$);
/*!Widget popover/arrow.js*/
(function(b){var a=b.Popover;a.template.arrow='<span class="ui-arrow"></span>';a.options.arrow=true;a.option("arrow",true,function(){var d=this,c=d._options;c.offset=c.offset||function(f,e){e=e.split("_")[0];return{left:(e==="left"?-1:e==="right"?1:0)*15,top:(e==="top"?-1:e==="bottom"?1:0)*15}};d.on("done.dom",function(g,f){f.append(d.tpl2html("arrow")).addClass("ui-pos-default")});d.on("after.placement",function(j,l,i){var g=this.$root[0],f=g.className,h=i.placement,k=i.align||"";g.className=f.replace(/(?:\s|^)ui-pos-[^\s$]+/g,"")+" ui-pos-"+h+(k?"-"+k:"")})})})(gmu);
/*!Widget popover/collision.js*/
(function(b,a){b.Popover.options.collision=true;b.Popover.option("collision",true,function(){var d=this,c=d._options;function f(g){var h=a(g);g=h[0];if(g!==window&&g.nodeType!==9){return h.offset()}return{width:h.width(),height:h.height(),top:g.pageYOffset||g.scrollTop||0,left:g.pageXOffset||g.scrollLeft||0}}function e(j,i,g,h){return j.left>=h.left&&j.left+i<=h.left+h.width&&j.top>=h.top&&j.top+g<=h.top+h.height}d.on("before.placement",function(m,l,h,k){var j=f(c.within||window),g=h.placement,p=h.coord,n=Object.keys(k),o=n.indexOf(g)+1,i=n.splice(o,n.length-o);n=i.concat(n);while(n.length&&!e(l,p.width,p.height,j)){g=n.shift();a.extend(l,k[g]())}h.preset=g})})})(gmu,gmu.$);
/*!Widget popover/dismissible.js*/
(function(c,b){var a=c.Popover;a.options.dismissible=true;a.option("dismissible",true,function(){var f=this,g=b(document),e="click"+f.eventNs;function d(k){var j=f.$target.add(f.$root).get(),h=j.length;while(h--){if(j[h]===k||b.contains(j[h],k)){return true}}return false}f.on("show",function(){g.off(e).on(e,function(h){d(h.target)||f.hide()})});f.on("hide",function(){g.off(e)})})})(gmu,gmu.$);
/*!Widget dropmenu/dropmenu.js*/
(function(b,a){b.define("Dropmenu",{options:{content:null},template:{item:'<li><a <% if ( href ) { %>href="<%= href %>"<% } %>><% if ( icon ) { %><span class="ui-icon ui-icon-<%= icon %>"></span><% } %><%= text %></a></li>',divider:'<li class="divider"></li>',wrap:"<ul>"},_init:function(){var c=this;c.on("done.dom",function(f,d){c.$list=d.find("ul").first().addClass("ui-dropmenu-items").highlight("ui-state-hover",".ui-dropmenu-items>li:not(.divider)")})},_create:function(){var e=this,d=e._options,c="";if(a.type(d.content)==="array"){d.content.forEach(function(f){f=a.extend({href:"",icon:"",text:""},typeof f==="string"?{text:f}:f);c+=e.tpl2html(f.text==="divider"?"divider":"item",f)});d.content=a(e.tpl2html("wrap")).append(c)}e.$super("_create");e.$list.on("click"+e.eventNs,".ui-dropmenu-items>li:not(.ui-state-disable):not(.divider)",function(g){var f=b.Event("itemclick",g);e.trigger(f,this);if(f.isDefaultPrevented()){return}e.hide()})}},b.Popover)})(gmu,gmu.$);
/*!Widget dropmenu/horizontal.js*/
(function(a){a.Dropmenu.options.horizontal=true;a.Dropmenu.option("horizontal",true,function(){var b=this;b.on("done.dom",function(d,c){c.addClass("ui-horizontal")})})})(gmu,gmu.$);
/*!Widget dropmenu/placement.js*/
(function(b,a){a.extend(b.Dropmenu.options,{placement:"bottom",align:"center",offset:null});b.Dropmenu.option("placement",function(c){return ~["top","bottom"].indexOf(c)},function(){var d={top_center:"center top center bottom",top_left:"left top left bottom",top_right:"right top right bottom",bottom_center:"center bottom center top",bottom_right:"right bottom right top",bottom_left:"left bottom left top"},c={},f;a.each(d,function(i,h){h=h.split(/\s/g);h.unshift(i);c[i]=function(){return e.apply(null,h)}});function g(i,h){return i==="right"||i==="bottom"?h:i==="center"?h/2:0}function e(o,l,q,j,n){var p=f.of,k=f.coord,i=f.offset,m=p.top,h=p.left;h+=g(l,p.width)-g(j,k.width);m+=g(q,p.height)-g(n,k.height);i=typeof i==="function"?i.call(null,{left:h,top:m},o):i||{};return{left:h+(i.left||0),top:m+(i.top||0)}}this.on("placement",function(m,i,l){var k=this,j=k._options,h=j.placement,o=j.align,n;f={coord:i.offset(),of:l.offset(),placement:h,align:o,$el:i,$of:l,offset:j.offset};n=c[h+"_"+o]();k.trigger("before.placement",n,f,c);if(/^(\w+)_(\w+)$/.test(f.preset)){f.placement=RegExp.$1;f.align=RegExp.$2}i.offset(n);k.trigger("after.placement",n,f)})})})(gmu,gmu.$);
/*!Widget gotop/gotop.js*/
(function(b,a,c){b.define("Gotop",{options:{container:"",useFix:true,useHide:true,useAnimation:false,position:{bottom:10,right:10},afterScroll:null},_init:function(){var g=this,e,d=g._options,f;g.on("ready",function(){e=g.$el;f=a.proxy(g._eventHandler,g);d.useHide&&a(document).on("touchmove",f);a(window).on("touchend touchcancel scrollStop",f);a(window).on("scroll ortchange",f);e.on("click",f);g.on("destroy",function(){a(window).off("touchend touchcancel scrollStop",f);a(document).off("touchmove",f);a(window).off("scroll ortchange",f)});d.useFix&&e.fix(d.position);d.root=e[0]});g.on("destroy",function(){g.$el.remove()})},_create:function(){var d=this;if(!d.$el){d.$el=a("<div></div>")}d.$el.addClass("ui-gotop").append("<div></div>").appendTo(d._options.container||(d.$el.parent().length?"":document.body));return d},_eventHandler:function(f){var d=this;switch(f.type){case"touchmove":d.hide();break;case"scroll":clearTimeout(d._options._TID);break;case"touchend":case"touchcancel":clearTimeout(d._options._TID);d._options._TID=setTimeout(function(){d._check.call(d)},300);break;case"scrollStop":d._check();break;case"ortchange":d._check.call(d);break;case"click":d._scrollTo();break}},_check:function(d){var e=this;(d!==c?d:window.pageYOffset)>document.documentElement.clientHeight?e.show():e.hide();return e},_scrollTo:function(){var d=this,e=window.pageYOffset;d.hide();clearTimeout(d._options._TID);if(!d._options.useAnimation){window.scrollTo(0,1);d.trigger("afterScroll")}else{d._options.moveToTop=setInterval(function(){if(e>1){window.scrollBy(0,-Math.min(150,e-1));e-=150}else{clearInterval(d._options.moveToTop);d.trigger("afterScroll")}},25,true)}return d},show:function(){this._options.root.style.display="block";return this},hide:function(){this._options.root.style.display="none";return this}})})(gmu,gmu.$);
/*!Widget gotop/$iscroll.js*/
(function(b,a,c){b.Gotop.register("iscroll",{_init:function(){var g=this,f=g._options,e,i=f.iScrollInstance,h=i.options.onScrollMove,d=i.options.onScrollEnd;i.options.onScrollMove=function(){h&&h.call(i,arguments);f.useHide&&g.hide()};i.options.onScrollEnd=function(){d&&d.call(i,arguments);g._check(Math.abs(i.y));if(f._scrollClick){g.trigger("afterScroll");f._scrollClick=false}};g.on("ready",function(){e=g.$el;e.on("click",function(){f._scrollClick=true;i.scrollTo(0,0)});f.useFix&&e.fix(f.position);f.root=e[0]});g.on("destroy",function(){i.options.onScrollMove=h;i.options.onScrollEnd=d})},_eventHandler:function(d){},_scrollTo:function(){}})})(gmu,gmu.$);
/*!Widget dialog/dialog.js*/
(function(c,b,d){var a={close:'<a class="ui-dialog-close" title="\u5173\u95ed"><span class="ui-icon ui-icon-delete"></span></a>',mask:'<div class="ui-mask"></div>',title:'<div class="ui-dialog-title"><h3><%=title%></h3></div>',wrap:'<div class="ui-dialog"><div class="ui-dialog-content"></div><% if(btns){ %><div class="ui-dialog-btns"><% for(var i=0, length=btns.length; i<length; i++){var item = btns[i]; %><a class="ui-btn ui-btn-<%=item.index%>" data-key="<%=item.key%>"><%=item.text%></a><% } %></div><% } %></div> '};c.define("Dialog",{options:{autoOpen:true,buttons:null,closeBtn:true,mask:true,width:300,height:"auto",title:null,content:null,scrollMove:true,container:null,maskClick:null,position:null},getWrap:function(){return this._options._wrap},_init:function(){var j=this,h=j._options,g,f=0,e=b.proxy(j._eventHandler,j),k={};j.on("ready",function(){h._container=b(h.container||document.body);(h._cIsBody=h._container.is("body"))||h._container.addClass("ui-dialog-container");k.btns=g=[];h.buttons&&b.each(h.buttons,function(i){g.push({index:++f,text:i,key:i})});h._mask=h.mask?b(a.mask).appendTo(h._container):null;h._wrap=b(b.parseTpl(a.wrap,k)).appendTo(h._container);h._content=b(".ui-dialog-content",h._wrap);h._title=b(a.title);h._close=h.closeBtn&&b(a.close).highlight("ui-dialog-close-hover");j.$el=j.$el||h._content;j.title(h.title);j.content(h.content);g.length&&b(".ui-dialog-btns .ui-btn",h._wrap).highlight("ui-state-hover");h._wrap.css({width:h.width,height:h.height});b(window).on("ortchange",e);h._wrap.on("click",e);h._mask&&h._mask.on("click",e);h.autoOpen&&j.open()})},_create:function(){var e=this._options;if(this._options.setup){e.content=e.content||this.$el.show();e.title=e.title||this.$el.attr("title")}},_eventHandler:function(k){var j=this,f,h,i=j._options,g;switch(k.type){case"ortchange":this.refresh();break;case"touchmove":i.scrollMove&&k.preventDefault();break;case"click":if(i._mask&&(b.contains(i._mask[0],k.target)||i._mask[0]===k.target)){return j.trigger("maskClick")}h=i._wrap.get(0);if((f=b(k.target).closest(".ui-dialog-close",h))&&f.length){j.close()}else{if((f=b(k.target).closest(".ui-dialog-btns .ui-btn",h))&&f.length){g=i.buttons[f.attr("data-key")];g&&g.apply(j,arguments)}}}},_calculate:function(){var k=this,j=k._options,i,l,f=document.body,h={},e=j._cIsBody,g=Math.round;j.mask&&(h.mask=e?{width:"100%",height:Math.max(f.scrollHeight,f.clientHeight)-1}:{width:"100%",height:"100%"});i=j._wrap.offset();l=b(window);h.wrap={left:"50%",marginLeft:-g(i.width/2)+"px",top:e?g(l.height()/2)+window.pageYOffset:"50%",marginTop:-g(i.height/2)+"px"};return h},refresh:function(){var g=this,f=g._options,e,h;if(f._isOpen){h=function(){e=g._calculate();e.mask&&f._mask.css(e.mask);f._wrap.css(e.wrap)};if(b.os.ios&&document.activeElement&&/input|textarea|select/i.test(document.activeElement.tagName)){document.body.scrollLeft=0;b.later(h,200)}else{h()}}return g},open:function(e,g){var f=this._options;f._isOpen=true;f._wrap.css("display","block");f._mask&&f._mask.css("display","block");e!==d&&this.position?this.position(e,g):this.refresh();b(document).on("touchmove",b.proxy(this._eventHandler,this));return this.trigger("open")},close:function(){var f,e=this._options;f=b.Event("beforeClose");this.trigger(f);if(f.defaultPrevented){return this}e._isOpen=false;e._wrap.css("display","none");e._mask&&e._mask.css("display","none");b(document).off("touchmove",this._eventHandler);return this.trigger("close")},title:function(f){var e=this._options,g=f!==d;if(g){f=(e.title=f)?"<h3>"+f+"</h3>":f;e._title.html(f)[f?"prependTo":"remove"](e._wrap);e._close&&e._close.prependTo(e.title?e._title:e._wrap)}return g?this:e.title},content:function(f){var e=this._options,g=f!==d;g&&e._content.empty().append(e.content=f);return g?this:e.content},destroy:function(){var e=this._options,f=this._eventHandler;b(window).off("ortchange",f);b(document).off("touchmove",f);e._wrap.off("click",f).remove();e._mask&&e._mask.off("click",f).remove();e._close&&e._close.highlight();return this.$super("destroy")}})})(gmu,gmu.$);
/*!Widget dialog/$position.js*/
(function(b,a,c){b.Dialog.register("position",{_init:function(){var d=this._options;d.position=d.position||{of:d.container||window,at:"center",my:"center"}},position:function(d,f){var e=this._options;if(!a.isPlainObject(d)){e.position.at="left"+(d>0?"+"+d:d)+" top"+(f>0?"+"+f:f)}else{a.extend(e.position,d)}return this.refresh()},_calculate:function(){var g=this,f=g._options,d=f.position,e=g.origin();f._wrap.position(a.extend(d,{using:function(h){e.wrap=h}}));return e}})})(gmu,gmu.$);
/*!Widget button/button.js*/
(function(b,a,c){b.define("Button",{options:{iconpos:"left"},template:{icon:'<span class="ui-icon ui-icon-<%= name %>"></span>',text:'<span class="ui-btn-text"><%= text %></span>'},_getWrap:function(d){return d},_init:function(){var d=this;d.$el=d.$el===c?a("<span/>").appendTo(document.body):d.$el},_create:function(){var i=this,h=i._options,f=i.$wrap=i._getWrap(i.getEl()),g=f.is("input"),d=f.find(".ui-btn-text"),e=f.find(".ui-icon");h.label=h.label===c?f[g?"val":"text"]():h.label;g||h.label===c||!d.length&&(d=a(i.tpl2html("text",{text:h.label}))).appendTo(f.empty());i.$label=d.length&&d;h.resetText=h.resetText||h.label;g||h.icon&&!e.length&&(e=a(i.tpl2html("icon",{name:h.icon}))).appendTo(f);i.$icon=e.length&&e;f.addClass("ui-btn "+(h.label&&h.icon?"ui-btn-icon-"+h.iconpos:h.label?"ui-btn-text-only":"ui-btn-icon-only"));h.state&&setTimeout(function(){i.state(h.state)},0)},state:function(g){if(g===c){return this._state}var f=this,d=f.$wrap,e=d.is("input"),h=f._options[g+"Text"];f.$wrap.removeClass("ui-state-"+f._state).addClass("ui-state-"+g);h===c||(e?d:f.$label)[e?"val":"text"](h);f._state!==g&&f.trigger("statechange",g,f._state);f._state=g;return f},toggle:function(){this.state(this._state==="active"?"reset":"active");return this}});a(function(){a(document.body).highlight("ui-state-hover",".ui-btn:not(.ui-state-disabled)")})})(gmu,gmu.$);
/*!Widget button/$input.js*/
(function(c,b){var a=0;c.Button.register("input",{_getWrap:function(e){var g,f,d;if(e.is('input[type="checkbox"], input[type="radio"]')){f=e.addClass("ui-hidden")[0];(g=f.id)||(f.id=g="input_btn_"+a++);d=b("label[for="+g+"]",f.form||f.ownerDocument||undefined);d.length||(d=b('<label for="'+g+'"></label>').insertBefore(e));e.prop("checked")&&(this._options.state="active");return d}return e},toggle:function(){var d=this.$el;if(d.is('input[type="radio"]')){$radios=b("[name='"+d.attr("name")+"']",d[0].form||d[0].ownerDocument||undefined);$radios.button("state","reset")}return this.origin.apply(this,arguments)},state:function(e){var d=this.$el;if(d.is('input[type="checkbox"], input[type="radio"]')){d.prop("disabled",e==="disabled");d.prop("checked",e==="checked")}return this.origin.apply(this,arguments)}});b(function(){b(document.body).on("click.button","label.ui-btn:not(.ui-state-disabled)",function(){b("#"+this.getAttribute("for")).button("toggle")})})})(gmu,gmu.$);
/*!Widget calendar/calendar.js*/
(function(e,f,d){var g=["01\u6708","02\u6708","03\u6708","04\u6708","05\u6708","06\u6708","07\u6708","08\u6708","09\u6708","10\u6708","11\u6708","12\u6708"],b=["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],k=/^(\+|\-)?(\d+)(M|Y)$/i,c=function(l,m){return 32-new Date(l,m,32).getDate()},h=function(l,m){return new Date(l,m,1).getDay()},a=function(n,l){var m=""+n;while(m.length<l){m="0"+m}return m},j=function(l){return l.is("select, input")?l.val():l.attr("data-value")},i;e.define("Calendar",{options:{date:null,firstDay:1,maxDate:null,minDate:null,swipeable:false,monthChangeable:false,yearChangeable:false},_init:function(){this.on("ready",function(){var n=this._options,m=this._container||this.$el,l=f.proxy(this._eventHandler,this);this.minDate(n.minDate).maxDate(n.maxDate).date(n.date||new Date()).refresh();m.addClass("ui-calendar").on("click",l).highlight();n.swipeable&&m.on("swipeLeft swipeRight",l)})},_create:function(){var l=this.$el;if(!l){l=this.$el=f("<div>")}l.appendTo(this._options.container||(l.parent().length?"":document.body))},_eventHandler:function(s){var q=this._options,m=(this._container||this.$el).get(0),p,r,l,o,n;switch(s.type){case"swipeLeft":case"swipeRight":return this.switchMonthTo((s.type=="swipeRight"?"-":"+")+"1M");case"change":n=f(".ui-calendar-header .ui-calendar-year, .ui-calendar-header .ui-calendar-month",this._el);return this.switchMonthTo(j(n.eq(1)),j(n.eq(0)));default:r=s.target;if((p=f(r).closest(".ui-calendar-calendar tbody a",m))&&p.length){s.preventDefault();l=p.parent();this._option("selectedDate",o=new Date(l.attr("data-year"),l.attr("data-month"),p.text()));this.trigger("select",o,f.calendar.formatDate(o),this);this.refresh()}else{if((p=f(r).closest(".ui-calendar-prev, .ui-calendar-next",m))&&p.length){s.preventDefault();this.switchMonthTo((p.is(".ui-calendar-prev")?"-":"+")+"1M")}}}},_option:function(m,q){var n=this._options,l,o,p;if(q!==d){switch(m){case"minDate":case"maxDate":n[m]=q?f.calendar.parseDate(q):null;break;case"selectedDate":o=n.minDate;p=n.maxDate;q=f.calendar.parseDate(q);q=o&&o>q?o:p&&p<q?p:q;n._selectedYear=n._drawYear=q.getFullYear();n._selectedMonth=n._drawMonth=q.getMonth();n._selectedDay=q.getDate();break;case"date":this._option("selectedDate",q);n[m]=this._option("selectedDate");break;default:n[m]=q}n._invalid=true;return this}return m=="selectedDate"?new Date(n._selectedYear,n._selectedMonth,n._selectedDay):n[m]},switchToToday:function(){var l=new Date();return this.switchMonthTo(l.getMonth(),l.getFullYear())},switchMonthTo:function(p,m){var n=this._options,o=this.minDate(),s=this.maxDate(),r,q,l;if(Object.prototype.toString.call(p)==="[object String]"&&k.test(p)){r=RegExp.$1=="-"?-parseInt(RegExp.$2,10):parseInt(RegExp.$2,10);q=RegExp.$3.toLowerCase();p=n._drawMonth+(q=="m"?r:0);m=n._drawYear+(q=="y"?r:0)}else{p=parseInt(p,10);m=parseInt(m,10)}l=new Date(m,p,1);l=o&&o>l?o:s&&s<l?s:l;p=l.getMonth();m=l.getFullYear();if(p!=n._drawMonth||m!=n._drawYear){this.trigger("monthchange",n._drawMonth=p,n._drawYear=m,this);n._invalid=true;this.refresh()}return this},refresh:function(){var n=this._options,m=this._container||this.$el,l=f.proxy(this._eventHandler,this);if(!n._invalid){return}f(".ui-calendar-calendar td:not(.ui-state-disabled), .ui-calendar-header a",m).highlight();f(".ui-calendar-header select",m).off("change",l);m.empty().append(this._generateHTML());f(".ui-calendar-calendar td:not(.ui-state-disabled), .ui-calendar-header a",m).highlight("ui-state-hover");f(".ui-calendar-header select",m).on("change",l);n._invalid=false;return this},destroy:function(){var m=this._container||this.$el,l=this._eventHandler;f(".ui-calendar-calendar td:not(.ui-state-disabled)",m).highlight();f(".ui-calendar-header select",m).off("change",l);m.remove();return this.$super("destroy")},_generateHTML:function(){var l=this._options,r=l._drawYear,v=l._drawMonth,q=new Date(),z=new Date(q.getFullYear(),q.getMonth(),q.getDate()),t=this.minDate(),o=this.maxDate(),x=this.selectedDate(),w="",u,s,n,A,y,m,B,p;n=(isNaN(n=parseInt(l.firstDay,10))?0:n);w+=this._renderHead(l,r,v,t,o)+'<table  class="ui-calendar-calendar"><thead><tr>';for(u=0;u<7;u++){A=(u+n)%7;w+="<th"+((u+n+6)%7>=5?' class="ui-calendar-week-end"':"")+"><span>"+b[A]+"</span></th>"}w+='</thead></tr><tbody><tr class="ui-calendar-gap"><td colspan="7">&#xa0;</td></tr>';m=c(r,v);y=(h(r,v)-n+7)%7;B=Math.ceil((y+m)/7);p=new Date(r,v,1-y);for(u=0;u<B;u++){w+="<tr>";for(s=0;s<7;s++){w+=this._renderDay(s,p,n,v,x,z,t,o);p.setDate(p.getDate()+1)}w+="</tr>"}w+="</tbody></table>";return w},_renderHead:function(q,n,r,o,l){var s='<div class="ui-calendar-header">',m=new Date(n,r,-1),t=new Date(n,r+1,1),p,u;s+='<a class="ui-calendar-prev'+(o&&o>m?" ui-state-disable":"")+'" href="#">&lt;&lt;</a><div class="ui-calendar-title">';if(q.yearChangeable){s+='<select class="ui-calendar-year">';for(p=Math.max(1970,n-10),u=p+20;p<u;p++){s+='<option value="'+p+'" '+(p==n?'selected="selected"':"")+">"+p+"\u5e74</option>"}s+="</select>"}else{s+='<span class="ui-calendar-year" data-value="'+n+'">'+n+"\u5e74</span>"}if(q.monthChangeable){s+='<select class="ui-calendar-month">';for(p=0;p<12;p++){s+='<option value="'+p+'" '+(p==r?'selected="selected"':"")+">"+g[p]+"</option>"}s+="</select>"}else{s+='<span class="ui-calendar-month" data-value="'+r+'">'+g[r]+"</span>"}s+='</div><a class="ui-calendar-next'+(l&&l<t?" ui-state-disable":"")+'" href="#">&gt;&gt;</a></div>';return s},_renderDay:function(r,o,m,s,t,u,q,l){var n=(o.getMonth()!==s),p;p=n||(q&&o<q)||(l&&o>l);return"<td class='"+((r+m+6)%7>=5?"ui-calendar-week-end":"")+(p?" ui-calendar-unSelectable ui-state-disabled":"")+(n||p?"":(o.getTime()===t.getTime()?" ui-calendar-current-day":"")+(o.getTime()===u.getTime()?" ui-calendar-today":""))+"'"+(p?"":" data-month='"+o.getMonth()+"' data-year='"+o.getFullYear()+"'")+">"+(n?"&#xa0;":(p?"<span class='ui-state-default'>"+o.getDate()+"</span>":"<a class='ui-state-default"+(o.getTime()===u.getTime()?" ui-state-highlight":"")+(o.getTime()===t.getTime()?" ui-state-active":"")+"' href='#'>"+o.getDate()+"</a>"))+"</td>"}});i=e.Calendar.prototype;f.each(["maxDate","minDate","date","selectedDate"],function(m,l){i[l]=function(n){return this._option(l,n)}});f.calendar={parseDate:function(m){var l=/^(\d{4})(?:\-|\/)(\d{1,2})(?:\-|\/)(\d{1,2})$/;return Object.prototype.toString.call(m)==="[object Date]"?m:l.test(m)?new Date(parseInt(RegExp.$1,10),parseInt(RegExp.$2,10)-1,parseInt(RegExp.$3,10)):null},formatDate:function(l){return l.getFullYear()+"-"+a(l.getMonth()+1,2)+"-"+a(l.getDate(),2)}}})(gmu,gmu.$);
/*!Widget calendar/$picker.js*/
(function(c,b){function a(d,h){var k=b('<span class="ui-holder"></span>'),l=b('<div class="ui-slideup-wrap">   <div class="ui-slideup">       <div class="header">           <span class="ok-btn">\u786e\u8ba4</span>           <span class="no-btn">\u53d6\u6d88</span>       </div>       <div class="frame"></div>   </div></div>'),f=b(".ui-slideup",l),g=b(".frame",f),i={refresh:function(m){l.css({top:window.pageYOffset+"px",height:window.innerHeight+"px"});f.animate({translateY:"-"+f.height()+"px",translateZ:"0"},400,"ease-out",function(){m&&m.call(i)})},close:function(n){var m=a.count=a.count-1;l.off("click.slideup"+e);f.animate({translateY:"0",translateZ:"0"},200,"ease-out",function(){n&&n();k.replaceWith(d);l.remove();m===0&&b(document).off("touchmove.slideup")}).find(".ok-btn, .no-btn").highlight();return i}},e=a.id=(a.id>>>0)+1,j;g.append(d.replaceWith(k));j=a.count=(a.count>>>0)+1;j===1&&b(document).on("touchmove.slideup",function(m){m.preventDefault()});l.on("click.slideup"+e,".ok-btn, .no-btn",function(){h.call(i,b(this).is(".ok-btn"))!==false&&i.close()}).appendTo(document.body).find(".ok-btn, .no-btn").highlight("ui-state-hover");i.refresh();return i}c.Calendar.register("picker",{_create:function(){var d=this.$el;if(!d){throw new Error("\u8bf7\u6307\u5b9a\u65e5\u671f\u9009\u62e9\u5668\u7684\u8d4b\u503c\u5bf9\u8c61")}},_init:function(){var d=this.$el,e=this._options;this._container=b("<div></div>");e.date||(e.date=d[d.is("select, input")?"val":"text"]());b(window).on("ortchange",b.proxy(this._eventHandler,this));this.on("commit",function(g,f){var h=b.calendar.formatDate(f);d[d.is("select, input")?"val":"text"](h)});this.on("destroy",function(){b(window).off("ortchange",this._eventHandler);this._frame&&this._frame.close()})},_eventHandler:function(d){if(d.type==="ortchange"){this._frame&&this._frame.refresh()}else{this.origin(d)}},show:function(){var e=this,d;if(this._visible){return this}d=this._container;this._visible=true;this.refresh();this._frame=a(d,function(g){var f;if(g){f=e._option("selectedDate");e.trigger("commit",f,b.calendar.formatDate(f),e);e._option("date",f)}else{e._option("selectedDate",e._option("date"))}e.hide();return false});return this.trigger("show",this)},hide:function(){var e=this,d;if(!this._visible){return this}d=new c.Event("beforehide");this.trigger(d,this);if(d.isDefaultPrevented()){return this}this._visible=false;this._frame.close(function(){e.trigger&&e.trigger("hide")});this._frame=null;return this},})})(gmu,gmu.$);
/*!Widget historylist/historylist.js*/
(function(b,a){b.define("Historylist",{options:{container:document.body,deleteSupport:true,items:[]},template:{wrap:'<ul class="ui-historylist">',item:'<li data-id="<%=id%>"><p class="ui-historylist-itemwrap"><span class="ui-historylist-item"><%=context%></span></p></li>',clear:'<p class="ui-historylist-clear">\u6e05\u7a7a\u641c\u7d22\u5386\u53f2</p>'},_init:function(){var d=this,c=d._options;d.$el=c.container=c.container||document.body;d.items=[];d.on("ready",function(){d._bindUI()});d.on("itemDelete",function(){if(d.items.length===0){d.hide()}})},_create:function(){var d=this,c=d._options;d.$el.hide();d.$wrap=a(d.tpl2html("wrap")).appendTo(c.container);d.$clear=a(d.tpl2html("clear")).appendTo(c.container);!d._options.deleteSupport&&d.$clear.hide();d.addItems(c.items);d.show()},_filterItemsById:function(e,d){var c=this;c.items.forEach(function(g,f){if(g.id===e){d.call(c,g,f);return}})},_bindUI:function(){var o=this,m,h,q,n,j,f=false,r,e,i,d,g,l,k,p,c;o.$clear.on("tap"+o.eventNs,function(s){setTimeout(function(){b.Dialog({closeBtn:false,buttons:{"\u6e05\u7a7a":function(){o.clear();this.destroy()},"\u53d6\u6d88":function(){this.destroy()}},title:"\u6e05\u7a7a\u5386\u53f2",content:"<p>\u662f\u5426\u6e05\u7a7a\u641c\u7d22\u5386\u53f2\uff1f</p>",open:function(){this._options._wrap.addClass("ui-historylist-dialog")}})},10);s.preventDefault();s.stopPropagation()});o.$wrap.on("tap"+o.eventNs,function(s){if(o._options.deleteSupport){return}h=a(s.target);if(!h.hasClass("ui-historylist-itemwrap")&&!(h=h.parents(".ui-historylist-itemwrap")).length){h=null;return}q=h.parent().attr("data-id");o._filterItemsById(q,function(t){o.trigger("itemTouch",{item:t.value})})});o.$wrap.on("touchstart"+o.eventNs,function(s){if(!o._options.deleteSupport){return}m=s.touches[0];h=a(m.target);n=s.timeStamp;i=e=parseInt(m.pageX);g=d=parseInt(m.pageY);p=false;f=false;if(!h.hasClass("ui-historylist-itemwrap")&&!(h=h.parents(".ui-historylist-itemwrap")).length){h=null;return}h.addClass("ui-historylist-ontap");h.css("width",h.width()-parseInt(h.css("border-left-width"))-parseInt(h.css("border-right-width")))});o.$wrap.on("touchmove"+o.eventNs,function(s){if(!h){return}i=s.touches[0].pageX;g=s.touches[0].pageY;r===undefined&&(r=setTimeout(function(){if(Math.abs(g-d)>Math.abs(i-e)/2){f=false}else{f=true}},10));p=p||((i-e>=3||g-d>=3)?true:false);if(!f){setTimeout(function(){h&&h.removeClass("ui-historylist-ontap")},150);return}k=(i-e)/o.$wrap.width();h.addClass("ui-historylist-itemmoving");h.removeClass("ui-historylist-ontap");h.css("-webkit-transform","translate3d("+(i-e)+"px, 0, 0)");h.css("opacity",1-k);s.preventDefault();s.stopPropagation()});o.$wrap.on("touchend"+o.eventNs+" touchcancel"+o.eventNs,function(s){if(!h){return}clearTimeout(r);r=undefined;q=h.parent().attr("data-id");j=s.timeStamp;l=(i-e)/(j-n);c=Math.abs(i-e);h.removeClass("ui-historylist-ontap");h.removeClass("ui-historylist-itemmoving");if(((c<o.$wrap.width()/3&&Math.abs(l)>0.1)&&f)||(c>=o.$wrap.width()/3&&f)){o.removeItem(q,h)}else{h.css("width","auto");h.css("-webkit-transform","translate3d(0, 0, 0)");h.css("opacity",1);!p&&c<3&&o._filterItemsById(q,function(t){o.trigger("itemTouch",{item:t.value})})}h=null})},show:function(){var c=this;if(c.items.length===0){return}if(c.sync===false){c.$wrap.html("");c.addItems(c.syncitems);c.sync=true}c.$el.show();c.isShow=true;return c},hide:function(){var c=this;c.$el.hide();c.isShow=false;return c},_getItemId:function(){var c=this;c._itemId===undefined?(c._itemId=1):++c._itemId;return"__dd__"+c._itemId},_getFormatItem:function(d){var c=this;if(Object.prototype.toString.call(d)==="[object String]"){return{context:d,value:d,id:c._getItemId()}}else{return{context:d.context||d.value,value:d.value||d.context,id:c._getItemId()}}},addItem:function(d){var c=this,d=c._getFormatItem(d);c.items.forEach(function(f,e){if(f.value===d.value){c.items.splice(e,1);a(c.$wrap.children()[e]).remove();return}});c.$wrap.children().length===0?c.$wrap.append(c.tpl2html("item",d)):a(c.tpl2html("item",d)).insertBefore(c.$wrap.children()[0]);c.items.unshift(d);return c},addItems:function(c){var d=this;c.forEach(function(e){d.addItem(e)});return d},update:function(c){var d=this;if(d.isShow){d.$wrap.html("");d.addItems(c);d.sync=true}else{d.syncitems=c;d.sync=false}return d},removeItem:function(g,f){var e=this,h,d,c;d=f.css("-webkit-transform");c=/translate3d\((.*?),.*/.test(d)?RegExp.$1:0;h=parseInt(c,10)>=0?f.width():-f.width();f.css("-webkit-transform","translate3d("+h+"px, 0, 0)");f.on("transitionEnd"+e.eventNs+" webkitTransitionEnd"+e.eventNs,function(){f.parent().remove();e._filterItemsById(g,function(j,i){e.items.splice(i,1);e.trigger("itemDelete",{item:j.value})})})},clear:function(){var c=this;c.$wrap.html("");c.items=[];c.sync=true;c.hide();c.trigger("clear");return c},disableDelete:function(){var c=this;c._options.deleteSupport=false;c.$clear.hide();return c},enableDelete:function(){var c=this;c._options.deleteSupport=true;c.$clear.show();return c},destroy:function(){var c=this;c.$wrap.off(c.eventNs);c.$clear.off(c.eventNs);c.$wrap.remove();c.$clear.remove();return c.$super("destroy")}})})(gmu,gmu.$);
/*!Widget navigator/navigator.js*/
(function(b,a,c){b.define("Navigator",{options:{content:null,event:"click"},template:{list:"<ul>",item:'<li><a<% if( href ) { %> href="<%= href %>"<% } %>><%= text %></a></li>'},_create:function(){var i=this,h=i._options,g=i.getEl(),e=g.find("ul").first(),d="ui-"+i.widgetName,j,f;if(!e.length&&h.content){e=a(i.tpl2html("list"));j=i.tpl2html("item");f="";h.content.forEach(function(k){k=a.extend({href:"",text:""},typeof k==="string"?{text:k}:k);f+=j(k)});e.append(f).appendTo(g)}else{if(g.is("ul, ol")){e=g.wrap("<div>");g=g.parent()}if(h.index===c){h.index=e.find(".ui-state-active").index();~h.index||(h.index=0)}}i.$list=e.addClass(d+"-list");i.trigger("done.dom",g.addClass(d),h);e.highlight("ui-state-hover","li");e.on(h.event+i.eventNs,"li:not(.ui-state-disable)>a",function(k){i._switchTo(a(this).parent().index(),k)});i.index=-1;i.switchTo(h.index)},_switchTo:function(j,h){if(j===this.index){return}var f=this,g=f.$list.children(),d=b.Event("beforeselect",h),i;f.trigger(d,g.get(j));if(d.isDefaultPrevented()){return}i=g.removeClass("ui-state-active").eq(j).addClass("ui-state-active");f.index=j;return f.trigger("select",j,i[0])},switchTo:function(d){return this._switchTo(~~d)},unselect:function(){this.index=-1;this.$list.children().removeClass("ui-state-active")},getIndex:function(){return this.index}})})(gmu,gmu.$);
/*!Widget navigator/$scrollable.js*/
(function(b,a,c){b.Navigator.options.iScroll={hScroll:true,vScroll:false,hScrollbar:false,vScrollbar:false};b.Navigator.register("scrollable",{_init:function(){var e=this,d=e._options;e.on("done.dom",function(){e.$list.wrap('<div class="ui-scroller"></div>');e.trigger("init.iScroll");e.$el.iScroll(a.extend({},d.iScroll))});a(window).on("ortchange"+e.eventNs,a.proxy(e.refresh,e));e.on("destroy",function(){e.$el.iScroll("destroy");a(window).off("ortchange"+e.eventNs)})},refresh:function(){this.trigger("refresh.iScroll").$el.iScroll("refresh")}})})(gmu,gmu.$);
/*!Widget navigator/scrolltonext.js*/
(function(b,a,c){b.Navigator.options.isScrollToNext=true;b.Navigator.option("isScrollToNext",true,function(){var e=this,d;e.on("select",function(k,m,i){if(d===c){d=e.index?0:1}var h=m>d,j=a(i)[h?"next":"prev"](),l=j.offset()||a(i).offset(),g=e.$el.offset(),f;if(h?l.left+l.width>g.left+g.width:l.left<g.left){f=e.$list.offset();e.$el.iScroll("scrollTo",h?g.width-l.left+f.left-l.width:f.left-l.left,0,400)}d=m})})})(gmu,gmu.$);
/*!Widget navigator/evenness.js*/
(function(b,a,c){b.Navigator.options.visibleCount=4;b.Navigator.option("visibleCount","*",function(){var f=this,e=f._options,d=a.type(e.visibleCount)==="number"?{portrait:e.visibleCount,landscape:Math.floor(e.visibleCount*3/2)}:e.visibleCount;f.on("init.iScroll refresh.iScroll",g);function g(k){var j=window.innerWidth>window.innerHeight?"landscape":"portrait",i=d[j],h=f.$el;f.$list.children().width(h.width()/i)}})})(gmu,gmu.$);
