var ming = function(a, b) {
	var c = /complete|loaded|interactive/,
		d = /^#([\w-]+)$/,
		e = /^\.([\w-]+)$/,
		f = /^[\w-]+$/,
		g = /translate(?:3d)?\((.+?)\)/,
		h = /matrix(3d)?\((.+?)\)/,
		i = function(b, c) {
			if(c = c || a, !b) return j();
			if("object" == typeof b) return i.isArrayLike(b) ? j(i.slice.call(b), null) : j([b], null);
			if("function" == typeof b) return i.ready(b);
			if("string" == typeof b) try {
				if(b = b.trim(), d.test(b)) {
					var e = a.getElementById(RegExp.$1);
					return j(e ? [e] : [])
				}
				return j(i.qsa(b, c), b)
			} catch(f) {}
			return j()
		},
		j = function(a, b) {
			return a = a || [], Object.setPrototypeOf(a, i.fn), a.selector = b || "", a
		};
	i.uuid = 0, i.data = {}, i.extend = function() {
		var a, c, d, e, f, g, h = arguments[0] || {},
			j = 1,
			k = arguments.length,
			l = !1;
		for("boolean" == typeof h && (l = h, h = arguments[j] || {}, j++), "object" == typeof h || i.isFunction(h) || (h = {}), j === k && (h = this, j--); k > j; j++)
			if(null != (a = arguments[j]))
				for(c in a) d = h[c], e = a[c], h !== e && (l && e && (i.isPlainObject(e) || (f = i.isArray(e))) ? (f ? (f = !1, g = d && i.isArray(d) ? d : []) : g = d && i.isPlainObject(d) ? d : {}, h[c] = i.extend(l, g, e)) : e !== b && (h[c] = e));
		return h
	}, i.noop = function() {}, i.slice = [].slice, i.filter = [].filter, i.type = function(a) {
		return null == a ? String(a) : k[{}.toString.call(a)] || "object"
	}, i.isArray = Array.isArray || function(a) {
		return a instanceof Array
	}, i.isArrayLike = function(a) {
		var b = !!a && "length" in a && a.length,
			c = i.type(a);
		return "function" === c || i.isWindow(a) ? !1 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a
	}, i.isWindow = function(a) {
		return null != a && a === a.window
	}, i.isObject = function(a) {
		return "object" === i.type(a)
	}, i.isPlainObject = function(a) {
		return i.isObject(a) && !i.isWindow(a) && Object.getPrototypeOf(a) === Object.prototype
	}, i.isEmptyObject = function(a) {
		for(var c in a)
			if(c !== b) return !1;
		return !0
	}, i.isFunction = function(a) {
		return "function" === i.type(a)
	}, i.qsa = function(b, c) {
		return c = c || a, i.slice.call(e.test(b) ? c.getElementsByClassName(RegExp.$1) : f.test(b) ? c.getElementsByTagName(b) : c.querySelectorAll(b))
	}, i.ready = function(b) {
		return c.test(a.readyState) ? b(i) : a.addEventListener("DOMContentLoaded", function() {
			b(i)
		}, !1), this
	}, i.each = function(a, b, c) {
		if(!a) return this;
		if("number" == typeof a.length)[].every.call(a, function(a, c) {
			return b.call(a, c, a) !== !1
		});
		else
			for(var d in a)
				if(c) {
					if(a.hasOwnProperty(d) && b.call(a[d], d, a[d]) === !1) return a
				} else if(b.call(a[d], d, a[d]) === !1) return a;
		return this
	}, i.focus = function(a) {
		i.os.ios ? setTimeout(function() {
			a.focus()
		}, 10) : a.focus()
	}, i.trigger = function(a, b, c) {
		return a.dispatchEvent(new CustomEvent(b, {
			detail: c,
			bubbles: !0,
			cancelable: !0
		})), this
	}, i.getStyles = function(a, b) {
		var c = a.ownerDocument.defaultView.getComputedStyle(a, null);
		return b ? c.getPropertyValue(b) || c[b] : c
	}, i.parseTranslate = function(a, b) {
		var c = a.match(g || "");
		return c && c[1] || (c = ["", "0,0,0"]), c = c[1].split(","), c = {
			x: parseFloat(c[0]),
			y: parseFloat(c[1]),
			z: parseFloat(c[2])
		}, b && c.hasOwnProperty(b) ? c[b] : c
	}, i.parseTranslateMatrix = function(a, b) {
		var c = a.match(h),
			d = c && c[1];
		c ? (c = c[2].split(","), "3d" === d ? c = c.slice(12, 15) : (c.push(0), c = c.slice(4, 7))) : c = [0, 0, 0];
		var e = {
			x: parseFloat(c[0]),
			y: parseFloat(c[1]),
			z: parseFloat(c[2])
		};
		return b && e.hasOwnProperty(b) ? e[b] : e
	}, i.hooks = {}, i.addAction = function(a, b) {
		var c = i.hooks[a];
		return c || (c = []), b.index = b.index || 1e3, c.push(b), c.sort(function(a, b) {
			return a.index - b.index
		}), i.hooks[a] = c, i.hooks[a]
	}, i.doAction = function(a, b) {
		i.isFunction(b) ? i.each(i.hooks[a], b) : i.each(i.hooks[a], function(a, b) {
			return !b.handle()
		})
	}, i.later = function(a, b, c, d) {
		b = b || 0;
		var e, f, g = a,
			h = d;
		return "string" == typeof a && (g = c[a]), e = function() {
			g.apply(c, i.isArray(h) ? h : [h])
		}, f = setTimeout(e, b), {
			id: f,
			cancel: function() {
				clearTimeout(f)
			}
		}
	}, i.now = Date.now || function() {
		return +new Date
	};
	var k = {};
	return i.each(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"], function(a, b) {
		k["[object " + b + "]"] = b.toLowerCase()
	}), window.JSON && (i.parseJSON = JSON.parse), i.fn = {
		each: function(a) {
			return [].every.call(this, function(b, c) {
				return a.call(b, c, b) !== !1
			}), this
		}
	}, "function" == typeof define && define.amd && define("mui", [], function() {
		return i
	}), i
}(document);
!
function(a, b) {
	function c(c) {
		this.os = this.os || {};
		var d = c.match(/Html5Plus/i);
		d && (this.os.plus = !0, a(function() {
			b.body.classList.add("mui-plus")
		}), c.match(/StreamApp/i) && (this.os.stream = !0, a(function() {
			b.body.classList.add("mui-plus-stream")
		})))
	}
	c.call(a, navigator.userAgent)
}(ming, document),
function(a) {
	"ontouchstart" in window ? (a.isTouchable = !0, a.EVENT_START = "touchstart", a.EVENT_MOVE = "touchmove", a.EVENT_END = "touchend") : (a.isTouchable = !1, a.EVENT_START = "mousedown", a.EVENT_MOVE = "mousemove", a.EVENT_END = "mouseup"), a.EVENT_CANCEL = "touchcancel", a.EVENT_CLICK = "click";
	var b = 1,
		c = {},
		d = {
			preventDefault: "isDefaultPrevented",
			stopImmediatePropagation: "isImmediatePropagationStopped",
			stopPropagation: "isPropagationStopped"
		},
		e = function() {
			return !0
		},
		f = function() {
			return !1
		},
		g = function(b, c) {
			return b.detail ? b.detail.currentTarget = c : b.detail = {
				currentTarget: c
			}, a.each(d, function(a, c) {
				var d = b[a];
				b[a] = function() {
					return this[c] = e, d && d.apply(b, arguments)
				}, b[c] = f
			}, !0), b
		},
		h = function(a) {
			return a && (a._mid || (a._mid = b++))
		},
		i = {},
		j = function(b, d, e, f) {
			return function(e) {
				for(var f = c[b._mid][d], h = [], i = e.target, j = {}; i && i !== document && i !== b && (!~["click", "tap", "doubletap", "longtap", "hold"].indexOf(d) || !i.disabled && !i.classList.contains("mui-disabled")); i = i.parentNode) {
					var k = {};
					a.each(f, function(c, d) {
						j[c] || (j[c] = a.qsa(c, b)), j[c] && ~j[c].indexOf(i) && (k[c] || (k[c] = d))
					}, !0), a.isEmptyObject(k) || h.push({
						element: i,
						handlers: k
					})
				}
				j = null, e = g(e), a.each(h, function(b, c) {
					i = c.element;
					var f = i.tagName;
					return "tap" === d && "INPUT" !== f && "TEXTAREA" !== f && "SELECT" !== f && (e.preventDefault(), e.detail && e.detail.gesture && e.detail.gesture.preventDefault()), a.each(c.handlers, function(b, c) {
						a.each(c, function(a, b) {
							b.call(i, e) === !1 && (e.preventDefault(), e.stopPropagation())
						}, !0)
					}, !0), e.isPropagationStopped() ? !1 : void 0
				}, !0)
			}
		},
		k = function(a, b) {
			var c = i[h(a)],
				d = [];
			if(c) {
				if(d = [], b) {
					var e = function(a) {
						return a.type === b
					};
					return c.filter(e)
				}
				d = c
			}
			return d
		},
		l = /^(INPUT|TEXTAREA|BUTTON|SELECT)$/;
	a.fn.on = function(b, d, e) {
		return this.each(function() {
			var f = this;
			h(f), h(e);
			var g = !1,
				k = c[f._mid] || (c[f._mid] = {}),
				m = k[b] || (k[b] = {});
			a.isEmptyObject(m) && (g = !0);
			var n = m[d] || (m[d] = []);
			if(n.push(e), g) {
				var o = i[h(f)];
				o || (o = []);
				var p = j(f, b, d, e);
				o.push(p), p.i = o.length - 1, p.type = b, i[h(f)] = o, f.addEventListener(b, p), "tap" === b && f.addEventListener("click", function(a) {
					if(a.target) {
						var b = a.target.tagName;
						if(!l.test(b))
							if("A" === b) {
								var c = a.target.href;
								c && ~c.indexOf("tel:") || a.preventDefault()
							} else a.preventDefault()
					}
				})
			}
		})
	}, a.fn.off = function(b, d, e) {
		return this.each(function() {
			var f = h(this);
			if(b)
				if(d)
					if(e) {
						var g = c[f] && c[f][b] && c[f][b][d];
						a.each(g, function(a, b) {
							return h(b) === h(e) ? (g.splice(a, 1), !1) : void 0
						}, !0)
					} else c[f] && c[f][b] && delete c[f][b][d];
			else c[f] && delete c[f][b];
			else c[f] && delete c[f];
			c[f] ? (!c[f][b] || a.isEmptyObject(c[f][b])) && k(this, b).forEach(function(a) {
				this.removeEventListener(a.type, a), delete i[f][a.i]
			}.bind(this)) : k(this).forEach(function(a) {
				this.removeEventListener(a.type, a), delete i[f][a.i]
			}.bind(this))
		})
	}
}(ming),
function(a, b, c) {
	a.targets = {}, a.targetHandles = [], a.registerTarget = function(b) {
		return b.index = b.index || 1e3, a.targetHandles.push(b), a.targetHandles.sort(function(a, b) {
			return a.index - b.index
		}), a.targetHandles
	}, b.addEventListener(a.EVENT_START, function(b) {
		for(var d = b.target, e = {}; d && d !== c; d = d.parentNode) {
			var f = !1;
			if(a.each(a.targetHandles, function(c, g) {
					var h = g.name;
					f || e[h] || !g.hasOwnProperty("handle") ? e[h] || g.isReset !== !1 && (a.targets[h] = !1) : (a.targets[h] = g.handle(b, d), a.targets[h] && (e[h] = !0, g.isContinue !== !0 && (f = !0)))
				}), f) break
		}
	}), b.addEventListener("click", function(b) {
		for(var d = b.target, e = !1; d && d !== c && ("A" !== d.tagName || (a.each(a.targetHandles, function(a, c) {
				c.name;
				return c.hasOwnProperty("handle") && c.handle(b, d) ? (e = !0, b.preventDefault(), !1) : void 0
			}), !e)); d = d.parentNode);
	})
}(ming, window, document),
function(a) {
	String.prototype.trim === a && (String.prototype.trim = function() {
		return this.replace(/^\s+|\s+$/g, "")
	}), Object.setPrototypeOf = Object.setPrototypeOf || function(a, b) {
		return a.__proto__ = b, a
	}
}(),
function(a, b, c) {
	if((a.os.android || a.os.ios) && !b.FastClick) {
		var d = function(a, b) {
			return "LABEL" === b.tagName && b.parentNode && (b = b.parentNode.querySelector("input")), !b || "radio" !== b.type && "checkbox" !== b.type || b.disabled ? !1 : b
		};
		a.registerTarget({
			name: c,
			index: 40,
			handle: d,
			target: !1
		});
		var e = function(c) {
			var d = a.targets.click;
			if(d) {
				var e, f;
				document.activeElement && document.activeElement !== d && document.activeElement.blur(), f = c.detail.gesture.changedTouches[0], e = document.createEvent("MouseEvents"), e.initMouseEvent("click", !0, !0, b, 1, f.screenX, f.screenY, f.clientX, f.clientY, !1, !1, !1, !1, 0, null), e.forwardedTouchEvent = !0, d.dispatchEvent(e), c.detail && c.detail.gesture.preventDefault()
			}
		};
		b.addEventListener("tap", e), b.addEventListener("doubletap", e), b.addEventListener("click", function(b) {
			return a.targets.click && !b.forwardedTouchEvent ? (b.stopImmediatePropagation ? b.stopImmediatePropagation() : b.propagationStopped = !0, b.stopPropagation(), b.preventDefault(), !1) : void 0
		}, !0)
	}
}(ming, window, "click"),

function(a) {
	a.namespace = "mui", a.classNamePrefix = a.namespace + "-", a.classSelectorPrefix = "." + a.classNamePrefix, a.className = function(b) {
		return a.classNamePrefix + b
	}, a.classSelector = function(b) {
		return b.replace(/\./g, a.classSelectorPrefix)
	}, a.eventName = function(b, c) {
		return b + (a.namespace ? "." + a.namespace : "") + (c ? "." + c : "")
	}
}(ming),
function(a, b) {
	a.gestures = {
		session: {}
	}, a.preventDefault = function(a) {
		a.preventDefault()
	}, a.stopPropagation = function(a) {
		a.stopPropagation()
	}, a.addGesture = function(b) {
		return a.addAction("gestures", b)
	};
	var c = Math.round,
		d = Math.abs,
		e = Math.sqrt,
		f = (Math.atan, Math.atan2),
		g = function(a, b, c) {
			c || (c = ["x", "y"]);
			var d = b[c[0]] - a[c[0]],
				f = b[c[1]] - a[c[1]];
			return e(d * d + f * f)
		},
		h = function(a, b) {
			if(a.length >= 2 && b.length >= 2) {
				var c = ["pageX", "pageY"];
				return g(b[1], b[0], c) / g(a[1], a[0], c)
			}
			return 1
		},
		i = function(a, b, c) {
			c || (c = ["x", "y"]);
			var d = b[c[0]] - a[c[0]],
				e = b[c[1]] - a[c[1]];
			return 180 * f(e, d) / Math.PI
		},
		j = function(a, b) {
			return a === b ? "" : d(a) >= d(b) ? a > 0 ? "left" : "right" : b > 0 ? "up" : "down"
		},
		k = function(a, b) {
			var c = ["pageX", "pageY"];
			return i(b[1], b[0], c) - i(a[1], a[0], c)
		},
		l = function(a, b, c) {
			return {
				x: b / a || 0,
				y: c / a || 0
			}
		},
		m = function(b, c) {
			a.gestures.stoped || a.doAction("gestures", function(d, e) {
				a.gestures.stoped || a.options.gestureConfig[e.name] !== !1 && e.handle(b, c)
			})
		},
		n = function(a, b) {
			for(; a;) {
				if(a == b) return !0;
				a = a.parentNode
			}
			return !1
		},
		o = function(a, b, c) {
			for(var d = [], e = [], f = 0; f < a.length;) {
				var g = b ? a[f][b] : a[f];
				e.indexOf(g) < 0 && d.push(a[f]), e[f] = g, f++
			}
			return c && (d = b ? d.sort(function(a, c) {
				return a[b] > c[b]
			}) : d.sort()), d
		},
		p = function(a) {
			var b = a.length;
			if(1 === b) return {
				x: c(a[0].pageX),
				y: c(a[0].pageY)
			};
			for(var d = 0, e = 0, f = 0; b > f;) d += a[f].pageX, e += a[f].pageY, f++;
			return {
				x: c(d / b),
				y: c(e / b)
			}
		},
		q = function() {
			return a.options.gestureConfig.pinch
		},
		r = function(b) {
			for(var d = [], e = 0; e < b.touches.length;) d[e] = {
				pageX: c(b.touches[e].pageX),
				pageY: c(b.touches[e].pageY)
			}, e++;
			return {
				timestamp: a.now(),
				gesture: b.gesture,
				touches: d,
				center: p(b.touches),
				deltaX: b.deltaX,
				deltaY: b.deltaY
			}
		},
		s = function(b) {
			var c = a.gestures.session,
				d = b.center,
				e = c.offsetDelta || {},
				f = c.prevDelta || {},
				g = c.prevTouch || {};
			(b.gesture.type === a.EVENT_START || b.gesture.type === a.EVENT_END) && (f = c.prevDelta = {
				x: g.deltaX || 0,
				y: g.deltaY || 0
			}, e = c.offsetDelta = {
				x: d.x,
				y: d.y
			}), b.deltaX = f.x + (d.x - e.x), b.deltaY = f.y + (d.y - e.y)
		},
		t = function(b) {
			var c = a.gestures.session,
				d = b.touches,
				e = d.length;
			c.firstTouch || (c.firstTouch = r(b)), q() && e > 1 && !c.firstMultiTouch ? c.firstMultiTouch = r(b) : 1 === e && (c.firstMultiTouch = !1);
			var f = c.firstTouch,
				l = c.firstMultiTouch,
				m = l ? l.center : f.center,
				n = b.center = p(d);
			b.timestamp = a.now(), b.deltaTime = b.timestamp - f.timestamp, b.angle = i(m, n), b.distance = g(m, n), s(b), b.offsetDirection = j(b.deltaX, b.deltaY), b.scale = l ? h(l.touches, d) : 1, b.rotation = l ? k(l.touches, d) : 0, v(b)
		},
		u = 25,
		v = function(b) {
			var c, e, f, g, h = a.gestures.session,
				i = h.lastInterval || b,
				k = b.timestamp - i.timestamp;
			if(b.gesture.type != a.EVENT_CANCEL && (k > u || void 0 === i.velocity)) {
				var m = i.deltaX - b.deltaX,
					n = i.deltaY - b.deltaY,
					o = l(k, m, n);
				e = o.x, f = o.y, c = d(o.x) > d(o.y) ? o.x : o.y, g = j(m, n) || i.direction, h.lastInterval = b
			} else c = i.velocity, e = i.velocityX, f = i.velocityY, g = i.direction;
			b.velocity = c, b.velocityX = e, b.velocityY = f, b.direction = g
		},
		w = {},
		x = function(a) {
			for(var b = 0; b < a.length; b++) !a.identifier && (a.identifier = 0);
			return a
		},
		y = function(b, c) {
			var d = x(a.slice.call(b.touches || [b])),
				e = b.type,
				f = [],
				g = [];
			if(e !== a.EVENT_START && e !== a.EVENT_MOVE || 1 !== d.length) {
				var h = 0,
					f = [],
					g = [],
					i = x(a.slice.call(b.changedTouches || [b]));
				c.target = b.target;
				var j = a.gestures.session.target || b.target;
				if(f = d.filter(function(a) {
						return n(a.target, j)
					}), e === a.EVENT_START)
					for(h = 0; h < f.length;) w[f[h].identifier] = !0, h++;
				for(h = 0; h < i.length;) w[i[h].identifier] && g.push(i[h]), (e === a.EVENT_END || e === a.EVENT_CANCEL) && delete w[i[h].identifier], h++;
				if(!g.length) return !1
			} else w[d[0].identifier] = !0, f = d, g = d, c.target = b.target;
			f = o(f.concat(g), "identifier", !0);
			var k = f.length,
				l = g.length;
			return e === a.EVENT_START && k - l === 0 && (c.isFirst = !0, a.gestures.touch = a.gestures.session = {
				target: b.target
			}), c.isFinal = (e === a.EVENT_END || e === a.EVENT_CANCEL) && k - l === 0, c.touches = f, c.changedTouches = g, !0
		},
		z = function(b) {
			var c = {
					gesture: b
				},
				d = y(b, c);
			d && (t(c), m(b, c), a.gestures.session.prevTouch = c, b.type !== a.EVENT_END || a.isTouchable || (a.gestures.touch = a.gestures.session = {}))
		};
	b.addEventListener(a.EVENT_START, z), b.addEventListener(a.EVENT_MOVE, z), b.addEventListener(a.EVENT_END, z), b.addEventListener(a.EVENT_CANCEL, z), b.addEventListener(a.EVENT_CLICK, function(b) {
		(a.os.android || a.os.ios) && (a.targets.popover && b.target === a.targets.popover || a.targets.tab || a.targets.offcanvas || a.targets.modal) && b.preventDefault()
	}, !0), a.isScrolling = !1;
	var A = null;
	b.addEventListener("scroll", function() {
		a.isScrolling = !0, A && clearTimeout(A), A = setTimeout(function() {
			a.isScrolling = !1
		}, 250)
	})
}(ming, window),
function(a, b) {
	var c = function(c, d) {
		var e = a.gestures.session;
		switch(c.type) {
			case a.EVENT_START:
				break;
			case a.EVENT_MOVE:
				if(!d.direction || !e.target) return;
				e.lockDirection && e.startDirection && e.startDirection && e.startDirection !== d.direction && ("up" === e.startDirection || "down" === e.startDirection ? d.direction = d.deltaY < 0 ? "up" : "down" : d.direction = d.deltaX < 0 ? "left" : "right"), e.drag || (e.drag = !0, a.trigger(e.target, b + "start", d)), a.trigger(e.target, b, d), a.trigger(e.target, b + d.direction, d);
				break;
			case a.EVENT_END:
			case a.EVENT_CANCEL:
				e.drag && d.isFinal && a.trigger(e.target, b + "end", d)
		}
	};
	a.addGesture({
		name: b,
		index: 20,
		handle: c,
		options: {
			fingers: 1
		}
	})
}(ming, "drag"),
function(a, b) {
	var c, d, e = function(e, f) {
		var g = a.gestures.session,
			h = this.options;
		switch(e.type) {
			case a.EVENT_END:
				if(!f.isFinal) return;
				var i = g.target;
				if(!i || i.disabled || i.classList && i.classList.contains("mui-disabled")) return;
				if(f.distance < h.tapMaxDistance && f.deltaTime < h.tapMaxTime) {
					if(a.options.gestureConfig.doubletap && c && c === i && d && f.timestamp - d < h.tapMaxInterval) return a.trigger(i, "doubletap", f), d = a.now(), void(c = i);
					a.trigger(i, b, f), d = a.now(), c = i
				}
		}
	};
	a.addGesture({
		name: b,
		index: 30,
		handle: e,
		options: {
			fingers: 1,
			tapMaxInterval: 300,
			tapMaxDistance: 5,
			tapMaxTime: 250
		}
	})
}(ming, "tap"),
function(a, b) {
	var c, d = function(d, e) {
		var f = a.gestures.session,
			g = this.options;
		switch(d.type) {
			case a.EVENT_START:
				clearTimeout(c), c = setTimeout(function() {
					a.trigger(f.target, b, e)
				}, g.holdTimeout);
				break;
			case a.EVENT_MOVE:
				e.distance > g.holdThreshold && clearTimeout(c);
				break;
			case a.EVENT_END:
			case a.EVENT_CANCEL:
				clearTimeout(c)
		}
	};
	a.addGesture({
		name: b,
		index: 10,
		handle: d,
		options: {
			fingers: 1,
			holdTimeout: 500,
			holdThreshold: 2
		}
	})
}(ming, "longtap"),
function(a) {
	function b(a, b) {
		var c = "MUI_SCROLL_POSITION_" + document.location.href + "_" + b.src,
			d = parseFloat(localStorage.getItem(c)) || 0;
		d && ! function(a) {
			b.onload = function() {
				window.scrollTo(0, a)
			}
		}(d), setInterval(function() {
			var a = window.scrollY;
			d !== a && (localStorage.setItem(c, a + ""), d = a)
		}, 100)
	}
	a.global = a.options = {
		gestureConfig: {
			tap: !0,
			doubletap: !1,
			longtap: !1,
			hold: !1,
			flick: !0,
			swipe: !0,
			drag: !0,
			pinch: !1
		}
	}, a.initGlobal = function(b) {
		return a.options = a.extend(!0, a.global, b), this
	};
	var c = {},
		d = !1;
	a.init = function(b) {
		return d = !0, a.options = a.extend(!0, a.global, b || {}), a.ready(function() {
			a.doAction("inits", function(b, d) {
				var e = !(c[d.name] && !d.repeat);
				e && (d.handle.call(a), c[d.name] = !0)
			})
		}), this
	}, a.addInit = function(b) {
		return a.addAction("inits", b)
	}, a.addInit({
		name: "iframe",
		index: 100,
		handle: function() {
			var b = a.options,
				c = b.subpages || [];
			!a.os.plus && c.length && e(c[0])
		}
	});
	var e = function(c) {
		var d = document.createElement("div");
		d.className = "mui-iframe-wrapper";
		var e = c.styles || {};
		"string" != typeof e.top && (e.top = "0px"), "string" != typeof e.bottom && (e.bottom = "0px"), d.style.top = e.top, d.style.bottom = e.bottom;
		var f = document.createElement("iframe");
		f.src = c.url, f.id = c.id || c.url, f.name = f.id, d.appendChild(f), document.body.appendChild(d), a.os.wechat && b(d, f)
	};
	a(function() {
		var b = document.body.classList,
			c = [];
		a.os.ios ? (c.push({
			os: "ios",
			version: a.os.version
		}), b.add("mui-ios")) : a.os.android && (c.push({
			os: "android",
			version: a.os.version
		}), b.add("mui-android")), a.os.wechat && (c.push({
			os: "wechat",
			version: a.os.wechat.version
		}), b.add("mui-wechat")), c.length && a.each(c, function(c, d) {
			var e = "";
			d.version && a.each(d.version.split("."), function(c, f) {
				e = e + (e ? "-" : "") + f, b.add(a.className(d.os + "-" + e))
			})
		})
	})
}(ming),
function(a) {
	var b = {
			swipeBack: !1,
			preloadPages: [],
			preloadLimit: 10,
			keyEventBind: {
				backbutton: !0,
				menubutton: !0
			}
		},
		c = {
			autoShow: !0,
			duration: a.os.ios ? 200 : 100,
			aniShow: "slide-in-right"
		};
	a.options.show && (c = a.extend(!0, c, a.options.show)), a.currentWebview = null, a.isHomePage = !1, a.extend(!0, a.global, b), a.extend(!0, a.options, b), a.waitingOptions = function(b) {
		return a.extend(!0, {}, {
			autoShow: !0,
			title: ""
		}, b)
	}, a.showOptions = function(b) {
		return a.extend(!0, {}, c, b)
	}, a.windowOptions = function(b) {
		return a.extend({
			scalable: !1,
			bounce: ""
		}, b)
	}, a.plusReady = function(a) {
		return window.plus ? setTimeout(function() {
			a()
		}, 0) : document.addEventListener("plusready", function() {
			a()
		}, !1), this
	};
	var d = function(b) {
			if(!b.preloaded) {
				a.fire(b, "preload");
				for(var c = b.children(), d = 0; d < c.length; d++) a.fire(c[d], "preload");
				b.preloaded = !0
			}
		},
		e = function(b, c, d) {
			if(d) {
				if(!b[c + "ed"]) {
					a.fire(b, c);
					for(var e = b.children(), f = 0; f < e.length; f++) a.fire(e[f], c);
					b[c + "ed"] = !0
				}
			} else {
				a.fire(b, c);
				for(var e = b.children(), f = 0; f < e.length; f++) a.fire(e[f], c)
			}
		};
}(ming),
function(a, b) {
	a.addBack = function(b) {
		return a.addAction("backs", b)
	}, a.addBack({
		name: "browser",
		index: 100,
		handle: function() {
			return b.history.length > 1 ? (b.history.back(), !0) : !1
		}
	}), a.back = function() {
		("function" != typeof a.options.beforeback || a.options.beforeback() !== !1) && a.doAction("backs")
	}, b.addEventListener("tap", function(b) {
		var c = a.targets.action;
		c && c.classList.contains("mui-action-back") && (a.back(), a.targets.action = !1)
	}), b.addEventListener("swiperight", function(b) {
		var c = b.detail;
		a.options.swipeBack === !0 && Math.abs(c.angle) < 3 && a.back()
	})
}(ming, window),
function(a, b, c) {
	a.offset = function(a) {
		var d = {
			top: 0,
			left: 0
		};
		return typeof a.getBoundingClientRect !== c && (d = a.getBoundingClientRect()), {
			top: d.top + b.pageYOffset - a.clientTop,
			left: d.left + b.pageXOffset - a.clientLeft
		}
	}
}(ming, window),
function(a, b) {
	a.scrollTo = function(a, c, d) {
		c = c || 1e3;
		var e = function(c) {
			if(0 >= c) return b.scrollTo(0, a), void(d && d());
			var f = a - b.scrollY;
			setTimeout(function() {
				b.scrollTo(0, b.scrollY + f / c * 10), e(c - 10)
			}, 16.7)
		};
		e(c)
	}, a.animationFrame = function(a) {
		var b, c, d;
		return function() {
			b = arguments, d = this, c || (c = !0, requestAnimationFrame(function() {
				a.apply(d, b), c = !1
			}))
		}
	}
}(ming, window),
function(a) {
	var b = !1,
		c = /xyz/.test(function() {
			xyz
		}) ? /\b_super\b/ : /.*/,
		d = function() {};
	d.extend = function(a) {
		function d() {
			!b && this.init && this.init.apply(this, arguments)
		}
		var e = this.prototype;
		b = !0;
		var f = new this;
		b = !1;
		for(var g in a) f[g] = "function" == typeof a[g] && "function" == typeof e[g] && c.test(a[g]) ? function(a, b) {
			return function() {
				var c = this._super;
				this._super = e[a];
				var d = b.apply(this, arguments);
				return this._super = c, d
			}
		}(g, a[g]) : a[g];
		return d.prototype = f, d.prototype.constructor = d, d.extend = arguments.callee, d
	}, a.Class = d
}(ming),
function(a, b, c, d) {
	var e = "mui-scroll",
		f = "mui-scrollbar",
		g = "mui-scrollbar-indicator",
		h = f + "-vertical",
		i = f + "-horizontal",
		j = "mui-active",
		k = {
			quadratic: {
				style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
				fn: function(a) {
					return a * (2 - a)
				}
			},
			circular: {
				style: "cubic-bezier(0.1, 0.57, 0.1, 1)",
				fn: function(a) {
					return Math.sqrt(1 - --a * a)
				}
			},
			outCirc: {
				style: "cubic-bezier(0.075, 0.82, 0.165, 1)"
			},
			outCubic: {
				style: "cubic-bezier(0.165, 0.84, 0.44, 1)"
			}
		},
		l = a.Class.extend({
			init: function(b, c) {
				this.wrapper = this.element = b, this.scroller = this.wrapper.children[0], this.scrollerStyle = this.scroller && this.scroller.style, this.stopped = !1, this.options = a.extend(!0, {
					scrollY: !0,
					scrollX: !1,
					startX: 0,
					startY: 0,
					indicators: !0,
					stopPropagation: !1,
					hardwareAccelerated: !0,
					fixedBadAndorid: !1,
					preventDefaultException: {
						tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|VIDEO)$/
					},
					momentum: !0,
					snapX: .5,
					snap: !1,
					bounce: !0,
					bounceTime: 500,
					bounceEasing: k.outCirc,
					scrollTime: 500,
					scrollEasing: k.outCubic,
					directionLockThreshold: 5,
					parallaxElement: !1,
					parallaxRatio: .5
				}, c), this.x = 0, this.y = 0, this.translateZ = this.options.hardwareAccelerated ? " translateZ(0)" : "", this._init(), this.scroller && (this.refresh(), this.scrollTo(this.options.startX, this.options.startY))
			},
			_init: function() {
				this._initParallax(), this._initIndicators(), this._initEvent()
			},
			_initParallax: function() {
				this.options.parallaxElement && (this.parallaxElement = c.querySelector(this.options.parallaxElement), this.parallaxStyle = this.parallaxElement.style, this.parallaxHeight = this.parallaxElement.offsetHeight, this.parallaxImgStyle = this.parallaxElement.querySelector("img").style)
			},
			_initIndicators: function() {
				var a = this;
				if(a.indicators = [], this.options.indicators) {
					var b, c = [];
					a.options.scrollY && (b = {
						el: this._createScrollBar(h),
						listenX: !1
					}, this.wrapper.appendChild(b.el), c.push(b)), this.options.scrollX && (b = {
						el: this._createScrollBar(i),
						listenY: !1
					}, this.wrapper.appendChild(b.el), c.push(b));
					for(var d = c.length; d--;) this.indicators.push(new m(this, c[d]))
				}
			},
			_initSnap: function() {
				this.currentPage = {}, this.pages = [];
				for(var a = this.snaps, b = a.length, c = 0, d = -1, e = 0, f = 0, g = 0, h = 0, i = 0; b > i; i++) {
					var k = a[i],
						l = k.offsetLeft,
						m = k.offsetWidth;
					(0 === i || l <= a[i - 1].offsetLeft) && (c = 0, d++), this.pages[c] || (this.pages[c] = []), e = this._getSnapX(l), h = Math.round(m * this.options.snapX), f = e - h, g = e - m + h, this.pages[c][d] = {
						x: e,
						leftX: f,
						rightX: g,
						pageX: c,
						element: k
					}, k.classList.contains(j) && (this.currentPage = this.pages[c][0]), e >= this.maxScrollX && c++
				}
				this.options.startX = this.currentPage.x || 0
			},
			_getSnapX: function(a) {
				return Math.max(Math.min(0, -a + this.wrapperWidth / 2), this.maxScrollX)
			},
			_gotoPage: function(a) {
				this.currentPage = this.pages[Math.min(a, this.pages.length - 1)][0];
				for(var b = 0, c = this.snaps.length; c > b; b++) b === a ? this.snaps[b].classList.add(j) : this.snaps[b].classList.remove(j);
				this.scrollTo(this.currentPage.x, 0, this.options.scrollTime)
			},
			_nearestSnap: function(a) {
				if(!this.pages.length) return {
					x: 0,
					pageX: 0
				};
				var b = 0,
					c = this.pages.length;
				for(a > 0 ? a = 0 : a < this.maxScrollX && (a = this.maxScrollX); c > b; b++) {
					var d = "left" === this.direction ? this.pages[b][0].leftX : this.pages[b][0].rightX;
					if(a >= d) return this.pages[b][0]
				}
				return {
					x: 0,
					pageX: 0
				}
			},
			_initEvent: function(c) {
				var d = c ? "removeEventListener" : "addEventListener";
				b[d]("orientationchange", this), b[d]("resize", this), this.scroller[d]("webkitTransitionEnd", this), this.wrapper[d](a.EVENT_START, this), this.wrapper[d](a.EVENT_CANCEL, this), this.wrapper[d](a.EVENT_END, this), this.wrapper[d]("drag", this), this.wrapper[d]("dragend", this), this.wrapper[d]("flick", this), this.wrapper[d]("scrollend", this), this.options.scrollX && this.wrapper[d]("swiperight", this);
				var e = this.wrapper.querySelector(".mui-segmented-control");
				e && mui(e)[c ? "off" : "on"]("click", "a", a.preventDefault), this.wrapper[d]("scrollstart", this), this.wrapper[d]("refresh", this)
			},
			_handleIndicatorScrollend: function() {
				this.indicators.map(function(a) {
					a.fade()
				})
			},
			_handleIndicatorScrollstart: function() {
				this.indicators.map(function(a) {
					a.fade(1)
				})
			},
			_handleIndicatorRefresh: function() {
				this.indicators.map(function(a) {
					a.refresh()
				})
			},
			handleEvent: function(b) {
				if(this.stopped) return void this.resetPosition();
				switch(b.type) {
					case a.EVENT_START:
						this._start(b);
						break;
					case "drag":
						this.options.stopPropagation && b.stopPropagation(), this._drag(b);
						break;
					case "dragend":
					case "flick":
						this.options.stopPropagation && b.stopPropagation(), this._flick(b);
						break;
					case a.EVENT_CANCEL:
					case a.EVENT_END:
						this._end(b);
						break;
					case "webkitTransitionEnd":
						this.transitionTimer && this.transitionTimer.cancel(), this._transitionEnd(b);
						break;
					case "scrollstart":
						this._handleIndicatorScrollstart(b);
						break;
					case "scrollend":
						this._handleIndicatorScrollend(b), this._scrollend(b), b.stopPropagation();
						break;
					case "orientationchange":
					case "resize":
						this._resize();
						break;
					case "swiperight":
						b.stopPropagation();
						break;
					case "refresh":
						this._handleIndicatorRefresh(b)
				}
			},
			_start: function(b) {
				if(this.moved = this.needReset = !1, this._transitionTime(), this.isInTransition) {
					this.needReset = !0, this.isInTransition = !1;
					var c = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
					this.setTranslate(Math.round(c.x), Math.round(c.y)), a.trigger(this.scroller, "scrollend", this), b.preventDefault()
				}
				this.reLayout(), a.trigger(this.scroller, "beforescrollstart", this)
			},
			_getDirectionByAngle: function(a) {
				return -80 > a && a > -100 ? "up" : a >= 80 && 100 > a ? "down" : a >= 170 || -170 >= a ? "left" : a >= -35 && 10 >= a ? "right" : null
			},
			_drag: function(c) {
				var d = c.detail;
				if((this.options.scrollY || "up" === d.direction || "down" === d.direction) && a.os.ios && parseFloat(a.os.version) >= 8) {
					var e = d.gesture.touches[0].clientY;
					if(e + 10 > b.innerHeight || 10 > e) return void this.resetPosition(this.options.bounceTime)
				}
				var f = isReturn = !1;
				this._getDirectionByAngle(d.angle);
				if("left" === d.direction || "right" === d.direction ? this.options.scrollX ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollY && !this.moved && (isReturn = !0) : "up" === d.direction || "down" === d.direction ? this.options.scrollY ? (f = !0, this.moved || (a.gestures.session.lockDirection = !0, a.gestures.session.startDirection = d.direction)) : this.options.scrollX && !this.moved && (isReturn = !0) : isReturn = !0, (this.moved || f) && (c.stopPropagation(), d.gesture && d.gesture.preventDefault()), !isReturn) {
					this.moved ? c.stopPropagation() : a.trigger(this.scroller, "scrollstart", this);
					var g = 0,
						h = 0;
					this.moved ? (g = d.deltaX - a.gestures.session.prevTouch.deltaX, h = d.deltaY - a.gestures.session.prevTouch.deltaY) : (g = d.deltaX, h = d.deltaY);
					var i = Math.abs(d.deltaX),
						j = Math.abs(d.deltaY);
					i > j + this.options.directionLockThreshold ? h = 0 : j >= i + this.options.directionLockThreshold && (g = 0), g = this.hasHorizontalScroll ? g : 0, h = this.hasVerticalScroll ? h : 0;
					var k = this.x + g,
						l = this.y + h;
					(k > 0 || k < this.maxScrollX) && (k = this.options.bounce ? this.x + g / 3 : k > 0 ? 0 : this.maxScrollX), (l > 0 || l < this.maxScrollY) && (l = this.options.bounce ? this.y + h / 3 : l > 0 ? 0 : this.maxScrollY), this.requestAnimationFrame || this._updateTranslate(), this.direction = d.deltaX > 0 ? "right" : "left", this.moved = !0, this.x = k, this.y = l, a.trigger(this.scroller, "scroll", this)
				}
			},
			_flick: function(b) {
				if(this.moved) {
					b.stopPropagation();
					var c = b.detail;
					if(this._clearRequestAnimationFrame(), "dragend" !== b.type || !c.flick) {
						var d = Math.round(this.x),
							e = Math.round(this.y);
						if(this.isInTransition = !1, !this.resetPosition(this.options.bounceTime)) {
							if(this.scrollTo(d, e), "dragend" === b.type) return void a.trigger(this.scroller, "scrollend", this);
							var f = 0,
								g = "";
							return this.options.momentum && c.flickTime < 300 && (momentumX = this.hasHorizontalScroll ? this._momentum(this.x, c.flickDistanceX, c.flickTime, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
								destination: d,
								duration: 0
							}, momentumY = this.hasVerticalScroll ? this._momentum(this.y, c.flickDistanceY, c.flickTime, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
								destination: e,
								duration: 0
							}, d = momentumX.destination, e = momentumY.destination, f = Math.max(momentumX.duration, momentumY.duration), this.isInTransition = !0), d != this.x || e != this.y ? ((d > 0 || d < this.maxScrollX || e > 0 || e < this.maxScrollY) && (g = k.quadratic), void this.scrollTo(d, e, f, g)) : void a.trigger(this.scroller, "scrollend", this)
						}
					}
				}
			},
			_end: function(b) {
				this.needReset = !1, (!this.moved && this.needReset || b.type === a.EVENT_CANCEL) && this.resetPosition()
			},
			_transitionEnd: function(b) {
				b.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, a.trigger(this.scroller, "scrollend", this)))
			},
			_scrollend: function(b) {
				(0 === this.y && 0 === this.maxScrollY || Math.abs(this.y) > 0 && this.y <= this.maxScrollY) && a.trigger(this.scroller, "scrollbottom", this)
			},
			_resize: function() {
				var a = this;
				clearTimeout(a.resizeTimeout), a.resizeTimeout = setTimeout(function() {
					a.refresh()
				}, a.options.resizePolling)
			},
			_transitionTime: function(b) {
				if(b = b || 0, this.scrollerStyle.webkitTransitionDuration = b + "ms", this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = b + "ms"), this.options.fixedBadAndorid && !b && a.os.isBadAndroid && (this.scrollerStyle.webkitTransitionDuration = "0.001s", this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = "0.001s")), this.indicators)
					for(var c = this.indicators.length; c--;) this.indicators[c].transitionTime(b);
				b && (this.transitionTimer && this.transitionTimer.cancel(), this.transitionTimer = a.later(function() {
					a.trigger(this.scroller, "webkitTransitionEnd")
				}, b + 100, this))
			},
			_transitionTimingFunction: function(a) {
				if(this.scrollerStyle.webkitTransitionTimingFunction = a, this.parallaxElement && this.options.scrollY && (this.parallaxStyle.webkitTransitionDuration = a), this.indicators)
					for(var b = this.indicators.length; b--;) this.indicators[b].transitionTimingFunction(a)
			},
			_translate: function(a, b) {
				this.x = a, this.y = b
			},
			_clearRequestAnimationFrame: function() {
				this.requestAnimationFrame && (cancelAnimationFrame(this.requestAnimationFrame), this.requestAnimationFrame = null)
			},
			_updateTranslate: function() {
				var a = this;
				(a.x !== a.lastX || a.y !== a.lastY) && a.setTranslate(a.x, a.y), a.requestAnimationFrame = requestAnimationFrame(function() {
					a._updateTranslate()
				})
			},
			_createScrollBar: function(a) {
				var b = c.createElement("div"),
					d = c.createElement("div");
				return b.className = f + " " + a, d.className = g, b.appendChild(d), a === h ? (this.scrollbarY = b, this.scrollbarIndicatorY = d) : a === i && (this.scrollbarX = b, this.scrollbarIndicatorX = d), this.wrapper.appendChild(b), b
			},
			_preventDefaultException: function(a, b) {
				for(var c in b)
					if(b[c].test(a[c])) return !0;
				return !1
			},
			_reLayout: function() {
				if(this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.indicators.map(function(a) {
						a.refresh()
					}), this.options.snap && "string" == typeof this.options.snap) {
					var a = this.scroller.querySelectorAll(this.options.snap);
					this.itemLength = 0, this.snaps = [];
					for(var b = 0, c = a.length; c > b; b++) {
						var d = a[b];
						d.parentNode === this.scroller && (this.itemLength++, this.snaps.push(d))
					}
					this._initSnap()
				}
			},
			_momentum: function(a, b, c, e, f, g) {
				var h, i, j = parseFloat(Math.abs(b) / c);
				return g = g === d ? 6e-4 : g, h = a + j * j / (2 * g) * (0 > b ? -1 : 1), i = j / g, e > h ? (h = f ? e - f / 2.5 * (j / 8) : e, b = Math.abs(h - a), i = b / j) : h > 0 && (h = f ? f / 2.5 * (j / 8) : 0, b = Math.abs(a) + h, i = b / j), {
					destination: Math.round(h),
					duration: i
				}
			},
			_getTranslateStr: function(a, b) {
				return this.options.hardwareAccelerated ? "translate3d(" + a + "px," + b + "px,0px) " + this.translateZ : "translate(" + a + "px," + b + "px) "
			},
			setStopped: function(a) {
				this.stopped = !!a
			},
			setTranslate: function(b, c) {
				if(this.x = b, this.y = c, this.scrollerStyle.webkitTransform = this._getTranslateStr(b, c), this.parallaxElement && this.options.scrollY) {
					var d = c * this.options.parallaxRatio,
						e = 1 + d / ((this.parallaxHeight - d) / 2);
					e > 1 ? (this.parallaxImgStyle.opacity = 1 - d / 100 * this.options.parallaxRatio, this.parallaxStyle.webkitTransform = this._getTranslateStr(0, -d) + " scale(" + e + "," + e + ")") : (this.parallaxImgStyle.opacity = 1, this.parallaxStyle.webkitTransform = this._getTranslateStr(0, -1) + " scale(1,1)")
				}
				if(this.indicators)
					for(var f = this.indicators.length; f--;) this.indicators[f].updatePosition();
				this.lastX = this.x, this.lastY = this.y, a.trigger(this.scroller, "scroll", this)
			},
			reLayout: function() {
				this.wrapper.offsetHeight;
				var b = parseFloat(a.getStyles(this.wrapper, "padding-left")) || 0,
					c = parseFloat(a.getStyles(this.wrapper, "padding-right")) || 0,
					d = parseFloat(a.getStyles(this.wrapper, "padding-top")) || 0,
					e = parseFloat(a.getStyles(this.wrapper, "padding-bottom")) || 0,
					f = this.wrapper.clientWidth,
					g = this.wrapper.clientHeight;
				this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, this.wrapperWidth = f - b - c, this.wrapperHeight = g - d - e, this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0), this.maxScrollY = Math.min(this.wrapperHeight - this.scrollerHeight, 0), this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this._reLayout()
			},
			resetPosition: function(a) {
				var b = this.x,
					c = this.y;
				return a = a || 0, !this.hasHorizontalScroll || this.x > 0 ? b = 0 : this.x < this.maxScrollX && (b = this.maxScrollX), !this.hasVerticalScroll || this.y > 0 ? c = 0 : this.y < this.maxScrollY && (c = this.maxScrollY), b == this.x && c == this.y ? !1 : (this.scrollTo(b, c, a, this.options.scrollEasing), !0)
			},
			_reInit: function() {
				for(var a = this.wrapper.querySelectorAll("." + e), b = 0, c = a.length; c > b; b++)
					if(a[b].parentNode === this.wrapper) {
						this.scroller = a[b];
						break
					}
				this.scrollerStyle = this.scroller && this.scroller.style
			},
			refresh: function() {
				this._reInit(), this.reLayout(), a.trigger(this.scroller, "refresh", this), this.resetPosition()
			},
			scrollTo: function(a, b, c, d) {
				var d = d || k.circular;
				this.isInTransition = c > 0, this.isInTransition ? (this._clearRequestAnimationFrame(), this._transitionTimingFunction(d.style), this._transitionTime(c), this.setTranslate(a, b)) : this.setTranslate(a, b)
			},
			scrollToBottom: function(a, b) {
				a = a || this.options.scrollTime, this.scrollTo(0, this.maxScrollY, a, b)
			},
			gotoPage: function(a) {
				this._gotoPage(a)
			},
			destroy: function() {
				this._initEvent(!0), delete a.data[this.wrapper.getAttribute("data-scroll")], this.wrapper.setAttribute("data-scroll", "")
			}
		}),
		m = function(b, d) {
			this.wrapper = "string" == typeof d.el ? c.querySelector(d.el) : d.el, this.wrapperStyle = this.wrapper.style, this.indicator = this.wrapper.children[0], this.indicatorStyle = this.indicator.style, this.scroller = b, this.options = a.extend({
				listenX: !0,
				listenY: !0,
				fade: !1,
				speedRatioX: 0,
				speedRatioY: 0
			}, d), this.sizeRatioX = 1, this.sizeRatioY = 1, this.maxPosX = 0, this.maxPosY = 0, this.options.fade && (this.wrapperStyle.webkitTransform = this.scroller.translateZ, this.wrapperStyle.webkitTransitionDuration = this.options.fixedBadAndorid && a.os.isBadAndroid ? "0.001s" : "0ms", this.wrapperStyle.opacity = "0")
		};
	m.prototype = {
		handleEvent: function(a) {},
		transitionTime: function(b) {
			b = b || 0, this.indicatorStyle.webkitTransitionDuration = b + "ms", this.scroller.options.fixedBadAndorid && !b && a.os.isBadAndroid && (this.indicatorStyle.webkitTransitionDuration = "0.001s")
		},
		transitionTimingFunction: function(a) {
			this.indicatorStyle.webkitTransitionTimingFunction = a
		},
		refresh: function() {
			this.transitionTime(), this.options.listenX && !this.options.listenY ? this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? "block" : "none" : this.options.listenY && !this.options.listenX ? this.indicatorStyle.display = this.scroller.hasVerticalScroll ? "block" : "none" : this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? "block" : "none", this.wrapper.offsetHeight, this.options.listenX && (this.wrapperWidth = this.wrapper.clientWidth, this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8), this.indicatorStyle.width = this.indicatorWidth + "px", this.maxPosX = this.wrapperWidth - this.indicatorWidth, this.minBoundaryX = 0, this.maxBoundaryX = this.maxPosX, this.sizeRatioX = this.options.speedRatioX || this.scroller.maxScrollX && this.maxPosX / this.scroller.maxScrollX), this.options.listenY && (this.wrapperHeight = this.wrapper.clientHeight, this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8), this.indicatorStyle.height = this.indicatorHeight + "px", this.maxPosY = this.wrapperHeight - this.indicatorHeight, this.minBoundaryY = 0, this.maxBoundaryY = this.maxPosY, this.sizeRatioY = this.options.speedRatioY || this.scroller.maxScrollY && this.maxPosY / this.scroller.maxScrollY), this.updatePosition()
		},
		updatePosition: function() {
			var a = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
				b = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
			a < this.minBoundaryX ? (this.width = Math.max(this.indicatorWidth + a, 8), this.indicatorStyle.width = this.width + "px", a = this.minBoundaryX) : a > this.maxBoundaryX ? (this.width = Math.max(this.indicatorWidth - (a - this.maxPosX), 8), this.indicatorStyle.width = this.width + "px", a = this.maxPosX + this.indicatorWidth - this.width) : this.width != this.indicatorWidth && (this.width = this.indicatorWidth, this.indicatorStyle.width = this.width + "px"), b < this.minBoundaryY ? (this.height = Math.max(this.indicatorHeight + 3 * b, 8), this.indicatorStyle.height = this.height + "px", b = this.minBoundaryY) : b > this.maxBoundaryY ? (this.height = Math.max(this.indicatorHeight - 3 * (b - this.maxPosY), 8), this.indicatorStyle.height = this.height + "px", b = this.maxPosY + this.indicatorHeight - this.height) : this.height != this.indicatorHeight && (this.height = this.indicatorHeight, this.indicatorStyle.height = this.height + "px"), this.x = a, this.y = b, this.indicatorStyle.webkitTransform = this.scroller._getTranslateStr(a, b)
		},
		fade: function(a, b) {
			if(!b || this.visible) {
				clearTimeout(this.fadeTimeout), this.fadeTimeout = null;
				var c = a ? 250 : 500,
					d = a ? 0 : 300;
				a = a ? "1" : "0", this.wrapperStyle.webkitTransitionDuration = c + "ms", this.fadeTimeout = setTimeout(function(a) {
					this.wrapperStyle.opacity = a, this.visible = +a
				}.bind(this, a), d)
			}
		}
	}, a.Scroll = l, a.fn.scroll = function(b) {
		var c = [];
		return this.each(function() {
			var d = null,
				e = this,
				f = e.getAttribute("data-scroll");
			if(f) d = a.data[f];
			else {
				f = ++a.uuid;
				var g = a.extend({}, b);
				e.classList.contains("mui-segmented-control") && (g = a.extend(g, {
					scrollY: !1,
					scrollX: !0,
					indicators: !1,
					snap: ".mui-control-item"
				})), a.data[f] = d = new l(e, g), e.setAttribute("data-scroll", f)
			}
			c.push(d)
		}), 1 === c.length ? c[0] : c
	}
}(ming, window, document),
function(a, b) {
	var c = "mui-slider",
		d = "mui-slider-group",
		e = "mui-slider-loop",
		f = "mui-action-previous",
		g = "mui-action-next",
		h = "mui-slider-item",
		i = "mui-active",
		j = "." + h,
		k = ".mui-slider-progress-bar",
		l = a.Slider = a.Scroll.extend({
			init: function(b, c) {
				this._super(b, a.extend(!0, {
					fingers: 1,
					interval: 0,
					scrollY: !1,
					scrollX: !0,
					indicators: !1,
					scrollTime: 1e3,
					startX: !1,
					slideTime: 0,
					snap: j
				}, c)), this.options.startX
			},
			_init: function() {
				this._reInit(), this.scroller && (this.scrollerStyle = this.scroller.style, this.progressBar = this.wrapper.querySelector(k), this.progressBar && (this.progressBarWidth = this.progressBar.offsetWidth, this.progressBarStyle = this.progressBar.style), this._super(), this._initTimer())
			},
			_triggerSlide: function() {
				var b = this;
				b.isInTransition = !1;
				b.currentPage;
				b.slideNumber = b._fixedSlideNumber(), b.loop && (0 === b.slideNumber ? b.setTranslate(b.pages[1][0].x, 0) : b.slideNumber === b.itemLength - 3 && b.setTranslate(b.pages[b.itemLength - 2][0].x, 0)), b.lastSlideNumber != b.slideNumber && (b.lastSlideNumber = b.slideNumber, b.lastPage = b.currentPage, a.trigger(b.wrapper, "slide", {
					slideNumber: b.slideNumber
				})), b._initTimer()
			},
			_handleSlide: function(b) {
				var c = this;
				if(b.target === c.wrapper) {
					var d = b.detail;
					d.slideNumber = d.slideNumber || 0;
					for(var e = c.scroller.querySelectorAll(j), f = [], g = 0, h = e.length; h > g; g++) {
						var k = e[g];
						k.parentNode === c.scroller && f.push(k)
					}
					var l = d.slideNumber;
					if(c.loop && (l += 1), !c.wrapper.classList.contains("mui-segmented-control"))
						for(var g = 0, h = f.length; h > g; g++) {
							var k = f[g];
							k.parentNode === c.scroller && (g === l ? k.classList.add(i) : k.classList.remove(i))
						}
					var m = c.wrapper.querySelector(".mui-slider-indicator");
					if(m) {
						m.getAttribute("data-scroll") && a(m).scroll().gotoPage(d.slideNumber);
						var n = m.querySelectorAll(".mui-indicator");
						if(n.length > 0)
							for(var g = 0, h = n.length; h > g; g++) n[g].classList[g === d.slideNumber ? "add" : "remove"](i);
						else {
							var o = m.querySelector(".mui-number span");
							if(o) o.innerText = d.slideNumber + 1;
							else
								for(var p = m.querySelectorAll(".mui-control-item"), g = 0, h = p.length; h > g; g++) p[g].classList[g === d.slideNumber ? "add" : "remove"](i)
						}
					}
					b.stopPropagation()
				}
			},
			_handleTabShow: function(a) {
				var b = this;
				b.gotoItem(a.detail.tabNumber || 0, b.options.slideTime)
			},
			_handleIndicatorTap: function(a) {
				var b = this,
					c = a.target;
				(c.classList.contains(f) || c.classList.contains(g)) && (b[c.classList.contains(f) ? "prevItem" : "nextItem"](), a.stopPropagation())
			},
			_initEvent: function(b) {
				var c = this;
				c._super(b);
				var d = b ? "removeEventListener" : "addEventListener";
				c.wrapper[d]("slide", this), c.wrapper[d](a.eventName("shown", "tab"), this)
			},
			handleEvent: function(b) {
				switch(this._super(b), b.type) {
					case "slide":
						this._handleSlide(b);
						break;
					case a.eventName("shown", "tab"):
						~this.snaps.indexOf(b.target) && this._handleTabShow(b)
				}
			},
			_scrollend: function(a) {
				this._super(a), this._triggerSlide(a)
			},
			_drag: function(a) {
				this._super(a);
				var c = a.detail.direction;
				if("left" === c || "right" === c) {
					var d = this.wrapper.getAttribute("data-slidershowTimer");
					d && b.clearTimeout(d), a.stopPropagation()
				}
			},
			_initTimer: function() {
				var a = this,
					c = a.wrapper,
					d = a.options.interval,
					e = c.getAttribute("data-slidershowTimer");
				e && b.clearTimeout(e), d && (e = b.setTimeout(function() {
					c && ((c.offsetWidth || c.offsetHeight) && a.nextItem(!0), a._initTimer())
				}, d), c.setAttribute("data-slidershowTimer", e))
			},
			_fixedSlideNumber: function(a) {
				a = a || this.currentPage;
				var b = a.pageX;
				return this.loop && (b = 0 === a.pageX ? this.itemLength - 3 : a.pageX === this.itemLength - 1 ? 0 : a.pageX - 1), b
			},
			_reLayout: function() {
				this.hasHorizontalScroll = !0, this.loop = this.scroller.classList.contains(e), this._super()
			},
			_getScroll: function() {
				var b = a.parseTranslateMatrix(a.getStyles(this.scroller, "webkitTransform"));
				return b ? b.x : 0
			},
			_transitionEnd: function(b) {
				b.target === this.scroller && this.isInTransition && (this._transitionTime(), this.isInTransition = !1, a.trigger(this.wrapper, "scrollend", this))
			},
			_flick: function(a) {
				if(this.moved) {
					var b = a.detail,
						c = b.direction;
					this._clearRequestAnimationFrame(), this.isInTransition = !0,
						"flick" === a.type ? (b.deltaTime < 200 && (this.x = this._getPage(this.slideNumber + ("right" === c ? -1 : 1), !0).x), this.resetPosition(this.options.bounceTime)) : "dragend" !== a.type || b.flick || this.resetPosition(this.options.bounceTime), a.stopPropagation()
				}
			},
			_initSnap: function() {
				if(this.scrollerWidth = this.itemLength * this.scrollerWidth, this.maxScrollX = Math.min(this.wrapperWidth - this.scrollerWidth, 0), this._super(), this.currentPage.x) this.slideNumber = this._fixedSlideNumber(), this.lastSlideNumber = "undefined" == typeof this.lastSlideNumber ? this.slideNumber : this.lastSlideNumber;
				else {
					var a = this.pages[this.loop ? 1 : 0];
					if(a = a || this.pages[0], !a) return;
					this.currentPage = a[0], this.slideNumber = 0, this.lastSlideNumber = "undefined" == typeof this.lastSlideNumber ? 0 : this.lastSlideNumber
				}
				this.options.startX = this.currentPage.x || 0
			},
			_getSnapX: function(a) {
				return Math.max(-a, this.maxScrollX)
			},
			_getPage: function(a, b) {
				return this.loop ? a > this.itemLength - (b ? 2 : 3) ? (a = 1, time = 0) : (b ? -1 : 0) > a ? (a = this.itemLength - 2, time = 0) : a += 1 : (b || (a > this.itemLength - 1 ? (a = 0, time = 0) : 0 > a && (a = this.itemLength - 1, time = 0)), a = Math.min(Math.max(0, a), this.itemLength - 1)), this.pages[a][0]
			},
			_gotoItem: function(b, c) {
				this.currentPage = this._getPage(b, !0), this.scrollTo(this.currentPage.x, 0, c, this.options.scrollEasing), 0 === c && a.trigger(this.wrapper, "scrollend", this)
			},
			setTranslate: function(a, b) {
				this._super(a, b);
				var c = this.progressBar;
				c && (this.progressBarStyle.webkitTransform = this._getTranslateStr(-a * (this.progressBarWidth / this.wrapperWidth), 0))
			},
			resetPosition: function(a) {
				return a = a || 0, this.x > 0 ? this.x = 0 : this.x < this.maxScrollX && (this.x = this.maxScrollX), this.currentPage = this._nearestSnap(this.x), this.scrollTo(this.currentPage.x, 0, a, this.options.scrollEasing), !0
			},
			gotoItem: function(a, b) {
				this._gotoItem(a, "undefined" == typeof b ? this.options.scrollTime : b)
			},
			nextItem: function() {
				this._gotoItem(this.slideNumber + 1, this.options.scrollTime)
			},
			prevItem: function() {
				this._gotoItem(this.slideNumber - 1, this.options.scrollTime)
			},
			getSlideNumber: function() {
				return this.slideNumber || 0
			},
			_reInit: function() {
				for(var a = this.wrapper.querySelectorAll("." + d), b = 0, c = a.length; c > b; b++)
					if(a[b].parentNode === this.wrapper) {
						this.scroller = a[b];
						break
					}
				this.scrollerStyle = this.scroller && this.scroller.style, this.progressBar && (this.progressBarWidth = this.progressBar.offsetWidth, this.progressBarStyle = this.progressBar.style)
			},
			refresh: function(b) {
				b ? (a.extend(this.options, b), this._super(), this._initTimer()) : this._super()
			},
			destroy: function() {
				this._initEvent(!0), delete a.data[this.wrapper.getAttribute("data-slider")], this.wrapper.setAttribute("data-slider", "")
			}
		});
	a.fn.slider = function(b) {
		var d = null;
		return this.each(function() {
			var e = this;
			if(this.classList.contains(c) || (e = this.querySelector("." + c)), e && e.querySelector(j)) {
				var f = e.getAttribute("data-slider");
				f ? (d = a.data[f], d && b && d.refresh(b)) : (f = ++a.uuid, a.data[f] = d = new l(e, b), e.setAttribute("data-slider", f))
			}
		}), d
	}, a.ready(function() {
		a(".mui-slider").slider(), a(".mui-scroll-wrapper.mui-slider-indicator.mui-segmented-control").scroll({
			scrollY: !1,
			scrollX: !0,
			indicators: !1,
			snap: ".mui-control-item"
		})
	})
}(ming, window);
//	mui.zoom.js
(function($, window) {
	var CLASS_ZOOM = $.className('zoom');
	var CLASS_ZOOM_SCROLLER = $.className('zoom-scroller');

	var SELECTOR_ZOOM = '.' + CLASS_ZOOM;
	var SELECTOR_ZOOM_SCROLLER = '.' + CLASS_ZOOM_SCROLLER;

	var EVENT_PINCH_START = 'pinchstart';
	var EVENT_PINCH = 'pinch';
	var EVENT_PINCH_END = 'pinchend';
	if('ongesturestart' in window) {
		EVENT_PINCH_START = 'gesturestart';
		EVENT_PINCH = 'gesturechange';
		EVENT_PINCH_END = 'gestureend';
	}
	$.Zoom = function(element, options) {
		var zoom = this;

		zoom.options = $.extend($.Zoom.defaults, options);

		zoom.wrapper = zoom.element = element;
		zoom.scroller = element.querySelector(SELECTOR_ZOOM_SCROLLER);
		zoom.scrollerStyle = zoom.scroller && zoom.scroller.style;

		zoom.zoomer = element.querySelector(SELECTOR_ZOOM);
		zoom.zoomerStyle = zoom.zoomer && zoom.zoomer.style;

		zoom.init = function() {
			//自动启用
			$.options.gestureConfig.pinch = true;
			$.options.gestureConfig.doubletap = true;
			zoom.initEvents();
		};

		zoom.initEvents = function(detach) {
			var action = detach ? 'removeEventListener' : 'addEventListener';
			var target = zoom.scroller;

			target[action](EVENT_PINCH_START, zoom.onPinchstart);
			target[action](EVENT_PINCH, zoom.onPinch);
			target[action](EVENT_PINCH_END, zoom.onPinchend);

			target[action]('touchstart', zoom.onTouchstart);
			target[action]('touchmove', zoom.onTouchMove);
			target[action]('touchcancel', zoom.onTouchEnd);
			target[action]('touchend', zoom.onTouchEnd);

			target[action]('drag', function(e) {
				if(imageIsMoved || isGesturing) {
					e.stopPropagation();
				}
			});
			target[action]('doubletap', function(e) {
				zoom.toggleZoom(e.detail.center);
			});
		};
		zoom.transition = function(style, time) {
			time = time || 0;
			style['webkitTransitionDuration'] = time + 'ms';
			return zoom;
		};
		zoom.translate = function(style, x, y) {
			x = x || 0;
			y = y || 0;
			style['webkitTransform'] = 'translate3d(' + x + 'px,' + y + 'px,0px)';
			return zoom;
		};
		zoom.scale = function(style, scale) {
			scale = scale || 1;
			style['webkitTransform'] = 'translate3d(0,0,0) scale(' + scale + ')';
			return zoom;
		};
		zoom.scrollerTransition = function(time) {
			return zoom.transition(zoom.scrollerStyle, time);
		};
		zoom.scrollerTransform = function(x, y) {
			return zoom.translate(zoom.scrollerStyle, x, y);
		};
		zoom.zoomerTransition = function(time) {
			return zoom.transition(zoom.zoomerStyle, time);
		};
		zoom.zoomerTransform = function(scale) {
			return zoom.scale(zoom.zoomerStyle, scale);
		};

		// Gestures
		var scale = 1,
			currentScale = 1,
			isScaling = false,
			isGesturing = false;
		zoom.onPinchstart = function(e) {
			isGesturing = true;
		};
		zoom.onPinch = function(e) {
			if(!isScaling) {
				zoom.zoomerTransition(0);
				isScaling = true;
			}
			scale = (e.detail ? e.detail.scale : e.scale) * currentScale;
			if(scale > zoom.options.maxZoom) {
				scale = zoom.options.maxZoom - 1 + Math.pow((scale - zoom.options.maxZoom + 1), 0.5);
			}
			if(scale < zoom.options.minZoom) {
				scale = zoom.options.minZoom + 1 - Math.pow((zoom.options.minZoom - scale + 1), 0.5);
			}
			zoom.zoomerTransform(scale);
		};
		zoom.onPinchend = function(e) {
			scale = Math.max(Math.min(scale, zoom.options.maxZoom), zoom.options.minZoom);
			zoom.zoomerTransition(zoom.options.speed).zoomerTransform(scale);
			currentScale = scale;
			isScaling = false;
		};
		zoom.setZoom = function(newScale) {
			scale = currentScale = newScale;
			zoom.scrollerTransition(zoom.options.speed).scrollerTransform(0, 0);
			zoom.zoomerTransition(zoom.options.speed).zoomerTransform(scale);
		};
		zoom.toggleZoom = function(position, speed) {
			if(typeof position === 'number') {
				speed = position;
				position = undefined;
			}
			speed = typeof speed === 'undefined' ? zoom.options.speed : speed;
			if(scale && scale !== 1) {
				scale = currentScale = 1;
				zoom.scrollerTransition(speed).scrollerTransform(0, 0);
			} else {
				scale = currentScale = zoom.options.maxZoom;
				if(position) {
					var offset = $.offset(zoom.zoomer);
					var top = offset.top;
					var left = offset.left;
					var offsetX = (position.x - left) * scale;
					var offsetY = (position.y - top) * scale;
					this._cal();
					if(offsetX >= imageMaxX && offsetX <= (imageMaxX + wrapperWidth)) { //center
						offsetX = imageMaxX - offsetX + wrapperWidth / 2;
					} else if(offsetX < imageMaxX) { //left
						offsetX = imageMaxX - offsetX + wrapperWidth / 2;
					} else if(offsetX > (imageMaxX + wrapperWidth)) { //right
						offsetX = imageMaxX + wrapperWidth - offsetX - wrapperWidth / 2;
					}
					if(offsetY >= imageMaxY && offsetY <= (imageMaxY + wrapperHeight)) { //middle
						offsetY = imageMaxY - offsetY + wrapperHeight / 2;
					} else if(offsetY < imageMaxY) { //top
						offsetY = imageMaxY - offsetY + wrapperHeight / 2;
					} else if(offsetY > (imageMaxY + wrapperHeight)) { //bottom
						offsetY = imageMaxY + wrapperHeight - offsetY - wrapperHeight / 2;
					}
					offsetX = Math.min(Math.max(offsetX, imageMinX), imageMaxX);
					offsetY = Math.min(Math.max(offsetY, imageMinY), imageMaxY);
					zoom.scrollerTransition(speed).scrollerTransform(offsetX, offsetY);
				} else {
					zoom.scrollerTransition(speed).scrollerTransform(0, 0);
				}
			}
			zoom.zoomerTransition(speed).zoomerTransform(scale);
		};

		zoom._cal = function() {
			wrapperWidth = zoom.wrapper.offsetWidth;
			wrapperHeight = zoom.wrapper.offsetHeight;
			imageWidth = zoom.zoomer.offsetWidth;
			imageHeight = zoom.zoomer.offsetHeight;
			var scaledWidth = imageWidth * scale;
			var scaledHeight = imageHeight * scale;
			imageMinX = Math.min((wrapperWidth / 2 - scaledWidth / 2), 0);
			imageMaxX = -imageMinX;
			imageMinY = Math.min((wrapperHeight / 2 - scaledHeight / 2), 0);
			imageMaxY = -imageMinY;
		};

		var wrapperWidth, wrapperHeight, imageIsTouched, imageIsMoved, imageCurrentX, imageCurrentY, imageMinX, imageMinY, imageMaxX, imageMaxY, imageWidth, imageHeight, imageTouchesStart = {},
			imageTouchesCurrent = {},
			imageStartX, imageStartY, velocityPrevPositionX, velocityPrevTime, velocityX, velocityPrevPositionY, velocityY;

		zoom.onTouchstart = function(e) {
			e.preventDefault();
			imageIsTouched = true;
			imageTouchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
			imageTouchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
		};
		zoom.onTouchMove = function(e) {
			e.preventDefault();
			if(!imageIsTouched) return;
			if(!imageIsMoved) {
				wrapperWidth = zoom.wrapper.offsetWidth;
				wrapperHeight = zoom.wrapper.offsetHeight;
				imageWidth = zoom.zoomer.offsetWidth;
				imageHeight = zoom.zoomer.offsetHeight;
				var translate = $.parseTranslateMatrix($.getStyles(zoom.scroller, 'webkitTransform'));
				imageStartX = translate.x || 0;
				imageStartY = translate.y || 0;
				zoom.scrollerTransition(0);
			}
			var scaledWidth = imageWidth * scale;
			var scaledHeight = imageHeight * scale;

			if(scaledWidth < wrapperWidth && scaledHeight < wrapperHeight) return;

			imageMinX = Math.min((wrapperWidth / 2 - scaledWidth / 2), 0);
			imageMaxX = -imageMinX;
			imageMinY = Math.min((wrapperHeight / 2 - scaledHeight / 2), 0);
			imageMaxY = -imageMinY;

			imageTouchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
			imageTouchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;

			if(!imageIsMoved && !isScaling) {
				//				if (Math.abs(imageTouchesCurrent.y - imageTouchesStart.y) < Math.abs(imageTouchesCurrent.x - imageTouchesStart.x)) {
				//TODO 此处需要优化，当遇到长图，需要上下滚动时，下列判断会导致滚动不流畅
				if(
					(Math.floor(imageMinX) === Math.floor(imageStartX) && imageTouchesCurrent.x < imageTouchesStart.x) ||
					(Math.floor(imageMaxX) === Math.floor(imageStartX) && imageTouchesCurrent.x > imageTouchesStart.x)
				) {
					imageIsTouched = false;
					return;
				}
				//				}
			}
			imageIsMoved = true;
			imageCurrentX = imageTouchesCurrent.x - imageTouchesStart.x + imageStartX;
			imageCurrentY = imageTouchesCurrent.y - imageTouchesStart.y + imageStartY;

			if(imageCurrentX < imageMinX) {
				imageCurrentX = imageMinX + 1 - Math.pow((imageMinX - imageCurrentX + 1), 0.8);
			}
			if(imageCurrentX > imageMaxX) {
				imageCurrentX = imageMaxX - 1 + Math.pow((imageCurrentX - imageMaxX + 1), 0.8);
			}

			if(imageCurrentY < imageMinY) {
				imageCurrentY = imageMinY + 1 - Math.pow((imageMinY - imageCurrentY + 1), 0.8);
			}
			if(imageCurrentY > imageMaxY) {
				imageCurrentY = imageMaxY - 1 + Math.pow((imageCurrentY - imageMaxY + 1), 0.8);
			}

			//Velocity
			if(!velocityPrevPositionX) velocityPrevPositionX = imageTouchesCurrent.x;
			if(!velocityPrevPositionY) velocityPrevPositionY = imageTouchesCurrent.y;
			if(!velocityPrevTime) velocityPrevTime = $.now();
			velocityX = (imageTouchesCurrent.x - velocityPrevPositionX) / ($.now() - velocityPrevTime) / 2;
			velocityY = (imageTouchesCurrent.y - velocityPrevPositionY) / ($.now() - velocityPrevTime) / 2;
			if(Math.abs(imageTouchesCurrent.x - velocityPrevPositionX) < 2) velocityX = 0;
			if(Math.abs(imageTouchesCurrent.y - velocityPrevPositionY) < 2) velocityY = 0;
			velocityPrevPositionX = imageTouchesCurrent.x;
			velocityPrevPositionY = imageTouchesCurrent.y;
			velocityPrevTime = $.now();

			zoom.scrollerTransform(imageCurrentX, imageCurrentY);
		};
		zoom.onTouchEnd = function(e) {
			if(!e.touches.length) {
				isGesturing = false;
			}
			if(!imageIsTouched || !imageIsMoved) {
				imageIsTouched = false;
				imageIsMoved = false;
				return;
			}
			imageIsTouched = false;
			imageIsMoved = false;
			var momentumDurationX = 300;
			var momentumDurationY = 300;
			var momentumDistanceX = velocityX * momentumDurationX;
			var newPositionX = imageCurrentX + momentumDistanceX;
			var momentumDistanceY = velocityY * momentumDurationY;
			var newPositionY = imageCurrentY + momentumDistanceY;

			if(velocityX !== 0) momentumDurationX = Math.abs((newPositionX - imageCurrentX) / velocityX);
			if(velocityY !== 0) momentumDurationY = Math.abs((newPositionY - imageCurrentY) / velocityY);
			var momentumDuration = Math.max(momentumDurationX, momentumDurationY);

			imageCurrentX = newPositionX;
			imageCurrentY = newPositionY;

			var scaledWidth = imageWidth * scale;
			var scaledHeight = imageHeight * scale;
			imageMinX = Math.min((wrapperWidth / 2 - scaledWidth / 2), 0);
			imageMaxX = -imageMinX;
			imageMinY = Math.min((wrapperHeight / 2 - scaledHeight / 2), 0);
			imageMaxY = -imageMinY;
			imageCurrentX = Math.max(Math.min(imageCurrentX, imageMaxX), imageMinX);
			imageCurrentY = Math.max(Math.min(imageCurrentY, imageMaxY), imageMinY);

			zoom.scrollerTransition(momentumDuration).scrollerTransform(imageCurrentX, imageCurrentY);
		};
		zoom.destory = function() {
			zoom.initEvents(true); //detach
			delete $.data[zoom.wrapper.getAttribute('data-zoomer')];
			zoom.wrapper.setAttribute('data-zoomer', '');
		}
		zoom.init();
		return zoom;
	};
	$.Zoom.defaults = {
		speed: 300,
		maxZoom: 3,
		minZoom: 1,
	};
	$.fn.zoom = function(options) {
		var zoomApis = [];
		this.each(function() {
			var zoomApi = null;
			var self = this;
			var id = self.getAttribute('data-zoomer');
			if(!id) {
				id = ++$.uuid;
				$.data[id] = zoomApi = new $.Zoom(self, options);
				self.setAttribute('data-zoomer', id);
			} else {
				zoomApi = $.data[id];
			}
			zoomApis.push(zoomApi);
		});
		return zoomApis.length === 1 ? zoomApis[0] : zoomApis;
	};
})(ming, window);