!function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e,i=function(){function e(t){return null==t?String(t):V[Z.call(t)]||"object"}function i(t){return"function"==e(t)}function n(t){return null!=t&&t==t.window}function s(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(t){return"object"==e(t)}function r(t){return o(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){var e=!!t&&"length"in t&&t.length,i=k.type(t);return"function"!=i&&!n(t)&&("array"==i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function c(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 E?E[t]:E[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function u(t,e){return"number"!=typeof e||M[c(t)]?e:e+"px"}function h(t){return"children"in t?w.call(t.children):k.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function f(t,e){var i,n=t?t.length:0;for(i=0;n>i;i++)this[i]=t[i];this.length=n,this.selector=e||""}function p(t,e){return null==e?k(t):k(t).filter(e)}function d(t,e,n,s){return i(e)?e.call(t,n,s):e}function g(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)}function m(t,e){var i=t.className||"",n=i&&i.baseVal!==y;return e===y?n?i.baseVal:i:void(n?i.baseVal=e:t.className=e)}function v(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?k.parseJSON(t):t):t}catch(e){return t}}var y,C,k,b,F,L,x=[],S=x.concat,T=x.filter,w=x.slice,D=t.document,$={},E={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},j=/^\s*<(\w+|!)[^>]*>/,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,N=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,P=/^(?:body|html)$/i,A=/([A-Z])/g,I=["val","css","html","text","data","width","height","offset"],B=D.createElement("table"),H=D.createElement("tr"),_={tr:D.createElement("tbody"),tbody:B,thead:B,tfoot:B,td:H,th:H,"*":D.createElement("div")},R=/complete|loaded|interactive/,z=/^[\w-]*$/,V={},Z=V.toString,q={},U=D.createElement("div"),J={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},G=Array.isArray||function(t){return t instanceof Array};return q.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(i)return i.call(t,e);var n,s=t.parentNode,o=!s;return o&&(s=U).appendChild(t),n=~q.qsa(s,e).indexOf(t),o&&U.removeChild(t),n},F=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},L=function(t){return T.call(t,function(e,i){return t.indexOf(e)==i})},q.fragment=function(t,e,i){var n,s,o;return O.test(t)&&(n=k(D.createElement(RegExp.$1))),n||(t.replace&&(t=t.replace(N,"<$1></$2>")),e===y&&(e=j.test(t)&&RegExp.$1),e in _||(e="*"),(o=_[e]).innerHTML=""+t,n=k.each(w.call(o.childNodes),function(){o.removeChild(this)})),r(i)&&(s=k(n),k.each(i,function(t,e){I.indexOf(t)>-1?s[t](e):s.attr(t,e)})),n},q.Z=function(t,e){return new f(t,e)},q.isZ=function(t){return t instanceof q.Z},q.init=function(t,e){var n,s;if(!t)return q.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&j.test(t))n=q.fragment(t,RegExp.$1,e),t=null;else{if(e!==y)return k(e).find(t);n=q.qsa(D,t)}else{if(i(t))return k(D).ready(t);if(q.isZ(t))return t;if(G(t))s=t,n=T.call(s,function(t){return null!=t});else if(o(t))n=[t],t=null;else if(j.test(t))n=q.fragment(t.trim(),RegExp.$1,e),t=null;else{if(e!==y)return k(e).find(t);n=q.qsa(D,t)}}return q.Z(n,t)},(k=function(t,e){return q.init(t,e)}).extend=function(t){var e,i=w.call(arguments,1);return"boolean"==typeof t&&(e=t,t=i.shift()),i.forEach(function(i){!function t(e,i,n){for(C in i)n&&(r(i[C])||G(i[C]))?(r(i[C])&&!r(e[C])&&(e[C]={}),G(i[C])&&!G(e[C])&&(e[C]=[]),t(e[C],i[C],n)):i[C]!==y&&(e[C]=i[C])}(t,i,e)}),t},q.qsa=function(t,e){var i,n="#"==e[0],s=!n&&"."==e[0],o=n||s?e.slice(1):e,r=z.test(o);return t.getElementById&&r&&n?(i=t.getElementById(o))?[i]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:w.call(r&&!n&&t.getElementsByClassName?s?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},k.contains=D.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},k.type=e,k.isFunction=i,k.isWindow=n,k.isArray=G,k.isPlainObject=r,k.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},k.isNumeric=function(t){var e=Number(t),i=typeof t;return null!=t&&"boolean"!=i&&("string"!=i||t.length)&&!isNaN(e)&&isFinite(e)||!1},k.inArray=function(t,e,i){return x.indexOf.call(e,t,i)},k.camelCase=F,k.trim=function(t){return null==t?"":String.prototype.trim.call(t)},k.uuid=0,k.support={},k.expr={},k.noop=function(){},k.map=function(t,e){var i,n,s,o,r=[];if(a(t))for(n=0;n<t.length;n++)null!=(i=e(t[n],n))&&r.push(i);else for(s in t)null!=(i=e(t[s],s))&&r.push(i);return(o=r).length>0?k.fn.concat.apply([],o):o},k.each=function(t,e){var i,n;if(a(t)){for(i=0;i<t.length;i++)if(!1===e.call(t[i],i,t[i]))return t}else for(n in t)if(!1===e.call(t[n],n,t[n]))return t;return t},k.grep=function(t,e){return T.call(t,e)},t.JSON&&(k.parseJSON=JSON.parse),k.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){V["[object "+e+"]"]=e.toLowerCase()}),k.fn={constructor:q.Z,length:0,forEach:x.forEach,reduce:x.reduce,push:x.push,sort:x.sort,splice:x.splice,indexOf:x.indexOf,concat:function(){var t,e,i=[];for(t=0;t<arguments.length;t++)e=arguments[t],i[t]=q.isZ(e)?e.toArray():e;return S.apply(q.isZ(this)?this.toArray():this,i)},map:function(t){return k(k.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return k(w.apply(this,arguments))},ready:function(t){return R.test(D.readyState)&&D.body?t(k):D.addEventListener("DOMContentLoaded",function(){t(k)},!1),this},get:function(t){return t===y?w.call(this):this[t>=0?t:t+this.length]},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 x.every.call(this,function(e,i){return!1!==t.call(e,i,e)}),this},filter:function(t){return i(t)?this.not(this.not(t)):k(T.call(this,function(e){return q.matches(e,t)}))},add:function(t,e){return k(L(this.concat(k(t,e))))},is:function(t){return this.length>0&&q.matches(this[0],t)},not:function(t){var e=[];if(i(t)&&t.call!==y)this.each(function(i){t.call(this,i)||e.push(this)});else{var n="string"==typeof t?this.filter(t):a(t)&&i(t.item)?w.call(t):k(t);this.forEach(function(t){n.indexOf(t)<0&&e.push(t)})}return k(e)},has:function(t){return this.filter(function(){return o(t)?k.contains(this,t):k(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:k(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:k(t)},find:function(t){var e=this;return t?"object"==typeof t?k(t).filter(function(){var t=this;return x.some.call(e,function(e){return k.contains(e,t)})}):1==this.length?k(q.qsa(this[0],t)):this.map(function(){return q.qsa(this,t)}):k()},closest:function(t,e){var i=[],n="object"==typeof t&&k(t);return this.each(function(o,r){for(;r&&!(n?n.indexOf(r)>=0:q.matches(r,t));)r=r!==e&&!s(r)&&r.parentNode;r&&i.indexOf(r)<0&&i.push(r)}),k(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=k.map(i,function(t){return(t=t.parentNode)&&!s(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return p(e,t)},parent:function(t){return p(L(this.pluck("parentNode")),t)},children:function(t){return p(this.map(function(){return h(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||w.call(this.childNodes)})},siblings:function(t){return p(this.map(function(t,e){return T.call(h(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return k.map(this,function(e){return e[t]})},show:function(){return this.each(function(){var t,e,i;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,$[t]||(e=D.createElement(t),D.body.appendChild(e),i=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==i&&(i="block"),$[t]=i),$[t]))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=i(t);if(this[0]&&!e)var n=k(t).get(0),s=n.parentNode||this.length>1;return this.each(function(i){k(this).wrapAll(e?t.call(this,i):s?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){k(this[0]).before(t=k(t));for(var e;(e=t.children()).length;)t=e.first();k(t).append(this)}return this},wrapInner:function(t){var e=i(t);return this.each(function(i){var n=k(this),s=n.contents(),o=e?t.call(this,i):t;s.length?s.wrapAll(o):n.append(o)})},unwrap:function(){return this.parent().each(function(){k(this).replaceWith(k(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=k(this);(t===y?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return k(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return k(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;k(this).empty().append(d(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var i=d(this,t,e,this.textContent);this.textContent=null==i?"":""+i}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var i;return"string"!=typeof t||1 in arguments?this.each(function(i){if(1===this.nodeType)if(o(t))for(C in t)g(this,C,t[C]);else g(this,t,d(this,e,i,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:y},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){g(this,t)},this)})},prop:function(t,e){return t=J[t]||t,1 in arguments?this.each(function(i){this[t]=d(this,e,i,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=J[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var i="data-"+t.replace(A,"-$1").toLowerCase(),n=1 in arguments?this.attr(i,e):this.attr(i);return null!==n?v(n):y},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=d(this,t,e,this.value)})):this[0]&&(this[0].multiple?k(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var i=k(this),n=d(this,e,t,i.offset()),s=i.offsetParent().offset(),o={top:n.top-s.top,left:n.left-s.left};"static"==i.css("position")&&(o.position="relative"),i.css(o)});if(!this.length)return null;if(D.documentElement!==this[0]&&!k.contains(D.documentElement,this[0]))return{top:0,left:0};var i=this[0].getBoundingClientRect();return{left:i.left+t.pageXOffset,top:i.top+t.pageYOffset,width:Math.round(i.width),height:Math.round(i.height)}},css:function(t,i){if(arguments.length<2){var n=this[0];if("string"==typeof t){if(!n)return;return n.style[F(t)]||getComputedStyle(n,"").getPropertyValue(t)}if(G(t)){if(!n)return;var s={},o=getComputedStyle(n,"");return k.each(t,function(t,e){s[e]=n.style[F(e)]||o.getPropertyValue(e)}),s}}var r="";if("string"==e(t))i||0===i?r=c(t)+":"+u(t,i):this.each(function(){this.style.removeProperty(c(t))});else for(C in t)t[C]||0===t[C]?r+=c(C)+":"+u(C,t[C])+";":this.each(function(){this.style.removeProperty(c(C))});return this.each(function(){this.style.cssText+=";"+r})},index:function(t){return t?this.indexOf(k(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&x.some.call(this,function(t){return this.test(m(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){b=[];var i=m(this);d(this,t,e,i).split(/\s+/g).forEach(function(t){k(this).hasClass(t)||b.push(t)},this),b.length&&m(this,i+(i?" ":"")+b.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===y)return m(this,"");b=m(this),d(this,t,e,b).split(/\s+/g).forEach(function(t){b=b.replace(l(t)," ")}),m(this,b.trim())}})},toggleClass:function(t,e){return t?this.each(function(i){var n=k(this);d(this,t,i,m(this)).split(/\s+/g).forEach(function(t){(e===y?!n.hasClass(t):e)?n.addClass(t):n.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===y?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===y?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),n=P.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(k(t).css("margin-top"))||0,i.left-=parseFloat(k(t).css("margin-left"))||0,n.top+=parseFloat(k(e[0]).css("border-top-width"))||0,n.left+=parseFloat(k(e[0]).css("border-left-width"))||0,{top:i.top-n.top,left:i.left-n.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||D.body;t&&!P.test(t.nodeName)&&"static"==k(t).css("position");)t=t.offsetParent;return t})}},k.fn.detach=k.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});k.fn[t]=function(i){var o,r=this[0];return i===y?n(r)?r["inner"+e]:s(r)?r.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){(r=k(this)).css(t,d(this,i,e,r[t]()))})}}),["after","prepend","before","append"].forEach(function(i,n){var s=n%2;k.fn[i]=function(){var i,o,r=k.map(arguments,function(t){var n=[];return"array"==(i=e(t))?(t.forEach(function(t){return t.nodeType!==y?n.push(t):k.zepto.isZ(t)?n=n.concat(t.get()):void(n=n.concat(q.fragment(t)))}),n):"object"==i||null==t?t:q.fragment(t)}),a=this.length>1;return r.length<1?this:this.each(function(e,i){o=s?i:i.parentNode,i=0==n?i.nextSibling:1==n?i.firstChild:2==n?i:null;var c=k.contains(D.documentElement,o);r.forEach(function(e){if(a)e=e.cloneNode(!0);else if(!o)return k(e).remove();o.insertBefore(e,i),c&&function t(e,i){i(e);for(var n=0,s=e.childNodes.length;s>n;n++)t(e.childNodes[n],i)}(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var i=e.ownerDocument?e.ownerDocument.defaultView:t;i.eval.call(i,e.innerHTML)}})})})},k.fn[s?i+"To":"insert"+(n?"Before":"After")]=function(t){return k(t)[i](this),this}}),q.Z.prototype=f.prototype=k.fn,q.uniq=L,q.deserializeValue=v,k.zepto=q,k}();return t.Zepto=i,void 0===t.$&&(t.$=i),function(e){function i(t){return t._zid||(t._zid=f++)}function n(t,e,n,o){if((e=s(e)).ns)var r=(a=e.ns,new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)"));var a;return(m[i(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||r.test(t.ns))&&(!n||i(t.fn)===i(n))&&(!o||t.sel==o)})}function s(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function o(t,e){return t.del&&!y&&t.e in C||!!e}function r(t){return k[t]||y&&C[t]||t}function a(t,n,a,c,u,f,p){var d=i(t),g=m[d]||(m[d]=[]);n.split(/\s/).forEach(function(i){if("ready"==i)return e(document).ready(a);var n=s(i);n.fn=a,n.sel=u,n.e in k&&(a=function(t){var i=t.relatedTarget;return!i||i!==this&&!e.contains(this,i)?n.fn.apply(this,arguments):void 0}),n.del=f;var d=f||a;n.proxy=function(e){if(!(e=l(e)).isImmediatePropagationStopped()){e.data=c;var i=d.apply(t,e._args==h?[e]:[e].concat(e._args));return!1===i&&(e.preventDefault(),e.stopPropagation()),i}},n.i=g.length,g.push(n),"addEventListener"in t&&t.addEventListener(r(n.e),n.proxy,o(n,p))})}function c(t,e,s,a,c){var l=i(t);(e||"").split(/\s/).forEach(function(e){n(t,e,s,a).forEach(function(e){delete m[l][e.i],"removeEventListener"in t&&t.removeEventListener(r(e.e),e.proxy,o(e,c))})})}function l(t,i){return(i||!t.isDefaultPrevented)&&(i||(i=t),e.each(x,function(e,n){var s=i[e];t[e]=function(){return this[n]=b,s&&s.apply(i,arguments)},t[n]=F}),t.timeStamp||(t.timeStamp=Date.now()),(i.defaultPrevented!==h?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function u(t){var e,i={originalEvent:t};for(e in t)L.test(e)||t[e]===h||(i[e]=t[e]);return l(i,t)}var h,f=1,p=Array.prototype.slice,d=e.isFunction,g=function(t){return"string"==typeof t},m={},v={},y="onfocusin"in t,C={focus:"focusin",blur:"focusout"},k={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",e.event={add:a,remove:c},e.proxy=function(t,n){var s=2 in arguments&&p.call(arguments,2);if(d(t)){var o=function(){return t.apply(n,s?s.concat(p.call(arguments)):arguments)};return o._zid=i(t),o}if(g(n))return s?(s.unshift(t[n],t),e.proxy.apply(null,s)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,i){return this.on(t,e,i)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,i,n){return this.on(t,e,i,n,1)};var b=function(){return!0},F=function(){return!1},L=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,i){return this.on(e,t,i)},e.fn.undelegate=function(t,e,i){return this.off(e,t,i)},e.fn.live=function(t,i){return e(document.body).delegate(this.selector,t,i),this},e.fn.die=function(t,i){return e(document.body).undelegate(this.selector,t,i),this},e.fn.on=function(t,i,n,s,o){var r,l,f=this;return t&&!g(t)?(e.each(t,function(t,e){f.on(t,i,n,e,o)}),f):(g(i)||d(s)||!1===s||(s=n,n=i,i=h),(s===h||!1===n)&&(s=n,n=h),!1===s&&(s=F),f.each(function(h,f){o&&(r=function(t){return c(f,t.type,s),s.apply(this,arguments)}),i&&(l=function(t){var n,o=e(t.target).closest(i,f).get(0);return o&&o!==f?(n=e.extend(u(t),{currentTarget:o,liveFired:f}),(r||s).apply(o,[n].concat(p.call(arguments,1)))):void 0}),a(f,t,s,n,i,l||r)}))},e.fn.off=function(t,i,n){var s=this;return t&&!g(t)?(e.each(t,function(t,e){s.off(t,i,e)}),s):(g(i)||d(n)||!1===n||(n=i,i=h),!1===n&&(n=F),s.each(function(){c(this,t,n,i)}))},e.fn.trigger=function(t,i){return(t=g(t)||e.isPlainObject(t)?e.Event(t):l(t))._args=i,this.each(function(){t.type in C&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,i)})},e.fn.triggerHandler=function(t,i){var s,o;return this.each(function(r,a){(s=u(g(t)?e.Event(t):t))._args=i,s.target=a,e.each(n(a,t.type||t),function(t,e){return o=e.proxy(s),!s.isImmediatePropagationStopped()&&void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){g(t)||(t=(e=t).type);var i=document.createEvent(v[t]||"Events"),n=!0;if(e)for(var s in e)"bubbles"==s?n=!!e[s]:i[s]=e[s];return i.initEvent(t,n,!0),l(i)}}(i),function(e){function i(t,i,n,s){return t.global?(o=i||p,r=n,a=s,c=e.Event(r),e(o).trigger(c,a),!c.isDefaultPrevented()):void 0;var o,r,a,c}function n(t,e){var n=e.context;return!1!==e.beforeSend.call(n,t,e)&&!1!==i(e,n,"ajaxBeforeSend",[t,e])&&void i(e,n,"ajaxSend",[t,e])}function s(t,e,n,s){var o=n.context,a="success";n.success.call(o,t,a,e),s&&s.resolveWith(o,[t,a,e]),i(n,o,"ajaxSuccess",[e,n,t]),r(a,e,n)}function o(t,e,n,s,o){var a=s.context;s.error.call(a,n,e,t),o&&o.rejectWith(a,[n,e,t]),i(s,a,"ajaxError",[n,s,t||e]),r(e,n,s)}function r(t,n,s){var o,r=s.context;s.complete.call(r,n,t),i(s,r,"ajaxComplete",[n,s]),(o=s).global&&!--e.active&&i(o,null,"ajaxStop")}function a(){}function c(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function l(t,i,n,s){return e.isFunction(i)&&(s=n,n=i,i=void 0),e.isFunction(n)||(s=n,n=void 0),{url:t,data:i,success:n,dataType:s}}var u,h,f=+new Date,p=t.document,d=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,g=/^(?:text|application)\/javascript/i,m=/^(?:text|application)\/xml/i,v="application/json",y="text/html",C=/^\s*$/,k=p.createElement("a");k.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,r){if(!("type"in i))return e.ajax(i);var a,c,l=i.jsonpCallback,u=(e.isFunction(l)?l():l)||"Zepto"+f++,h=p.createElement("script"),d=t[u],g=function(t){e(h).triggerHandler("error",t||"abort")},m={abort:g};return r&&r.promise(m),e(h).on("load error",function(n,l){clearTimeout(c),e(h).off().remove(),"error"!=n.type&&a?s(a[0],m,i,r):o(null,l||"error",m,i,r),t[u]=d,a&&e.isFunction(d)&&d(a[0]),d=a=void 0}),!1===n(m,i)?(g("abort"),m):(t[u]=function(){a=arguments},h.src=i.url.replace(/\?(.+)=\?/,"?$1="+u),p.head.appendChild(h),i.timeout>0&&(c=setTimeout(function(){g("timeout")},i.timeout)),m)},e.ajaxSettings={type:"GET",beforeSend:a,success:a,error:a,complete:a,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:v,xml:"application/xml, text/xml",html:y,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:a},e.ajax=function(r){var l,f,d,b,F=e.extend({},r||{}),L=e.Deferred&&e.Deferred();for(u in e.ajaxSettings)void 0===F[u]&&(F[u]=e.ajaxSettings[u]);(b=F).global&&0==e.active++&&i(b,null,"ajaxStart"),F.crossDomain||((l=p.createElement("a")).href=F.url,l.href=l.href,F.crossDomain=k.protocol+"//"+k.host!=l.protocol+"//"+l.host),F.url||(F.url=t.location.toString()),(f=F.url.indexOf("#"))>-1&&(F.url=F.url.slice(0,f)),(d=F).processData&&d.data&&"string"!=e.type(d.data)&&(d.data=e.param(d.data,d.traditional)),!d.data||d.type&&"GET"!=d.type.toUpperCase()&&"jsonp"!=d.dataType||(d.url=c(d.url,d.data),d.data=void 0);var x=F.dataType,S=/\?.+=\?/.test(F.url);if(S&&(x="jsonp"),!1!==F.cache&&(r&&!0===r.cache||"script"!=x&&"jsonp"!=x)||(F.url=c(F.url,"_="+Date.now())),"jsonp"==x)return S||(F.url=c(F.url,F.jsonp?F.jsonp+"=?":!1===F.jsonp?"":"callback=?")),e.ajaxJSONP(F,L);var T,w=F.accepts[x],D={},$=function(t,e){D[t.toLowerCase()]=[t,e]},E=/^([\w-]+:)\/\//.test(F.url)?RegExp.$1:t.location.protocol,M=F.xhr(),j=M.setRequestHeader;if(L&&L.promise(M),F.crossDomain||$("X-Requested-With","XMLHttpRequest"),$("Accept",w||"*/*"),(w=F.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),M.overrideMimeType&&M.overrideMimeType(w)),(F.contentType||!1!==F.contentType&&F.data&&"GET"!=F.type.toUpperCase())&&$("Content-Type",F.contentType||"application/x-www-form-urlencoded"),F.headers)for(h in F.headers)$(h,F.headers[h]);if(M.setRequestHeader=$,M.onreadystatechange=function(){if(4==M.readyState){M.onreadystatechange=a,clearTimeout(T);var t,i=!1;if(M.status>=200&&M.status<300||304==M.status||0==M.status&&"file:"==E){if(x=x||((n=F.mimeType||M.getResponseHeader("content-type"))&&(n=n.split(";",2)[0]),n&&(n==y?"html":n==v?"json":g.test(n)?"script":m.test(n)&&"xml")||"text"),"arraybuffer"==M.responseType||"blob"==M.responseType)t=M.response;else{t=M.responseText;try{t=function(t,e,i){if(i.dataFilter==a)return t;var n=i.context;return i.dataFilter.call(n,t,e)}(t,x,F),"script"==x?(0,eval)(t):"xml"==x?t=M.responseXML:"json"==x&&(t=C.test(t)?null:e.parseJSON(t))}catch(t){i=t}if(i)return o(i,"parsererror",M,F,L)}s(t,M,F,L)}else o(M.statusText||null,M.status?"error":"abort",M,F,L)}var n},!1===n(M,F))return M.abort(),o(null,"abort",M,F,L),M;var O=!("async"in F)||F.async;if(M.open(F.type,F.url,O,F.username,F.password),F.xhrFields)for(h in F.xhrFields)M[h]=F.xhrFields[h];for(h in D)j.apply(M,D[h]);return F.timeout>0&&(T=setTimeout(function(){M.onreadystatechange=a,M.abort(),o(null,"timeout",M,F,L)},F.timeout)),M.send(F.data?F.data:null),M},e.get=function(){return e.ajax(l.apply(null,arguments))},e.post=function(){var t=l.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=l.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,i,n){if(!this.length)return this;var s,o=this,r=t.split(/\s/),a=l(t,i,n),c=a.success;return r.length>1&&(a.url=r[0],s=r[1]),a.success=function(t){o.html(s?e("<div>").html(t.replace(d,"")).find(s):t),c&&c.apply(o,arguments)},e.ajax(a),this};var b=encodeURIComponent;e.param=function(t,i){var n=[];return n.add=function(t,i){e.isFunction(i)&&(i=i()),null==i&&(i=""),this.push(b(t)+"="+b(i))},function t(i,n,s,o){var r,a=e.isArray(n),c=e.isPlainObject(n);e.each(n,function(n,l){r=e.type(l),o&&(n=s?o:o+"["+(c||"object"==r||"array"==r?n:"")+"]"),!o&&a?i.add(l.name,l.value):"array"==r||!s&&"object"==r?t(i,l,s,n):i.add(n,l)})}(n,t,i),n.join("&").replace(/%20/g,"+")}}(i),(e=i).fn.serializeArray=function(){var t,i,n=[],s=function(e){return e.forEach?e.forEach(s):void n.push({name:t,value:e})};return this[0]&&e.each(this[0].elements,function(n,o){i=o.type,(t=o.name)&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&"file"!=i&&("radio"!=i&&"checkbox"!=i||o.checked)&&s(e(o).val())}),n},e.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},e.fn.submit=function(t){if(0 in arguments)this.bind("submit",t);else if(this.length){var i=e.Event("submit");this.eq(0).trigger(i),i.isDefaultPrevented()||this.get(0).submit()}return this},function(){try{getComputedStyle(void 0)}catch(i){var e=getComputedStyle;t.getComputedStyle=function(t,i){try{return e(t,i)}catch(t){return null}}}}(),i});var FlipClock,Base=function(){};function VideoLanding(t){var e=[],i=t.video,n=t.sound,s=t.frame,o=t.cookie&&t.cookie.expires,r=t.cookie&&t.cookie.updateCookie,a=s.logo,c=s.header.text,l=s.body.firstCaptionText,u=s.body.secondCaptionText,h=s.body.firstSmallText,f=s.body.secondSmallText,p=s.body.btn,d=s.counter,g=$("#root"),m=$("<img/>",{src:a.img.src,alt:a.img.alt}),v=setInterval(function(){m.height()&&(clearInterval(v),$("a.logo").css({"margin-top":"-"+Math.round(m.height()/2+10)+"px"}))},10);for(videoFormat in i)e.push('<source src="'+i[videoFormat]+'" type="video/'+videoFormat+'">');var y=['<div class="video-wrap">','<video class="video" id="video-bg" autoplay="" loop=""'+(!1===n?"muted":"")+">",e.join("\n"),"</video>",'<div class="bg-fill"></div>',"</div>",'<div class="main">','<div class="frame">','<a href="'+a.link+'" class="logo"></a>','<div class="primary-text bonus-text">'+c+"</div>",'<div class="flip-clock-container">','<div class="counter"></div>',"</div>",'<div class="text-block first-block"><span class="caption-text first-caption-text">'+l+"</span>",'<div class="primary-text first-block-text">'+h+"</div>","</div>",'<div class="text-block second-block"><span class="caption-text second-caption-text">'+u+"</span>",'<div class="primary-text second-block-text">'+f+"</div>","</div>",'<a href="'+p.link+'" class="btn">'+p.text+"</a>","</div>","</div>",'<div class="vol" id="vol">','<span class="vol-icon '+(!1===n?"vol-off":"vol-on")+'"></span>',"</div>"].join("\n");function C(t){var e=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function k(t,e,i){var n=(i=i||{}).expires;if("number"==typeof n&&n){var s=new Date;s.setTime(s.getTime()+1e3*n),n=i.expires=s}n&&n.toUTCString&&(i.expires=n.toUTCString());var o=t+"="+(e=encodeURIComponent(e));for(var r in i){o+="; "+r;var a=i[r];!0!==a&&(o+="="+a)}document.cookie=o}function b(t){k(t,"",{expires:-1})}g.length?(g.append(y),function(){var t,e=d.time;$("a.logo").append(m),o?(r&&(b("VC_counterTime"),k("VC_counterTime",(new Date).getTime(),{expires:o})),C("VC_counterTime")?(e=parseInt(d.time-((new Date).getTime()-C("VC_counterTime"))/1e3))<0&&(e=0):(k("VC_counterTime",(new Date).getTime(),{expires:o}),e=d.time)):b("VC_counterTime");(t=$(".counter").FlipClock({language:d.language,clockFace:"HourlyCounter",countdown:!0})).setTime(e),e>0&&t.start();$("#vol").on("click",function(){var t=$(".vol-icon"),e=document.getElementById("video-bg");e.muted&&!1===n?(e.muted=!1,e.volume=1,t.removeClass("vol-off").addClass("vol-on")):e.volume?(e.volume=0,t.removeClass("vol-on").addClass("vol-off")):(e.volume=1,t.removeClass("vol-off").addClass("vol-on"))})}()):console.log('Create container. <div id="root"></div>')}Base.extend=function(t,e){"use strict";var i=Base.prototype.extend;Base._prototyping=!0;var n=new this;i.call(n,t),n.base=function(){},delete Base._prototyping;var s=n.constructor,o=n.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==o)this._constructing=!0,s.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||i).call(arguments[0],n)};return o.ancestor=this,o.extend=this.extend,o.forEach=this.forEach,o.implement=this.implement,o.prototype=n,o.toString=this.toString,o.valueOf=function(t){return"object"==t?o:s.valueOf()},i.call(o,e),"function"==typeof o.init&&o.init(),o},Base.prototype={extend:function(t,e){if(arguments.length>1){var i=this[t];if(i&&"function"==typeof e&&(!i.valueOf||i.valueOf()!=e.valueOf())&&/\bbase\b/.test(e)){var n=e.valueOf();(e=function(){var t=this.base||Base.prototype.base;this.base=i;var e=n.apply(this,arguments);return this.base=t,e}).valueOf=function(t){return"object"==t?e:n},e.toString=Base.toString}this[t]=e}else if(t){var s=Base.prototype.extend;Base._prototyping||"function"==typeof this||(s=this.extend||s);for(var o={toSource:null},r=["constructor","toString","valueOf"],a=Base._prototyping?0:1;c=r[a++];)t[c]!=o[c]&&s.call(this,c,t[c]);for(var c in t)o[c]||s.call(this,c,t[c])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(t,e,i){for(var n in t)void 0===this.prototype[n]&&e.call(i,t[n],n,t)},implement:function(){for(var t=0;t<arguments.length;t++)"function"==typeof arguments[t]?arguments[t](this.prototype):this.prototype.extend(arguments[t]);return this},toString:function(){return String(this.valueOf())}}),function(t){"use strict";(FlipClock=function(t,e,i){return e instanceof Object&&e instanceof Date==0&&(i=e,e=0),new FlipClock.Factory(t,e,i)}).Lang={},FlipClock.Base=Base.extend({buildDate:"2014-12-12",version:"0.7.7",constructor:function(e,i){"object"!=typeof e&&(e={}),"object"!=typeof i&&(i={}),this.setOptions(t.extend(!0,{},e,i))},callback:function(t){if("function"==typeof t){for(var e=[],i=1;i<=arguments.length;i++)arguments[i]&&e.push(arguments[i]);t.apply(this,e)}},log:function(t){window.console&&console.log&&console.log(t)},getOption:function(t){return!!this[t]&&this[t]},getOptions:function(){return this},setOption:function(t,e){this[t]=e},setOptions:function(t){for(var e in t)void 0!==t[e]&&this.setOption(e,t[e])}})}($),function(t){"use strict";FlipClock.Face=FlipClock.Base.extend({autoStart:!0,dividers:[],factory:!1,lists:[],constructor:function(t,e){this.dividers=[],this.lists=[],this.base(e),this.factory=t},build:function(){this.autoStart&&this.start()},createDivider:function(e,i,n){"boolean"!=typeof i&&i||(n=i,i=e);var s=['<span class="'+this.factory.classes.dot+' top"></span>','<span class="'+this.factory.classes.dot+' bottom"></span>'].join("");n&&(s=""),e=this.factory.localize(e);var o=['<span class="'+this.factory.classes.divider+" "+(i||"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(e||"")+"</span>",s,"</span>"],r=t(o.join(""));return this.dividers.push(r),r},createList:function(t,e){"object"==typeof t&&(e=t,t=0);var i=new FlipClock.List(this.factory,t,e);return this.lists.push(i),i},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits}),this.flip(this.factory.original,!1)},appendDigitToClock:function(t){t.$el.append(!1)},addDigit:function(t){var e=this.createList(t,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(e)},start:function(){},stop:function(){},autoIncrement:function(){this.factory.countdown?this.decrement():this.increment()},increment:function(){this.factory.time.addSecond()},decrement:function(){0==this.factory.time.getTimeSeconds()?this.factory.stop():this.factory.time.subSecond()},flip:function(e,i){var n=this;t.each(e,function(t,e){var s=n.lists[t];s?(i||e==s.digit||s.play(),s.select(e)):n.addDigit(e)})}})}($),function(t){"use strict";FlipClock.Factory=FlipClock.Base.extend({animationRate:1e3,autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:!1,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:!1,face:!0,lang:!1,language:"english",minimumDigits:0,original:!1,running:!1,time:!1,timer:!1,$wrapper:!1,constructor:function(e,i,n){n||(n={}),this.lists=[],this.running=!1,this.base(n),this.$el=t(e).addClass(this.classes.wrapper),this.$wrapper=this.$el,this.original=i instanceof Date?i:i?Math.round(i):0,this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate}),this.timer=new FlipClock.Timer(this,n),this.loadLanguage(this.language),this.loadClockFace(this.clockFace,n),this.autoStart&&this.start()},loadClockFace:function(t,e){var i,n=!1;return t=t.ucfirst()+"Face",this.face.stop&&(this.stop(),n=!0),this.$el.html(""),this.time.minimumDigits=this.minimumDigits,(i=FlipClock[t]?new FlipClock[t](this,e):new FlipClock[this.defaultClockFace+"Face"](this,e)).build(),this.face=i,n&&this.start(),this.face},loadLanguage:function(t){var e;return e=FlipClock.Lang[t.ucfirst()]?FlipClock.Lang[t.ucfirst()]:FlipClock.Lang[t]?FlipClock.Lang[t]:FlipClock.Lang[this.defaultLanguage],this.lang=e},localize:function(t,e){var i=this.lang;if(!t)return null;var n=t.toLowerCase();return"object"==typeof e&&(i=e),i&&i[n]?i[n]:t},start:function(t){var e=this;e.running||e.countdown&&!(e.countdown&&e.time.time>0)?e.log("Trying to start timer when countdown already at 0"):(e.face.start(e.time),e.timer.start(function(){e.flip(),"function"==typeof t&&t()}))},stop:function(t){for(var e in this.face.stop(),this.timer.stop(t),this.lists)this.lists.hasOwnProperty(e)&&this.lists[e].stop()},reset:function(t){this.timer.reset(t),this.face.reset()},setTime:function(t){this.time.time=t,this.flip(!0)},getTime:function(t){return this.time},setCountdown:function(t){var e=this.running;this.countdown=!!t,e&&(this.stop(),this.start())},flip:function(t){this.face.flip(!1,t)}})}($),function(t){"use strict";FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$el:!1,$obj:!1,items:[],lastDigit:0,constructor:function(t,e,i){this.factory=t,this.digit=e,this.lastDigit=e,this.$el=this.createList(),this.$obj=this.$el,e>0&&this.select(e),this.factory.$el.append(this.$el)},select:function(t){if(void 0===t?t=this.digit:this.digit=t,this.digit!=this.lastDigit){var e=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before),this.appendListItem(this.classes.active,this.digit),e.remove(),this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var t=this;setTimeout(function(){t.$el.removeClass(t.factory.classes.play)},this.factory.timer.interval)},createListItem:function(t,e){return['<li class="'+(t||"")+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn">'+(e||"")+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn">'+(e||"")+"</div>","</div>","</a>","</li>"].join("")},appendListItem:function(t,e){var i=this.createListItem(t,e);this.$el.append(i)},createList:function(){var e=this.getPrevDigit()?this.getPrevDigit():this.digit;return t(['<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'">',this.createListItem(this.classes.before,e),this.createListItem(this.classes.active,this.digit),"</ul>"].join(""))},getNextDigit:function(){return 9==this.digit?0:this.digit+1},getPrevDigit:function(){return 0==this.digit?9:this.digit-1}})}($),function(t){"use strict";String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},t.fn.FlipClock=function(e,i){return new FlipClock(t(this),e,i)},t.fn.flipClock=function(e,i){return t.fn.FlipClock(e,i)}}($),function(t){"use strict";FlipClock.Time=FlipClock.Base.extend({time:0,factory:!1,minimumDigits:0,constructor:function(t,e,i){"object"!=typeof i&&(i={}),i.minimumDigits||(i.minimumDigits=t.minimumDigits),this.base(i),this.factory=t,e&&(this.time=e)},convertDigitsToArray:function(t){var e=[];t=t.toString();for(var i=0;i<t.length;i++)t[i].match(/^\d*$/g)&&e.push(t[i]);return e},digit:function(t){var e=this.toString(),i=e.length;return!!e[i-t]&&e[i-t]},digitize:function(e){var i=[];if(t.each(e,function(t,e){1==(e=e.toString()).length&&(e="0"+e);for(var n=0;n<e.length;n++)i.push(e.charAt(n))}),i.length>this.minimumDigits&&(this.minimumDigits=i.length),this.minimumDigits>i.length)for(var n=i.length;n<this.minimumDigits;n++)i.unshift("0");return i},getDateObject:function(){return this.time instanceof Date?this.time:new Date((new Date).getTime()+1e3*this.getTimeSeconds())},getDayCounter:function(t){var e=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return t&&e.push(this.getSeconds(!0)),this.digitize(e)},getDays:function(t){var e=this.getTimeSeconds()/60/60/24;return t&&(e%=7),Math.floor(e)},getHourCounter:function(){return this.digitize([this.getHours(),this.getMinutes(!0),this.getSeconds(!0)])},getHourly:function(){return this.getHourCounter()},getHours:function(t){var e=this.getTimeSeconds()/60/60;return t&&(e%=24),Math.floor(e)},getMilitaryTime:function(t,e){void 0===e&&(e=!0),t||(t=this.getDateObject());var i=[t.getHours(),t.getMinutes()];return!0===e&&i.push(t.getSeconds()),this.digitize(i)},getMinutes:function(t){var e=this.getTimeSeconds()/60;return t&&(e%=60),Math.floor(e)},getMinuteCounter:function(){return this.digitize([this.getMinutes(),this.getSeconds(!0)])},getTimeSeconds:function(t){return t||(t=new Date),this.time instanceof Date?this.factory.countdown?Math.max(this.time.getTime()/1e3-t.getTime()/1e3,0):t.getTime()/1e3-this.time.getTime()/1e3:this.time},getTime:function(t,e){void 0===e&&(e=!0),t||(t=this.getDateObject()),console.log(t);var i=t.getHours(),n=[i>12?i-12:0===i?12:i,t.getMinutes()];return!0===e&&n.push(t.getSeconds()),this.digitize(n)},getSeconds:function(t){var e=this.getTimeSeconds();return t&&(60==e?e=0:e%=60),Math.ceil(e)},getWeeks:function(t){var e=this.getTimeSeconds()/60/60/24/7;return t&&(e%=52),Math.floor(e)},removeLeadingZeros:function(e,i){var n=0,s=[];return t.each(i,function(t,o){e>t?n+=parseInt(i[t],10):s.push(i[t])}),0===n?s:i},addSeconds:function(t){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()+t):this.time+=t},addSecond:function(){this.addSeconds(1)},subSeconds:function(t){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()-t):this.time-=t},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}($),function(t){"use strict";FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,animationRate:1e3,constructor:function(t,e){this.base(e),this.factory=t,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(t){clearInterval(this.timer),this.count=0,this._setInterval(t),this.callback(this.callbacks.reset)},start:function(t){this.factory.running=!0,this._createTimer(t),this.callback(this.callbacks.start)},stop:function(t){this.factory.running=!1,this._clearInterval(t),this.callback(this.callbacks.stop),this.callback(t)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(t){this._setInterval(t)},_destroyTimer:function(t){this._clearInterval(),this.timer=!1,this.callback(t),this.callback(this.callbacks.destroy)},_interval:function(t){this.callback(this.callbacks.interval),this.callback(t),this.count++},_setInterval:function(t){var e=this;e._interval(t),e.timer=setInterval(function(){e._interval(t)},this.interval)}})}($),function(t){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(t,e){this.base(t,e)},build:function(e){var i=this,n=this.factory.$el.find("ul");this.factory.time.time||(this.factory.original=new Date,this.factory.time=new FlipClock.Time(this.factory,this.factory.original)),(e=e||this.factory.time.getMilitaryTime(!1,this.showSeconds)).length>n.length&&t.each(e,function(t,e){i.createList(e)}),this.createDivider(),this.createDivider(),t(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el),t(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el),this.base()},flip:function(t,e){this.autoIncrement(),t=t||this.factory.time.getMilitaryTime(!1,this.showSeconds),this.base(t,e)}})}($),function(t){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:!1,constructor:function(t,e){"object"!=typeof e&&(e={}),t.autoStart=!!e.autoStart,e.autoStart&&(this.shouldAutoIncrement=!0),t.increment=function(){t.countdown=!1,t.setTime(t.getTime().getTimeSeconds()+1)},t.decrement=function(){t.countdown=!0;var e=t.getTime().getTimeSeconds();e>0&&t.setTime(e-1)},t.setValue=function(e){t.setTime(e)},t.setCounter=function(e){t.setTime(e)},this.base(t,e)},build:function(){var e=this,i=this.factory.$el.find("ul"),n=this.factory.getTime().digitize([this.factory.getTime().time]);n.length>i.length&&t.each(n,function(t,i){e.createList(i).select(i)}),t.each(this.lists,function(t,e){e.play()}),this.base()},flip:function(t,e){this.shouldAutoIncrement&&this.autoIncrement(),t||(t=this.factory.getTime().digitize([this.factory.getTime().time])),this.base(t,e)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0),this.flip()}})}($),function(t){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(t,e){this.base(t,e)},build:function(e){var i=this,n=this.factory.$el.find("ul"),s=0;(e=e||this.factory.time.getDayCounter(this.showSeconds)).length>n.length&&t.each(e,function(t,e){i.createList(e)}),this.showSeconds?t(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el):s=2,t(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4+s].$el),t(this.createDivider("Hours")).insertBefore(this.lists[this.lists.length-6+s].$el),t(this.createDivider("Days",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(t,e){t||(t=this.factory.time.getDayCounter(this.showSeconds)),this.autoIncrement(),this.base(t,e)}})}($),function(t){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(t,e){this.base(t,e)},build:function(e,i){var n=this,s=this.factory.$el.find("ul");(i=i||this.factory.time.getHourCounter()).length>s.length&&t.each(i,function(t,e){n.createList(e)}),t(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el),t(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4].$el),e||t(this.createDivider("Hours",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(t,e){t||(t=this.factory.time.getHourCounter()),this.autoIncrement(),this.base(t,e)},appendDigitToClock:function(t){this.base(t),this.dividers[0].insertAfter(this.dividers[0].next())}})}($),$,FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(t,e){this.base(t,e)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(t,e){t||(t=this.factory.time.getMinuteCounter()),this.base(t,e)}}),function(t){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(){var e=this.factory.time.getTime(!1,this.showSeconds);this.base(e),this.meridiumText=this.getMeridium(),this.meridium=t(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(t,e){this.meridiumText!=this.getMeridium()&&(this.meridiumText=this.getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime(!1,this.showSeconds),e)},getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},isPM:function(){return"PM"==this.getMeridium()},isAM:function(){return"AM"==this.getMeridium()}})}($),$,FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"},FlipClock.Lang.ar=FlipClock.Lang.Arabic,FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic,FlipClock.Lang.arabic=FlipClock.Lang.Arabic,$,FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.da=FlipClock.Lang.Danish,FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish,FlipClock.Lang.danish=FlipClock.Lang.Danish,$,FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German,$,FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English,$,FlipClock.Lang.Spanish={years:"Años",months:"Meses",days:"Días",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish,$,FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"},FlipClock.Lang.fi=FlipClock.Lang.Finnish,FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish,FlipClock.Lang.finnish=FlipClock.Lang.Finnish,$,FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French,$,FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"},FlipClock.Lang.it=FlipClock.Lang.Italian,FlipClock.Lang["it-it"]=FlipClock.Lang.Italian,FlipClock.Lang.italian=FlipClock.Lang.Italian,$,FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"},FlipClock.Lang.lv=FlipClock.Lang.Latvian,FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian,FlipClock.Lang.latvian=FlipClock.Lang.Latvian,$,FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"},FlipClock.Lang.nl=FlipClock.Lang.Dutch,FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch,FlipClock.Lang.dutch=FlipClock.Lang.Dutch,$,FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.no=FlipClock.Lang.Norwegian,FlipClock.Lang.nb=FlipClock.Lang.Norwegian,FlipClock.Lang["no-nb"]=FlipClock.Lang.Norwegian,FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian,$,FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.pt=FlipClock.Lang.Portuguese,FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese,FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese,$,FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"},FlipClock.Lang.ru=FlipClock.Lang.Russian,FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian,FlipClock.Lang.russian=FlipClock.Lang.Russian,$,FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"},FlipClock.Lang.sv=FlipClock.Lang.Swedish,FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish,FlipClock.Lang.swedish=FlipClock.Lang.Swedish,$,FlipClock.Lang.Chinese={years:"年",months:"月",days:"日",hours:"时",minutes:"分",seconds:"秒"},FlipClock.Lang.zh=FlipClock.Lang.Chinese,FlipClock.Lang["zh-cn"]=FlipClock.Lang.Chinese,FlipClock.Lang.chinese=FlipClock.Lang.Chinese;