/*! Siteapp-template yi-ecom-template-static - v0.1.0 - */ (function(t){String.prototype.trim===t&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===t&&(Array.prototype.reduce=function(e){if(this===void 0||null===this)throw new TypeError;var n,i=Object(this),r=i.length>>>0,o=0;if("function"!=typeof e)throw new TypeError;if(0==r&&1==arguments.length)throw new TypeError;if(arguments.length>=2)n=arguments[1];else for(;;){if(o in i){n=i[o++];break}if(++o>=r)throw new TypeError}for(;r>o;)o in i&&(n=e.call(t,n,i[o],o,i)),o++;return n})})();var Zepto=function(){function t(t){return"[object Function]"==L.call(t)}function e(t){return t instanceof Object}function n(e){var n,i;if("[object Object]"!==L.call(e))return!1;if(i=t(e.constructor)&&e.constructor.prototype,!i||!hasOwnProperty.call(i,"isPrototypeOf"))return!1;for(n in e);return n===m||hasOwnProperty.call(e,n)}function i(t){return t instanceof Array}function r(t){return"number"==typeof t.length}function o(t){return t.filter(function(t){return t!==m&&null!==t})}function s(t){return t.length>0?[].concat.apply([],t):t}function a(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in _?_[t]:_[t]=RegExp("(^|\\s)"+t+"(\\s|$)")}function c(t,e){return"number"!=typeof e||Y[a(t)]?e:e+"px"}function u(t){var e,n;return E[t]||(e=T.createElement(t),T.body.appendChild(e),n=C(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),E[t]=n),E[t]}function f(t,e){return e===m?g(t):g(t).filter(e)}function h(e,n,i,r){return t(n)?n.call(e,i,r):n}function p(t,e,n){var i=t%2?e:e.parentNode;i?i.insertBefore(n,t?1==t?i.firstChild:2==t?e:null:e.nextSibling):g(n).remove()}function d(t,e){e(t);for(var n in t.childNodes)d(t.childNodes[n],e)}var m,v,g,y,x,b,w=[],S=w.slice,T=window.document,E={},_={},C=T.defaultView.getComputedStyle,Y={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},k=/^\s*<(\w+|!)[^>]*>/,A=[1,3,8,9,11],O=["after","prepend","before","append"],P=T.createElement("table"),j=T.createElement("tr"),X={tr:T.createElement("tbody"),tbody:P,thead:P,tfoot:P,td:j,th:j,"*":T.createElement("div")},D=/complete|loaded|interactive/,M=/^\.([\w-]+)$/,N=/^#([\w-]+)$/,R=/^[\w-]+$/,L={}.toString,q={},z=T.createElement("div");return q.matches=function(t,e){if(!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=z).appendChild(t),i=~q.qsa(r,e).indexOf(t),o&&z.removeChild(t),i},x=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},b=function(t){return t.filter(function(e,n){return t.indexOf(e)==n})},q.fragment=function(t,e){e===m&&(e=k.test(t)&&RegExp.$1),e in X||(e="*");var n=X[e];return n.innerHTML=""+t,g.each(S.call(n.childNodes),function(){n.removeChild(this)})},q.Z=function(t,e){return t=t||[],t.__proto__=arguments.callee.prototype,t.selector=e||"",t},q.isZ=function(t){return t instanceof q.Z},q.init=function(e,r){if(e){if(t(e))return g(T).ready(e);if(q.isZ(e))return e;var s;if(i(e))s=o(e);else if(n(e))s=[g.extend({},e)],e=null;else if(A.indexOf(e.nodeType)>=0||e===window)s=[e],e=null;else if(k.test(e))s=q.fragment(e.trim(),RegExp.$1),e=null;else{if(r!==m)return g(r).find(e);s=q.qsa(T,e)}return q.Z(s,e)}return q.Z()},g=function(t,e){return q.init(t,e)},g.extend=function(t){return S.call(arguments,1).forEach(function(e){for(v in e)e[v]!==m&&(t[v]=e[v])}),t},q.qsa=function(t,e){var n;return t===T&&N.test(e)?(n=t.getElementById(RegExp.$1))?[n]:w:1!==t.nodeType&&9!==t.nodeType?w:S.call(M.test(e)?t.getElementsByClassName(RegExp.$1):R.test(e)?t.getElementsByTagName(e):t.querySelectorAll(e))},g.isFunction=t,g.isObject=e,g.isArray=i,g.isPlainObject=n,g.inArray=function(t,e,n){return w.indexOf.call(e,t,n)},g.trim=function(t){return t.trim()},g.uuid=0,g.map=function(t,e){var n,i,o,a=[];if(r(t))for(i=0;t.length>i;i++)n=e(t[i],i),null!=n&&a.push(n);else for(o in t)n=e(t[o],o),null!=n&&a.push(n);return s(a)},g.each=function(t,e){var n,i;if(r(t)){for(n=0;t.length>n;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},g.fn={forEach:w.forEach,reduce:w.reduce,push:w.push,indexOf:w.indexOf,concat:w.concat,map:function(t){return g.map(this,function(e,n){return t.call(e,n,e)})},slice:function(){return g(S.apply(this,arguments))},ready:function(t){return D.test(T.readyState)?t(g):T.addEventListener("DOMContentLoaded",function(){t(g)},!1),this},get:function(t){return t===m?S.call(this):this[t]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return this.forEach(function(e,n){t.call(e,n,e)}),this},filter:function(t){return g([].filter.call(this,function(e){return q.matches(e,t)}))},add:function(t,e){return g(b(this.concat(g(t,e))))},is:function(t){return this.length>0&&q.matches(this[0],t)},not:function(e){var n=[];if(t(e)&&e.call!==m)this.each(function(t){e.call(this,t)||n.push(this)});else{var i="string"==typeof e?this.filter(e):r(e)&&t(e.item)?S.call(e):g(e);this.forEach(function(t){0>i.indexOf(t)&&n.push(t)})}return g(n)},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!e(t)?t:g(t)},last:function(){var t=this[this.length-1];return t&&!e(t)?t:g(t)},find:function(t){var e;return e=1==this.length?q.qsa(this[0],t):this.map(function(){return q.qsa(this,t)}),g(e)},closest:function(t,e){for(var n=this[0];n&&!q.matches(n,t);)n=n!==e&&n!==T&&n.parentNode;return g(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=g.map(n,function(t){return(t=t.parentNode)&&t!==T&&0>e.indexOf(t)?(e.push(t),t):m});return f(e,t)},parent:function(t){return f(b(this.pluck("parentNode")),t)},children:function(t){return f(this.map(function(){return S.call(this.children)}),t)},siblings:function(t){return f(this.map(function(t,e){return S.call(e.parentNode.children).filter(function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return this.map(function(){return this[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=null),"none"==C(this,"").getPropertyValue("display")&&(this.style.display=u(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return this.each(function(){g(this).wrapAll(g(t)[0].cloneNode(!1))})},wrapAll:function(t){return this[0]&&(g(this[0]).before(t=g(t)),t.append(this)),this},unwrap:function(){return this.parent().each(function(){g(this).replaceWith(g(this).children())}),this},clone:function(){return g(this.map(function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return(t===m?"none"==this.css("display"):t)?this.show():this.hide()},prev:function(){return g(this.pluck("previousElementSibling"))},next:function(){return g(this.pluck("nextElementSibling"))},html:function(t){return t===m?this.length>0?this[0].innerHTML:null:this.each(function(e){var n=this.innerHTML;g(this).empty().append(h(this,t,e,n))})},text:function(t){return t===m?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=t})},attr:function(t,n){var i;return"string"==typeof t&&n===m?0==this.length||1!==this[0].nodeType?m:"value"==t&&"INPUT"==this[0].nodeName?this.val():!(i=this[0].getAttribute(t))&&t in this[0]?this[0][t]:i:this.each(function(i){if(1===this.nodeType)if(e(t))for(v in t)this.setAttribute(v,t[v]);else this.setAttribute(t,h(this,n,i,this.getAttribute(t)))})},removeAttr:function(t){return this.each(function(){1===this.nodeType&&this.removeAttribute(t)})},prop:function(t,e){return e===m?this[0]?this[0][t]:m:this.each(function(n){this[t]=h(this,e,n,this[t])})},data:function(t,e){var n=this.attr("data-"+a(t),e);return null!==n?n:m},val:function(t){return t===m?this.length>0?this[0].value:m:this.each(function(e){this.value=h(this,t,e,this.value)})},offset:function(){if(0==this.length)return null;var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:t.width,height:t.height}},css:function(t,e){if(e===m&&"string"==typeof t)return 0==this.length?m:this[0].style[x(t)]||C(this[0],"").getPropertyValue(t);var n="";for(v in t)"string"==typeof t[v]&&""==t[v]?this.each(function(){this.style.removeProperty(a(v))}):n+=a(v)+":"+c(v,t[v])+";";return"string"==typeof t&&(""==e?this.each(function(){this.style.removeProperty(a(t))}):n=a(t)+":"+c(t,e)),this.each(function(){this.style.cssText+=";"+n})},index:function(t){return t?this.indexOf(g(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return 1>this.length?!1:l(t).test(this[0].className)},addClass:function(t){return this.each(function(e){y=[];var n=this.className,i=h(this,t,e,n);i.split(/\s+/g).forEach(function(t){g(this).hasClass(t)||y.push(t)},this),y.length&&(this.className+=(n?" ":"")+y.join(" "))})},removeClass:function(t){return this.each(function(e){return t===m?this.className="":(y=this.className,h(this,t,e,y).split(/\s+/g).forEach(function(t){y=y.replace(l(t)," ")}),this.className=y.trim(),m)})},toggleClass:function(t,e){return this.each(function(n){var i=h(this,t,n,this.className);(e===m?!g(this).hasClass(i):e)?g(this).addClass(i):g(this).removeClass(i)})}},["width","height"].forEach(function(t){g.fn[t]=function(e){var n,i=t.replace(/./,function(t){return t[0].toUpperCase()});return e===m?this[0]==window?window["inner"+i]:this[0]==T?T.documentElement["offset"+i]:(n=this.offset())&&n[t]:this.each(function(n){var i=g(this);i.css(t,h(this,e,n,i[t]()))})}}),O.forEach(function(t,n){g.fn[t]=function(){var t=g.map(arguments,function(t){return e(t)?t:q.fragment(t)});if(1>t.length)return this;var i=this.length,r=i>1,o=2>n;return this.each(function(e,s){for(var a=0;t.length>a;a++){var l=t[o?t.length-a-1:a];d(l,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||window.eval.call(window,t.innerHTML)}),r&&i-1>e&&(l=l.cloneNode(!0)),p(n,s,l)}})},g.fn[n%2?t+"To":"insert"+(n?"Before":"After")]=function(e){return g(e)[t](this),this}}),q.Z.prototype=g.fn,q.camelize=x,q.uniq=b,g.zepto=q,g}();window.Zepto=Zepto,"$"in window||(window.$=Zepto),function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,s){if(n=i(n),n.ns)var a=r(n.ns);return(u[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!a.test(t.ns)||o&&e(t.fn)!==e(o)||s&&t.sel!=s)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function r(t){return RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(e,n,i){t.isObject(e)?t.each(e,i):e.split(/\s/).forEach(function(t){i(t,n)})}function s(n,r,s,a,l,c){c=!!c;var f=e(n),h=u[f]||(u[f]=[]);o(r,s,function(e,r){var o=l&&l(r,e),s=o||r,u=function(t){var e=s.apply(n,[t].concat(t.data));return e===!1&&t.preventDefault(),e},f=t.extend(i(e),{fn:r,proxy:u,sel:a,del:o,i:h.length});h.push(f),n.addEventListener(f.e,u,c)})}function a(t,i,r,s){var a=e(t);o(i||"",r,function(e,i){n(t,e,i,s).forEach(function(e){delete u[a][e.i],t.removeEventListener(e.e,e.proxy,!1)})})}function l(e){var n=t.extend({originalEvent:e},e);return t.each(m,function(t,i){n[t]=function(){return this[i]=p,e[t].apply(e,arguments)},n[i]=d}),n}function c(t){if(!("defaultPrevented"in t)){t.defaultPrevented=!1;var e=t.preventDefault;t.preventDefault=function(){this.defaultPrevented=!0,e.call(this)}}}var u=(t.zepto.qsa,{}),f=1,h={};h.click=h.mousedown=h.mouseup=h.mousemove="MouseEvents",t.event={add:s,remove:a},t.proxy=function(n,i){if(t.isFunction(n)){var r=function(){return n.apply(i,arguments)};return r._zid=e(n),r}if("string"==typeof i)return t.proxy(n[i],n);throw new TypeError("expected function")},t.fn.bind=function(t,e){return this.each(function(){s(this,t,e)})},t.fn.unbind=function(t,e){return this.each(function(){a(this,t,e)})},t.fn.one=function(t,e){return this.each(function(n,i){s(this,t,e,null,function(t,e){return function(){var n=t.apply(i,arguments);return a(i,e,t),n}})})};var p=function(){return!0},d=function(){return!1},m={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(e,n,i){var r=!1;return("blur"==n||"focus"==n)&&(t.iswebkit?n="blur"==n?"focusout":"focus"==n?"focusin":n:r=!0),this.each(function(o,a){s(a,n,i,e,function(n){return function(i){var r,o=t(i.target).closest(e,a).get(0);return o?(r=t.extend(l(i),{currentTarget:o,liveFired:a}),n.apply(o,[r].concat([].slice.call(arguments,1)))):void 0}},r)})},t.fn.undelegate=function(t,e,n){return this.each(function(){a(this,e,n,t)})},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,i){return void 0==n||t.isFunction(n)?this.bind(e,n):this.delegate(n,e,i)},t.fn.off=function(e,n,i){return void 0==n||t.isFunction(n)?this.unbind(e,n):this.undelegate(n,e,i)},t.fn.trigger=function(e,n){return"string"==typeof e&&(e=t.Event(e)),c(e),e.data=n,this.each(function(){"dispatchEvent"in this&&this.dispatchEvent(e)})},t.fn.triggerHandler=function(e,i){var r,o;return this.each(function(s,a){r=l("string"==typeof e?t.Event(e):e),r.data=i,r.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return this.bind(e,t)}}),["focus","blur"].forEach(function(e){t.fn[e]=function(t){if(t)this.bind(e,t);else if(this.length)try{this.get(0)[e]()}catch(n){}return this}}),t.Event=function(t,e){var n=document.createEvent(h[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0,null,null,null,null,null,null,null,null,null,null,null,null),n}}(Zepto),function(t){function e(t){var e=this.os={},n=this.browser={},i=t.match(/WebKit\/([\d.]+)/),r=t.match(/(Android)\s+([\d.]+)/),o=t.match(/(iPad).*OS\s([\d_]+)/),s=!o&&t.match(/(iPhone\sOS)\s([\d_]+)/),a=t.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),l=a&&t.match(/TouchPad/),c=t.match(/Kindle\/([\d.]+)/),u=t.match(/Silk\/([\d._]+)/),f=t.match(/(BlackBerry).*Version\/([\d.]+)/);(n.webkit=!!i)&&(n.version=i[1]),r&&(e.android=!0,e.version=r[2]),s&&(e.ios=e.iphone=!0,e.version=s[2].replace(/_/g,".")),o&&(e.ios=e.ipad=!0,e.version=o[2].replace(/_/g,".")),a&&(e.webos=!0,e.version=a[2]),l&&(e.touchpad=!0),f&&(e.blackberry=!0,e.version=f[2]),c&&(e.kindle=!0,e.version=c[1]),u&&(n.silk=!0,n.version=u[1]),!u&&e.android&&t.match(/Kindle Fire/)&&(n.silk=!0)}e.call(t,navigator.userAgent),t.__detect=e}(Zepto),function(t,e){function n(t){return t.toLowerCase()}function i(t){return r?r+t:n(t)}var r,o="",s={Webkit:"webkit",Moz:"",O:"o",ms:"MS"},a=window.document,l=a.createElement("div"),c=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,u={};t.each(s,function(t,i){return l.style[t+"TransitionProperty"]!==e?(o="-"+n(t)+"-",r=i,!1):e}),u[o+"transition-property"]=u[o+"transition-duration"]=u[o+"transition-timing-function"]=u[o+"animation-name"]=u[o+"animation-duration"]="",t.fx={off:r===e&&l.style.transitionProperty===e,cssPrefix:o,transitionEnd:i("TransitionEnd"),animationEnd:i("AnimationEnd")},t.fn.animate=function(e,n,i,r){return t.isObject(n)&&(i=n.easing,r=n.complete,n=n.duration),n&&(n/=1e3),this.anim(e,n,i,r)},t.fn.anim=function(n,i,r,s){var a,l,f,h={},p=this,d=t.fx.transitionEnd;if(i===e&&(i=.4),t.fx.off&&(i=0),"string"==typeof n)h[o+"animation-name"]=n,h[o+"animation-duration"]=i+"s",d=t.fx.animationEnd;else{for(l in n)c.test(l)?(a||(a=[]),a.push(l+"("+n[l]+")")):h[l]=n[l];a&&(h[o+"transform"]=a.join(" ")),t.fx.off||"object"!=typeof n||(h[o+"transition-property"]=Object.keys(n).join(", "),h[o+"transition-duration"]=i+"s",h[o+"transition-timing-function"]=r||"linear")}return f=function(n){if(n!==e){if(n.target!==n.currentTarget)return;t(n.target).unbind(d,arguments.callee)}t(this).css(u),s&&s.call(this)},i>0&&this.bind(d,f),setTimeout(function(){p.css(h),0>=i&&setTimeout(function(){p.each(function(){f.call(this)})},0)},0),this},l=null}(Zepto),function(t){function e(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.defaultPrevented}function n(t,n,i,r){return t.global?e(n||y,i,r):void 0}function i(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function r(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var i=e.context;return e.beforeSend.call(i,t,e)===!1||n(e,i,"ajaxBeforeSend",[t,e])===!1?!1:(n(e,i,"ajaxSend",[t,e]),void 0)}function s(t,e,i){var r=i.context,o="success";i.success.call(r,t,o,e),n(i,r,"ajaxSuccess",[e,i,t]),l(o,e,i)}function a(t,e,i,r){var o=r.context;r.error.call(o,i,e,t),n(r,o,"ajaxError",[i,r,t]),l(e,i,r)}function l(t,e,i){var o=i.context;i.complete.call(o,e,t),n(i,o,"ajaxComplete",[e,i]),r(i)}function c(){}function u(t){return t&&(t==T?"html":t==S?"json":b.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){g(e.data)&&(e.data=t.param(e.data)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data))}function p(e,n,i,r){var o=t.isArray(n);t.each(n,function(n,s){r&&(n=i?r:r+"["+(o?"":n)+"]"),!r&&o?e.add(s.name,s.value):(i?t.isArray(s):g(s))?p(e,s,i,n):e.add(n,s)})}var d,m,v=0,g=t.isObject,y=window.document,x=/)<[^<]*)*<\/script>/gi,b=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,S="application/json",T="text/html",E=/^\s*$/;t.active=0,t.ajaxJSONP=function(e){var n,i="jsonp"+ ++v,r=y.createElement("script"),o=function(){t(r).remove(),i in window&&(window[i]=c),l("abort",a,e)},a={abort:o};return e.error&&(r.onerror=function(){a.abort(),e.error()}),window[i]=function(o){clearTimeout(n),t(r).remove(),delete window[i],s(o,a,e)},h(e),r.src=e.url.replace(/=\?/,"="+i),t("head").append(r),e.timeout>0&&(n=setTimeout(function(){a.abort(),l("timeout",a,e)},e.timeout)),a},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript",json:S,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0},t.ajax=function(e){var n=t.extend({},e||{});for(d in t.ajaxSettings)void 0===n[d]&&(n[d]=t.ajaxSettings[d]);i(n),n.crossDomain||(n.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(n.url)&&RegExp.$2!=window.location.host);var r=n.dataType,l=/=\?/.test(n.url);if("jsonp"==r||l)return l||(n.url=f(n.url,"callback=?")),t.ajaxJSONP(n);n.url||(n.url=""+window.location),h(n);var p,v=n.accepts[r],g={},y=/^([\w-]+:)\/\//.test(n.url)?RegExp.$1:window.location.protocol,x=t.ajaxSettings.xhr();n.crossDomain||(g["X-Requested-With"]="XMLHttpRequest"),v&&(g.Accept=v,v.indexOf(",")>-1&&(v=v.split(",",2)[0]),x.overrideMimeType&&x.overrideMimeType(v)),(n.contentType||n.data&&"GET"!=n.type.toUpperCase())&&(g["Content-Type"]=n.contentType||"application/x-www-form-urlencoded"),n.headers=t.extend(g,n.headers||{}),x.onreadystatechange=function(){if(4==x.readyState){clearTimeout(p);var t,e=!1;if(x.status>=200&&300>x.status||304==x.status||0==x.status&&"file:"==y){r=r||u(x.getResponseHeader("content-type")),t=x.responseText;try{"script"==r?(1,eval)(t):"xml"==r?t=x.responseXML:"json"==r&&(t=E.test(t)?null:JSON.parse(t))}catch(i){e=i}e?a(e,"parsererror",x,n):s(t,x,n)}else a(null,"error",x,n)}};var b="async"in n?n.async:!0;x.open(n.type,n.url,b);for(m in n.headers)x.setRequestHeader(m,n.headers[m]);return o(x,n)===!1?(x.abort(),!1):(n.timeout>0&&(p=setTimeout(function(){x.onreadystatechange=c,x.abort(),a(null,"timeout",x,n)},n.timeout)),x.send(n.data?n.data:null),x)},t.get=function(e,n){return t.ajax({url:e,success:n})},t.post=function(e,n,i,r){return t.isFunction(n)&&(r=r||i,i=n,n=null),t.ajax({type:"POST",url:e,data:n,success:i,dataType:r})},t.getJSON=function(e,n){return t.ajax({url:e,success:n,dataType:"json"})},t.fn.load=function(e,n){if(!this.length)return this;var i,r=this,o=e.split(/\s/);return o.length>1&&(e=o[0],i=o[1]),t.get(e,function(e){r.html(i?t(y.createElement("div")).html(e.replace(x,"")).find(i).html():e),n&&n.call(r)}),this};var _=encodeURIComponent;t.param=function(t,e){var n=[];return n.add=function(t,e){this.push(_(t)+"="+_(e))},p(n,t,e),n.join("&").replace("%20","+")}}(Zepto),function(t){t.fn.serializeArray=function(){var e,n=[];return t(Array.prototype.slice.call(this.get(0).elements)).each(function(){e=t(this);var i=e.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&("radio"!=i&&"checkbox"!=i||this.checked)&&n.push({name:e.attr("name"),value:e.val()})}),n},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(e)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.defaultPrevented||this.get(0).submit()}return this}}(Zepto),function(t){function e(t){return"tagName"in t?t:t.parentNode}function n(t,e,n,i){var r=Math.abs(t-e),o=Math.abs(n-i);return r>=o?t-e>0?"Left":"Right":n-i>0?"Up":"Down"}function i(){s=null,a.last&&(a.el.trigger("longTap"),a={})}function r(){s&&clearTimeout(s),s=null}var o,s,a={},l=750;t(document).ready(function(){var c,u;t(document.body).bind("touchstart",function(n){c=Date.now(),u=c-(a.last||c),a.el=t(e(n.touches[0].target)),o&&clearTimeout(o),a.x1=n.touches[0].pageX,a.y1=n.touches[0].pageY,u>0&&250>=u&&(a.isDoubleTap=!0),a.last=c,s=setTimeout(i,l)}).bind("touchmove",function(t){r(),a.x2=t.touches[0].pageX,a.y2=t.touches[0].pageY}).bind("touchend",function(){r(),a.isDoubleTap?(a.el.trigger("doubleTap"),a={}):a.x2&&Math.abs(a.x1-a.x2)>30||a.y2&&Math.abs(a.y1-a.y2)>30?(a.el.trigger("swipe")&&a.el.trigger("swipe"+n(a.x1,a.x2,a.y1,a.y2)),a={}):"last"in a&&(a.el.trigger("tap"),o=setTimeout(function(){o=null,a.el.trigger("singleTap"),a={}},250))}).bind("touchcancel",function(){o&&clearTimeout(o),s&&clearTimeout(s),s=o=null,a={}})}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.bind(e,t)}})}(Zepto),function(t,e){function n(t){return""===s?t:(t=t.charAt(0).toUpperCase()+t.substr(1),s+t)}var i=Math,r=[],o=e.createElement("div").style,s=function(){for(var t,e="t,webkitT,MozT,msT,OT".split(","),n=0,i=e.length;i>n;n++)if(t=e[n]+"ransform",t in o)return e[n].substr(0,e[n].length-1);return!1}(),a=s?"-"+s.toLowerCase()+"-":"",l=n("transform"),c=n("transitionProperty"),u=n("transitionDuration"),f=n("transformOrigin"),h=n("transitionTimingFunction"),p=(n("transitionDelay"),/android/gi.test(navigator.appVersion)),d=/hp-tablet/gi.test(navigator.appVersion),m=n("perspective")in o,v="ontouchstart"in t&&!d,g=!!s,y=n("transition")in o,x="onorientationchange"in t?"orientationchange":"resize",b=v?"touchstart":"mousedown",w=v?"touchmove":"mousemove",S=v?"touchend":"mouseup",T=v?"touchcancel":"mouseup",E=function(){if(s===!1)return!1;var t={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"otransitionend",ms:"MSTransitionEnd"};return t[s]}(),_=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,1)}}(),C=function(){return t.cancelRequestAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout}(),Y=m?" translateZ(0)":"",k=function(n,i){var r,o=this;o.wrapper="object"==typeof n?n:e.getElementById(n),o.wrapper.style.overflow="hidden",o.scroller=o.wrapper.children[0],o.translateZ=Y,o.options={hScroll:!0,vScroll:!0,x:0,y:0,bounce:!0,bounceLock:!1,momentum:!0,lockDirection:!0,useTransform:!0,useTransition:!1,topOffset:0,checkDOMChanges:!1,handleClick:!0,onRefresh:null,onBeforeScrollStart:function(t){t.preventDefault()},onScrollStart:null,onBeforeScrollMove:null,onScrollMove:null,onBeforeScrollEnd:null,onScrollEnd:null,onTouchEnd:null,onDestroy:null};for(r in i)o.options[r]=i[r];o.x=o.options.x,o.y=o.options.y,o.options.useTransform=g&&o.options.useTransform,o.options.useTransition=y&&o.options.useTransition,o.scroller.style[c]=o.options.useTransform?a+"transform":"top left",o.scroller.style[u]="0",o.scroller.style[f]="0 0",o.options.useTransition&&(o.scroller.style[h]="cubic-bezier(0.33,0.66,0.66,1)"),o.options.useTransform?o.scroller.style[l]="translate("+o.x+"px,"+o.y+"px)"+Y:o.scroller.style.cssText+=";position:absolute;top:"+o.y+"px;left:"+o.x+"px",o.refresh(),o._bind(x,t),o._bind(b),o.options.checkDOMChanges&&(o.checkDOMTime=setInterval(function(){o._checkDOMChanges()},500))};k.prototype={enabled:!0,x:0,y:0,steps:[],scale:1,currPageX:0,currPageY:0,pagesX:[],pagesY:[],aniTime:null,isStopScrollAction:!1,handleEvent:function(t){var e=this;switch(t.type){case b:if(!v&&0!==t.button)return;e._start(t);break;case w:e._move(t);break;case S:case T:e._end(t);break;case x:e._resize();break;case E:e._transitionEnd(t)}},_checkDOMChanges:function(){this.moved||this.animating||this.scrollerW==this.scroller.offsetWidth*this.scale&&this.scrollerH==this.scroller.offsetHeight*this.scale||this.refresh()},_resize:function(){var t=this;setTimeout(function(){t.refresh()},p?200:0)},_pos:function(t,e){t=this.hScroll?t:0,e=this.vScroll?e:0,this.options.useTransform?this.scroller.style[l]="translate("+t+"px,"+e+"px) scale("+this.scale+")"+Y:(t=i.round(t),e=i.round(e),this.scroller.style.left=t+"px",this.scroller.style.top=e+"px"),this.x=t,this.y=e},_start:function(e){var n,i,r,o=this,s=v?e.touches[0]:e;o.enabled&&(o.options.onBeforeScrollStart&&o.options.onBeforeScrollStart.call(o,e),o.options.useTransition&&o._transitionTime(0),o.moved=!1,o.animating=!1,o.distX=0,o.distY=0,o.absDistX=0,o.absDistY=0,o.dirX=0,o.dirY=0,o.isStopScrollAction=!1,o.options.momentum&&(o.options.useTransform?(n=getComputedStyle(o.scroller,null)[l].replace(/[^0-9\-.,]/g,"").split(","),i=+n[4],r=+n[5]):(i=+getComputedStyle(o.scroller,null).left.replace(/[^0-9-]/g,""),r=+getComputedStyle(o.scroller,null).top.replace(/[^0-9-]/g,"")),(i!=o.x||r!=o.y)&&(o.isStopScrollAction=!0,o.options.useTransition?o._unbind(E):C(o.aniTime),o.steps=[],o._pos(i,r),o.options.onScrollEnd&&o.options.onScrollEnd.call(o))),o.startX=o.x,o.startY=o.y,o.pointX=s.pageX,o.pointY=s.pageY,o.startTime=e.timeStamp||Date.now(),o.options.onScrollStart&&o.options.onScrollStart.call(o,e),o._bind(w,t),o._bind(S,t),o._bind(T,t))},_move:function(t){var e=this,n=v?t.touches[0]:t,r=n.pageX-e.pointX,o=n.pageY-e.pointY,s=e.x+r,a=e.y+o,l=t.timeStamp||Date.now();e.options.onBeforeScrollMove&&e.options.onBeforeScrollMove.call(e,t),e.pointX=n.pageX,e.pointY=n.pageY,(s>0||e.maxScrollX>s)&&(s=e.options.bounce?e.x+r/2:s>=0||e.maxScrollX>=0?0:e.maxScrollX),(a>e.minScrollY||e.maxScrollY>a)&&(a=e.options.bounce?e.y+o/2:a>=e.minScrollY||e.maxScrollY>=0?e.minScrollY:e.maxScrollY),e.distX+=r,e.distY+=o,e.absDistX=i.abs(e.distX),e.absDistY=i.abs(e.distY),6>e.absDistX&&6>e.absDistY||(e.options.lockDirection&&(e.absDistX>e.absDistY+5?(a=e.y,o=0):e.absDistY>e.absDistX+5&&(s=e.x,r=0)),e.moved=!0,e._beforePos?e._beforePos(a,o)&&e._pos(s,a):e._pos(s,a),e.dirX=r>0?-1:0>r?1:0,e.dirY=o>0?-1:0>o?1:0,l-e.startTime>300&&(e.startTime=l,e.startX=e.x,e.startY=e.y),e.options.onScrollMove&&e.options.onScrollMove.call(e,t))},_end:function(n){if(!v||0===n.touches.length){var r,o,s,a=this,l=v?n.changedTouches[0]:n,c={dist:0,time:0},u={dist:0,time:0},f=(n.timeStamp||Date.now())-a.startTime,h=a.x,p=a.y;if(a._unbind(w,t),a._unbind(S,t),a._unbind(T,t),a.options.onBeforeScrollEnd&&a.options.onBeforeScrollEnd.call(a,n),!a.moved)return v&&this.options.handleClick&&!a.isStopScrollAction&&(a.doubleTapTimer=setTimeout(function(){for(a.doubleTapTimer=null,r=l.target;1!=r.nodeType;)r=r.parentNode;"SELECT"!=r.tagName&&"INPUT"!=r.tagName&&"TEXTAREA"!=r.tagName&&(o=e.createEvent("MouseEvents"),o.initMouseEvent("click",!0,!0,n.view,1,l.screenX,l.screenY,l.clientX,l.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,0,null),o._fake=!0,r.dispatchEvent(o))},0)),a._resetPos(400),a.options.onTouchEnd&&a.options.onTouchEnd.call(a,n),void 0;if(300>f&&a.options.momentum&&(c=h?a._momentum(h-a.startX,f,-a.x,a.scrollerW-a.wrapperW+a.x,a.options.bounce?a.wrapperW:0):c,u=p?a._momentum(p-a.startY,f,-a.y,0>a.maxScrollY?a.scrollerH-a.wrapperH+a.y-a.minScrollY:0,a.options.bounce?a.wrapperH:0):u,h=a.x+c.dist,p=a.y+u.dist,(a.x>0&&h>0||a.xh)&&(c={dist:0,time:0}),(a.y>a.minScrollY&&p>a.minScrollY||a.yp)&&(u={dist:0,time:0})),c.dist||u.dist)return s=i.max(i.max(c.time,u.time),10),a.scrollTo(i.round(h),i.round(p),s),a.options.onTouchEnd&&a.options.onTouchEnd.call(a,n),void 0;a._resetPos(200),a.options.onTouchEnd&&a.options.onTouchEnd.call(a,n)}},_resetPos:function(t){var e=this,n=e.x>=0?0:e.x=e.minScrollY||e.maxScrollY>0?e.minScrollY:e.y=a+t.time?(r._pos(t.x,t.y),r.animating=!1,r.options.onAnimationEnd&&r.options.onAnimationEnd.call(r),r._startAni(),void 0):(u=(u-a)/t.time-1,e=i.sqrt(1-u*u),l=(t.x-o)*e+o,c=(t.y-s)*e+s,r._pos(l,c),r.animating&&(r.aniTime=_(n)),void 0)},n()}},_transitionTime:function(t){t+="ms",this.scroller.style[u]=t},_momentum:function(t,e,n,r,o){var s=6e-4,a=i.abs(t)*(this.options.speedScale||1)/e,l=a*a/(2*s),c=0,u=0;return t>0&&l>n?(u=o/(6/(l/a*s)),n+=u,a=a*n/l,l=n):0>t&&l>r&&(u=o/(6/(l/a*s)),r+=u,a=a*r/l,l=r),l*=0>t?-1:1,c=a/s,{dist:l,time:i.round(c)}},_offset:function(t){for(var e=-t.offsetLeft,n=-t.offsetTop;t=t.offsetParent;)e-=t.offsetLeft,n-=t.offsetTop;return t!=this.wrapper&&(e*=this.scale,n*=this.scale),{left:e,top:n}},_bind:function(t,e,n){r.concat([e||this.scroller,t,this]),(e||this.scroller).addEventListener(t,this,!!n)},_unbind:function(t,e,n){(e||this.scroller).removeEventListener(t,this,!!n)},destroy:function(){var n=this;n.scroller.style[l]="",n._unbind(x,t),n._unbind(b),n._unbind(w,t),n._unbind(S,t),n._unbind(T,t),n.options.useTransition&&n._unbind(E),n.options.checkDOMChanges&&clearInterval(n.checkDOMTime),n.options.onDestroy&&n.options.onDestroy.call(n);for(var i=0,o=r.length;o>i;)r[i].removeEventListener(r[i+1],r[i+2]),r[i]=null,i+=3;r=[];var s=e.createElement("div");s.appendChild(this.wrapper),s.innerHTML="",n.wrapper=n.scroller=s=null},refresh:function(){var t,e=this;e.wrapperW=e.wrapper.clientWidth||1,e.wrapperH=e.wrapper.clientHeight||1,e.minScrollY=-e.options.topOffset||0,e.scrollerW=i.round(e.scroller.offsetWidth*e.scale),e.scrollerH=i.round((e.scroller.offsetHeight+e.minScrollY)*e.scale),e.maxScrollX=e.wrapperW-e.scrollerW,e.maxScrollY=e.wrapperH-e.scrollerH+e.minScrollY,e.dirX=0,e.dirY=0,e.options.onRefresh&&e.options.onRefresh.call(e),e.hScroll=e.options.hScroll&&0>e.maxScrollX,e.vScroll=e.options.vScroll&&(!e.options.bounceLock&&!e.hScroll||e.scrollerH>e.wrapperH),t=e._offset(e.wrapper),e.wrapperOffsetLeft=-t.left,e.wrapperOffsetTop=-t.top,e.scroller.style[u]="0",e._resetPos(400) },scrollTo:function(t,e,n,i){var r,o,s=this,a=t;for(s.stop(),a.length||(a=[{x:t,y:e,time:n,relative:i}]),r=0,o=a.length;o>r;r++)a[r].relative&&(a[r].x=s.x-a[r].x,a[r].y=s.y-a[r].y),s.steps.push({x:a[r].x,y:a[r].y,time:a[r].time||0});s._startAni()},scrollToElement:function(t,e){var n,r=this;t=t.nodeType?t:r.scroller.querySelector(t),t&&(n=r._offset(t),n.left+=r.wrapperOffsetLeft,n.top+=r.wrapperOffsetTop,n.left=n.left>0?0:n.leftr.minScrollY?r.minScrollY:n.topi&&(i=o.maxScrollX),o.maxScrollY>r&&(r=o.maxScrollY),o.scrollTo(i,r,n)},disable:function(){this.stop(),this._resetPos(0),this.enabled=!1,this._unbind(w,t),this._unbind(S,t),this._unbind(T,t)},enable:function(){this.enabled=!0},stop:function(){this.options.useTransition?this._unbind(E):C(this.aniTime),this.steps=[],this.moved=!1,this.animating=!1},isReady:function(){return!this.moved&&!this.animating}},o=null,"undefined"!=typeof exports?exports.iScroll=k:t.iScroll=k,function(e){function n(t,e){var n="iscroll"+r++;return t.data("_iscroll_",n),o[n]=new i(t[0],e)}if(e){var i=k,r=0,o={};t.iScroll=function(t,i){return n(e("string"==typeof t?"#"+t:t),i)},e.fn.iScroll=function(t){var i=[];return this.each(function(r,s){if("string"==typeof t){var a,l=o[e(s).data("_iscroll_")];if(l&&(a=l[t])){var c=e.isFunction(a)?a.apply(l,Array.prototype.slice.call(arguments,1)):a;c!==l&&void 0!==c&&i.push(c)}}else e(s).data("_iscroll_")||n(e(s),t)}),i.length?i:this}}}(t.Zepto||null)}(window,document),function(t){var e,n,i,r=!1,o=function(){clearTimeout(n),e&&(i=e.attr("highlight-cls"))&&(e.removeClass(i).attr("highlight-cls",""),e=null)};t.extend(t.fn,{highlight:function(i){return r=r||!!t(document).on("touchend.highlight touchmove.highlight touchcancel.highlight",o),o(),this.each(function(){var r=t(this);r.css("-webkit-tap-highlight-color","rgba(255,255,255,0)").off("touchstart.highlight"),i&&r.on("touchstart.highlight",function(){n=t.later(function(){e=r.attr("highlight-cls",i).addClass(i)},100)})})}})}(Zepto);