!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.anime=t()}(this,function(){"use strict";function u(n,t,i){return Math.min(Math.max(n,t),i)}function e(n,t){return n.indexOf(t)>-1}function s(n,t){return n.apply(null,t)}function ft(n){var t=/\(([^)]+)\)/.exec(n);return t?t[1].split(",").map(function(n){return parseFloat(n)}):[]}function et(t,i){function y(n){var t=i?i*n/1e3:n;return t=f<1?Math.exp(-t*f*e)*(a*Math.cos(s*t)+v*Math.sin(s*t)):(a+v*t)*Math.exp(-t*e),0===n||1===n?n:1-t}var r=ft(t),h=u(n.und(r[0])?1:r[0],.1,100),c=u(n.und(r[1])?100:r[1],.1,100),p=u(n.und(r[2])?10:r[2],.1,100),l=u(n.und(r[3])?0:r[3],.1,100),e=Math.sqrt(c/h),f=p/(2*Math.sqrt(c*h)),s=f<1?e*Math.sqrt(1-f*f):0,a=1,v=f<1?(f*e-l)/s:-l+e;return i?y:function(){var u=o.springs[t],n,i,r;if(u)return u;for(n=0,i=0;;)if(1===y(n+=1/6)){if(++i>=16)break}else i=0;return r=n*(1/6)*1e3,o.springs[t]=r,r}}function h(n,t){void 0===n&&(n=1);void 0===t&&(t=.5);var i=u(n,1,10),r=u(t,.1,2);return function(n){return 0===n||1===n?n:-i*Math.pow(2,10*(n-1))*Math.sin((n-1-r/(2*Math.PI)*Math.asin(1/i))*2*Math.PI/r)}}function ei(n){return void 0===n&&(n=10),function(t){return Math.round(t*n)*(1/n)}}function p(t,i){if(n.fnc(t))return t;var f=t.split("(")[0],r=st[f],u=ft(t);switch(f){case"spring":return et(t,i);case"cubicBezier":return s(ot,u);case"steps":return s(ei,u);default:return n.fnc(r)?s(r,u):s(ot,r)}}function ht(n){try{return document.querySelectorAll(n)}catch(n){return}}function c(n,t){for(var r,f=n.length,e=arguments.length>=2?arguments[1]:void 0,u=[],i=0;i<f;i++)i in n&&(r=n[i],t.call(e,r,i,n)&&u.push(r));return u}function l(t){return t.reduce(function(t,i){return t.concat(n.arr(i)?l(i):i)},[])}function ct(t){return n.arr(t)?t:(n.str(t)&&(t=ht(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function w(n,t){return n.some(function(n){return n===t})}function b(n){var t={};for(var i in n)t[i]=n[i];return t}function k(n,t){var r=b(n);for(var i in n)r[i]=t.hasOwnProperty(i)?t[i]:n[i];return r}function a(t,i){var u=b(t);for(var r in i)u[r]=n.und(t[r])?i[r]:t[r];return u}function oi(t){return n.rgb(t)?(u=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(r=t))?"rgba("+u[1]+",1)":r:n.hex(t)?(f=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,t,i,r){return t+t+i+i+r+r}),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(f),"rgba("+parseInt(i[1],16)+","+parseInt(i[2],16)+","+parseInt(i[3],16)+",1)"):n.hsl(t)?function(n){function c(n,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+6*(t-n)*i:i<.5?t:i<2/3?n+(t-n)*(2/3-i)*6:n}var e,o,s,r=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(n)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(n),h=parseInt(r[1],10)/360,u=parseInt(r[2],10)/100,t=parseInt(r[3],10)/100,l=r[4]||1,i,f;return 0==u?e=o=s=t:(i=t<.5?t*(1+u):t+u-t*u,f=2*t-i,e=c(f,i,h+1/3),o=c(f,i,h),s=c(f,i,h-1/3)),"rgba("+255*e+","+255*o+","+255*s+","+l+")"}(t):void 0;var r,u,f,i}function f(n){var t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(n);if(t)return t[2]}function d(t,i){return n.fnc(t)?t(i.target,i.id,i.total):t}function r(n,t){return n.getAttribute(t)}function g(t,i,r){var e,u,s,c,h;return w([r,"deg","rad","turn"],f(i))?i:(e=o.CSS[i+r],!n.und(e))?e:(u=document.createElement(t.tagName),s=t.parentNode&&t.parentNode!==document?t.parentNode:document.body,s.appendChild(u),u.style.position="absolute",u.style.width=100+r,c=100/u.offsetWidth,s.removeChild(u),h=c*parseFloat(i),o.CSS[i+r]=h,h)}function lt(n,t,i){if(t in n.style){var u=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=n.style[t]||getComputedStyle(n).getPropertyValue(u)||"0";return i?g(n,r,i):r}}function nt(t,i){return n.dom(t)&&!n.inp(t)&&(r(t,i)||n.svg(t)&&t[i])?"attribute":n.dom(t)&&w(fi,i)?"transform":n.dom(t)&&"transform"!==i&&lt(t,i)?"css":null!=t[i]?"object":void 0}function at(t){if(n.dom(t)){for(var i,u=t.style.transform||"",f=/(\w+)\(([^)]*)\)/g,r=new Map;i=f.exec(u);)r.set(i[1],i[2]);return r}}function si(n,t,i,r){var u,o=e(t,"scale")?1:0+(e(u=t,"translate")||"perspective"===u?"px":e(u,"rotate")||e(u,"skew")?"deg":void 0),f=at(n).get(t)||o;return i&&(i.transforms.list.set(t,f),i.transforms.last=t),r?g(n,f,r):f}function tt(n,t,i,u){switch(nt(n,t)){case"transform":return si(n,t,u,i);case"css":return lt(n,t,i);case"attribute":return r(n,t);default:return n[t]||0}}function it(n,t){var i=/^(\*=|\+=|-=)/.exec(n);if(!i)return n;var r=f(n)||0,u=parseFloat(t),e=parseFloat(n.replace(i[0],""));switch(i[0][0]){case"+":return u+e+r;case"-":return u-e+r;case"*":return u*e+r}}function vt(t,i){if(n.col(t))return oi(t);var r=f(t),u=r?t.substr(0,t.length-r.length):t;return i&&!/\s/g.test(t)?u+i:u}function rt(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function yt(n){for(var i,r,u=n.points,f=0,t=0;t<u.numberOfItems;t++)i=u.getItem(t),t>0&&(f+=rt(r,i)),r=i;return f}function pt(n){if(n.getTotalLength)return n.getTotalLength();switch(n.tagName.toLowerCase()){case"circle":return e=n,2*Math.PI*r(e,"r");case"rect":return 2*r(f=n,"width")+2*r(f,"height");case"line":return rt({x:r(i=n,"x1"),y:r(i,"y1")},{x:r(i,"x2"),y:r(i,"y2")});case"polyline":return yt(n);case"polygon":return t=(u=n).points,yt(u)+rt(t.getItem(t.numberOfItems-1),t.getItem(0))}var u,t,i,f,e}function wt(t,i){var e=i||{},f=e.el||function(t){for(var i=t.parentNode;n.svg(i)&&(i=i.parentNode,n.svg(i.parentNode)););return i}(t),o=f.getBoundingClientRect(),s=r(f,"viewBox"),h=o.width,c=o.height,u=e.viewBox||(s?s.split(" "):[0,0,h,c]);return{el:f,viewBox:u,x:u[0]/1,y:u[1]/1,w:h/u[2],h:c/u[3]}}function hi(n,t){function r(i){void 0===i&&(i=0);var r=t+i>=1?t+i:0;return n.el.getPointAtLength(r)}var i=wt(n.el,n.svg),u=r(),f=r(-1),e=r(1);switch(n.property){case"x":return(u.x-i.x)*i.w;case"y":return(u.y-i.y)*i.h;case"angle":return 180*Math.atan2(e.y-f.y,e.x-f.x)/Math.PI}}function bt(t,i){var u=/-?\d*\.?\d+/g,r=vt(n.pth(t)?t.totalLength:t,i)+"";return{original:r,numbers:r.match(u)?r.match(u).map(Number):[0],strings:n.str(t)||i?r.split(u):[]}}function kt(t){return c(t?l(n.arr(t)?t.map(ct):ct(t)):[],function(n,t,i){return i.indexOf(n)===t})}function dt(n){var t=kt(n);return t.map(function(n,i){return{target:n,id:i,total:t.length,transforms:{list:at(n)}}})}function ci(t,i){var r=b(i),u,f;return(/^spring/.test(r.easing)&&(r.duration=et(r.easing)),n.arr(t))&&(u=t.length,2===u&&!n.obj(t[0])?t={value:t}:n.fnc(i.duration)||(r.duration=i.duration/u)),f=n.arr(t)?t:[t],f.map(function(t,r){var u=n.obj(t)&&!n.pth(t)?t:{value:t};return n.und(u.delay)&&(u.delay=r?0:i.delay),n.und(u.endDelay)&&(u.endDelay=r===f.length-1?i.endDelay:0),u}).map(function(n){return a(n,r)})}function li(t,i){var u=[],f=i.keyframes;for(var r in f&&(i=a(function(t){for(var r=c(l(t.map(function(n){return Object.keys(n)})),function(t){return n.key(t)}).reduce(function(n,t){return n.indexOf(t)<0&&n.push(t),n},[]),u={},f=function(i){var f=r[i];u[f]=t.map(function(t){var r={};for(var i in t)n.key(i)?i==f&&(r.value=t[i]):r[i]=t[i];return r})},i=0;i<r.length;i++)f(i);return u}(f),i)),i)n.key(r)&&u.push({name:r,tweens:ci(i[r],t)});return u}function ai(t,i){var r;return t.tweens.map(function(u){var e=function(t,i){var u={},f,r;for(f in t)r=d(t[f],i),n.arr(r)&&1===(r=r.map(function(n){return d(n,i)})).length&&(r=r[0]),u[f]=r;return u.duration=parseFloat(u.duration),u.delay=parseFloat(u.delay),u}(u,i),o=e.value,s=n.arr(o)?o[1]:o,c=f(s),l=tt(i.target,t.name,c,i),a=r?r.to.original:l,h=n.arr(o)?o[0]:a,y=f(h)||f(l),v=c||y;return n.und(s)&&(s=a),e.from=bt(h,v),e.to=bt(it(s,h),v),e.start=r?r.end:0,e.end=e.start+e.delay+e.duration+e.endDelay,e.easing=p(e.easing,e.duration),e.isPath=n.pth(o),e.isColor=n.col(e.from.original),e.isColor&&(e.round=1),r=e,e})}function ni(n,t){dt(n).forEach(function(n){for(var i in t){var u=d(t[i],n),r=n.target,e=f(u),o=tt(r,i,e,n),s=it(vt(u,e||f(o)),o),h=nt(r,i);gt[h](r,i,s,n.transforms,!0)}})}function vi(t,i){return c(l(t.map(function(n){return i.map(function(t){return function(n,t){var u=nt(n.target,t.name),i,r;if(u)return i=ai(t,n),r=i[i.length-1],{type:u,property:t.name,animatable:n,tweens:i,duration:r.end,delay:i[0].delay,endDelay:r.endDelay}}(n,t)})})),function(t){return!n.und(t)})}function ti(n,t){var r=n.length,u=function(n){return n.timelineOffset?n.timelineOffset:0},i={};return i.duration=r?Math.max.apply(Math,n.map(function(n){return u(n)+n.duration})):t.duration,i.delay=r?Math.min.apply(Math,n.map(function(n){return u(n)+n.delay})):t.delay,i.endDelay=r?i.duration-Math.max.apply(Math,n.map(function(n){return u(n)+n.duration-n.endDelay})):t.endDelay,i}function t(n){function ft(n){var t=window.Promise&&new Promise(function(n){return rt=n});return n.finished=t,t}function ht(){var n=r.direction;"alternate"!==n&&(r.direction="normal"!==n?"normal":"reverse");r.reversed=!r.reversed;e.forEach(function(n){return n.reversed=r.reversed})}function tt(n){return r.reversed?r.duration-n:n}function it(){o=0;w=tt(r.currentTime)*(1/t.speed)}function ct(n,t){t&&t.seek(n-t.timelineOffset)}function p(n){for(var w,i,b,l,a=0,k=r.animations,ut=k.length;a<ut;){var f=k[a],d=f.animatable,v=f.tweens,g=v.length-1,t=v[g];g&&(t=c(v,function(t){return n<t.end})[0]||t);for(var nt=u(n-t.start-t.delay,0,t.duration)/t.duration,tt=isNaN(nt)?1:t.easing(nt),s=t.to.strings,y=t.round,p=[],ft=t.to.numbers.length,e=void 0,o=0;o<ft;o++){var h=void 0,it=t.to.numbers[o],rt=t.from.numbers[o]||0;h=t.isPath?hi(t.value,tt*it):rt+tt*(it-rt);y&&(t.isColor&&o>2||(h=Math.round(h*y)/y));p.push(h)}if(w=s.length,w)for(e=s[0],i=0;i<w;i++)s[i],b=s[i+1],l=p[i],isNaN(l)||(e+=b?l+b:l+" ");else e=p[0];gt[f.type](d.target,f.property,e,d.transforms);f.currentValue=e;a++}}function f(n){r[n]&&!r.passThrough&&r[n](r)}function lt(n){var i=r.duration,h=r.delay,c=i-r.endDelay,t=tt(n);r.progress=u(t/i*100,0,100);r.reversePlayback=t<r.currentTime;e&&function(n){var i,t;if(r.reversePlayback)for(i=b;i--;)ct(n,e[i]);else for(t=0;t<b;t++)ct(n,e[t])}(t);!r.began&&r.currentTime>0&&(r.began=!0,f("begin"),f("loopBegin"));t<=h&&0!==r.currentTime&&p(0);(t>=c&&r.currentTime!==i||!i)&&p(i);t>h&&t<c?(r.changeBegan||(r.changeBegan=!0,r.changeCompleted=!1,f("changeBegin")),f("change"),p(t)):r.changeBegan&&(r.changeCompleted=!0,r.changeBegan=!1,f("changeComplete"));r.currentTime=u(t,0,i);r.began&&f("update");n>=i&&(w=0,r.remaining&&!0!==r.remaining&&r.remaining--,r.remaining?(o=s,f("loopComplete"),f("loopBegin"),"alternate"===r.direction&&ht()):(r.paused=!0,r.completed||(r.completed=!0,f("loopComplete"),f("complete"),!r.passThrough&&"Promise"in window&&(rt(),ft(r)))))}var h,et,d,ot,g,nt,l,st,r;void 0===n&&(n={});var e,o=0,w=0,s=0,b=0,rt=null;return r=(et=k(ut,h=n),d=k(y,h),ot=li(d,h),g=dt(h.targets),nt=vi(g,ot),l=ti(nt,d),st=ii,ii++,a(et,{id:st,children:[],animatables:g,animations:nt,duration:l.duration,delay:l.delay,endDelay:l.endDelay})),ft(r),r.reset=function(){var t=r.direction,n;for(r.passThrough=!1,r.currentTime=0,r.progress=0,r.paused=!0,r.began=!1,r.changeBegan=!1,r.completed=!1,r.changeCompleted=!1,r.reversePlayback=!1,r.reversed="reverse"===t,r.remaining=r.loop,e=r.children,n=b=e.length;n--;)r.children[n].reset();(r.reversed&&!0!==r.loop||"alternate"===t&&1===r.loop)&&r.remaining++;p(0)},r.set=function(n,t){return ni(n,t),r},r.tick=function(n){s=n;o||(o=s);lt((s+(w-o))*t.speed)},r.seek=function(n){lt(tt(n))},r.pause=function(){r.paused=!0;it()},r.play=function(){r.paused&&(r.completed&&r.reset(),r.paused=!1,i.push(r),it(),v||yi())},r.reverse=function(){ht();it()},r.restart=function(){r.reset();r.play()},r.reset(),r.autoplay&&r.play(),r}function ui(n,t){for(var i=t.length;i--;)w(n,t[i].animatable.target)&&t.splice(i,1)}var ut={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},y={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},fi=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],o={CSS:{},springs:{}},n={arr:function(n){return Array.isArray(n)},obj:function(n){return e(Object.prototype.toString.call(n),"Object")},pth:function(t){return n.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(n){return n instanceof SVGElement},inp:function(n){return n instanceof HTMLInputElement},dom:function(t){return t.nodeType||n.svg(t)},str:function(n){return"string"==typeof n},fnc:function(n){return"function"==typeof n},und:function(n){return void 0===n},hex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},rgb:function(n){return/^rgb/.test(n)},hsl:function(n){return/^hsl/.test(n)},col:function(t){return n.hex(t)||n.rgb(t)||n.hsl(t)},key:function(n){return!ut.hasOwnProperty(n)&&!y.hasOwnProperty(n)&&"targets"!==n&&"keyframes"!==n}},ot=function(){function r(n,t){return 1-3*t+3*n}function u(n,t){return 3*t-6*n}function f(n){return 3*n}function i(n,t,i){return((r(t,i)*n+u(t,i))*n+f(t))*n}function e(n,t,i){return 3*r(t,i)*n*n+2*u(t,i)*n+f(t)}var n=11,t=1/(n-1);return function(r,u,f,o){function c(u){for(var c,l,h=0,o=1,a=n-1;o!==a&&s[o]<=u;++o)h+=t;return c=h+(u-s[--o])/(s[o+1]-s[o])*t,l=e(c,r,f),l>=.001?function(n,t,r,u){for(var o,f=0;f<4;++f){if(o=e(t,r,u),0===o)return t;t-=(i(t,r,u)-n)/o}return t}(u,c,r,f):0===l?c:function(n,t,r,u,f){for(var o,e,s=0;(o=i(e=t+(r-t)/2,u,f)-n)>0?r=e:t=e,Math.abs(o)>1e-7&&++s<10;);return e}(u,h,h+t,r,f)}var s,h;if(0<=r&&r<=1&&0<=f&&f<=1){if(s=new Float32Array(n),r!==u||f!==o)for(h=0;h<n;++h)s[h]=i(h*t,r,f);return function(n){return r===u&&f===o?n:0===n||1===n?n:i(c(n),u,o)}}}}(),st=function(){var i=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],n={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],h],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(n,t){return function(i){return 1-h(n,t)(1-i)}}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(n,t){return function(i){return i<.5?h(n,t)(2*i)/2:1-h(n,t)(-2*i+2)/2}}]},t={linear:[.25,.25,.75,.75]},r=function(r){n[r].forEach(function(n,u){t["ease"+r+i[u]]=n})};for(var u in n)r(u);return t}(),gt={css:function(n,t,i){return n.style[t]=i},attribute:function(n,t,i){return n.setAttribute(t,i)},object:function(n,t,i){return n[t]=i},transform:function(n,t,i,r,u){if(r.list.set(t,i),t===r.last||u){var f="";r.list.forEach(function(n,t){f+=t+"("+n+") "});n.style.transform=f}}},ii=0,v,i=[],ri=[],yi=function(){function n(){v=requestAnimationFrame(t)}function t(t){var f=i.length,r,u,e;if(f){for(r=0;r<f;)u=i[r],u.paused?(e=i.indexOf(u),e>-1&&(i.splice(e,1),f=i.length)):u.tick(t),r++;n()}else v=cancelAnimationFrame(v)}return n}();return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){document.hidden?(i.forEach(function(n){return n.pause()}),ri=i.slice(0),i=[]):ri.forEach(function(n){return n.play()})}),t.version="3.0.1",t.speed=1,t.running=i,t.remove=function(n){for(var r,o,s,u=kt(n),f=i.length;f--;){var e=i[f],h=e.animations,t=e.children;for(ui(u,h),r=t.length;r--;)o=t[r],s=o.animations,ui(u,s),s.length||o.children.length||t.splice(r,1);h.length||t.length||e.pause()}},t.get=tt,t.set=ni,t.convertPx=g,t.path=function(t,i){var r=n.str(t)?ht(t)[0]:t,u=i||100;return function(n){return{property:n,el:r,svg:wt(r),totalLength:pt(r)*(u/100)}}},t.setDashoffset=function(n){var t=pt(n);return n.setAttribute("stroke-dasharray",t),t},t.stagger=function(t,i){void 0===i&&(i={});var v=i.direction||"normal",a=i.easing?p(i.easing):null,e=i.grid,h=i.axis,r=i.from||0,y="first"===r,c="center"===r,w="last"===r,o=n.arr(t),l=o?parseFloat(t[0]):parseFloat(t),b=o?parseFloat(t[1]):0,k=f(o?t[1]:t)||0,d=i.start||0+(o?l:0),u=[],s=0;return function(n,t,i){var f;if(y&&(r=0),c&&(r=(i-1)/2),w&&(r=i-1),!u.length){for(f=0;f<i;f++){if(e){var tt=c?(e[0]-1)/2:r%e[0],it=c?(e[1]-1)/2:Math.floor(r/e[0]),p=tt-f%e[0],g=it-Math.floor(f/e[0]),nt=Math.sqrt(p*p+g*g);"x"===h&&(nt=-p);"y"===h&&(nt=-g);u.push(nt)}else u.push(Math.abs(r-f));s=Math.max.apply(Math,u)}a&&(u=u.map(function(n){return a(n/s)*s}));"reverse"===v&&(u=u.map(function(n){return h?n<0?-1*n:-n:Math.abs(s-n)}))}return d+(o?(b-l)/s:l)*(Math.round(100*u[t])/100)+k}},t.timeline=function(r){void 0===r&&(r={});var u=t(r);return u.duration=0,u.add=function(f,e){function l(n){n.passThrough=!0}var w=i.indexOf(u),s=u.children,h,o,v,p,c;for(w>-1&&i.splice(w,1),h=0;h<s.length;h++)l(s[h]);return o=a(f,k(y,r)),o.targets=o.targets||r.targets,v=u.duration,o.autoplay=!1,o.direction=u.direction,o.timelineOffset=n.und(e)?v:it(e,v),l(u),u.seek(o.timelineOffset),p=t(o),l(p),s.push(p),c=ti(s,r),u.delay=c.delay,u.endDelay=c.endDelay,u.duration=c.duration,u.seek(0),u.reset(),u.autoplay&&u.play(),u},u},t.easing=p,t.penner=st,t.random=function(n,t){return Math.floor(Math.random()*(t-n+1))+n},t});jQuery.noConflict();jQuery(document).ready(function(){function h(e,o,s,c,l,a){var y=jQuery(e),p,w;y.removeClass("hidden");p=anime({targets:e,left:o,loop:!1,easing:"linear",duration:c,update:function(){if(y.is(":visible")&&y.position().left+y.width()<=y.parent().width()){var i=e==t?u:t;n.hasOwnProperty(i)&&n[i].running||h(i,o,s,l,l,a)}},complete:function(){anime.remove(e);switch(a){case"right":case"middle":y.css({left:s});break;default:y.css({left:-s})}n[e].running=!1;!y.is(":visible")&&window.innerWidth>767&&f.push(setInterval(v,2e3,t,i,r,!1))}});w={animation:p,running:!0};n[e]=w}function e(t,i,r,f){var e=jQuery(t),v,a,p;e.removeClass("hidden");var s=parseInt(e.parent().width())||1200,c=parseInt(e.width()),l=e.children().first();for(f||(l.children().last().remove(),jQuery(u).remove());c<s;)v=l.children().last(),l.children().clone().appendTo(l),jQuery("<li>&nbsp;&nbsp;|&nbsp;&nbsp<\/li>").insertAfter(v),c=parseInt(e.width());v=l.children().last();jQuery("<li>&nbsp;&nbsp;|&nbsp;&nbsp<\/li>").insertAfter(v);c=parseInt(e.width());a=e.clone().appendTo(e.parent());a.prop("id",e.attr("id")+o);a.addClass("hidden");var w=i>0&&i<100?100-i:5,b=w*(c+s),k=b,y=s;switch(r){case"middle":p=1/3;e.css({left:s*p});a.css({left:s});y=-c;k=w*(c+s*p);break;case"right":e.css({left:s});a.css({left:s});y=-c;break;default:e.css({left:-c})}h(t,y,s,k,b,r);e.parent().mouseover(function(){for(var t in n)n.hasOwnProperty(t)&&n[t].running===!0&&n[t].animation.pause()});e.parent().mouseout(function(){for(var t in n)n.hasOwnProperty(t)&&n[t].running===!0&&n[t].animation.play()})}function c(){var i,r;for(i in n)n.hasOwnProperty(i)&&n[i].running===!0&&(n[i].animation.pause(),anime.remove(i),n[i].running=!1);r=jQuery(t);r.addClass("hidden");r=jQuery(u);r.addClass("hidden")}function l(){var n,t;window.innerWidth>767&&window.innerWidth<1200?(n=jQuery(".bx-wrapper").first().width(),n>0&&(jQuery(".second-white-strip").first().width(n),jQuery(".ticker").first().width(n))):window.innerWidth>=1200&&(t=1140,jQuery(".second-white-strip").first().width(t),jQuery(".ticker").first().width(t))}function v(n,i,r,u){var o=jQuery(t);o.is(":visible")&&window.innerWidth>767&&(f.forEach(function(n){clearInterval(n)}),f=[],c(),e(n,i,r,u))}function y(){l();c();window.innerWidth>767&&e(t,i,r,!1)}jQuery(".navbar-form input[type=text], .search-box input[type=text]").bind("keypress",function(n){n.which===13&&(document.location.href=contextualSearchString+jQuery(this).val(),n.preventDefault())});jQuery(".navbar-form input[type=image], .search-box input[type=image], #MobileSearchIcon").bind("click",function(n){document.location.href=contextualSearchString+jQuery(this).prev("input[type=text]").val();n.preventDefault()});var t="#scrollingtext",i=80,r="middle",o="_clone",u=t+o,n={},a=250,s,f=[];window.innerWidth>767&&(window.addEventListener("resize",function(){clearTimeout(s);s=setTimeout(y,a)}),setTimeout(l,1e3),setTimeout(e,2e3,t,i,r,!0))})