1/*! 2 * Velocity.js: Accelerated JavaScript animation. 3 * @version 0.0.18 4 * @docs http://velocityjs.org 5 * @license Copyright 2014 Julian Shapiro. MIT License: http://en.wikipedia.org/wiki/MIT_License 6 */ 7! function(a, b, c, d) { 8 function e(a) { 9 for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) { 10 var e = a[b]; 11 e && d.push(e) 12 } 13 return d 14 } 15 16 function f(a) { 17 return "[object Function]" === Object.prototype.toString.call(a) 18 } 19 20 function g(a) { 21 var b = Object.prototype.toString.call(a); 22 return "object" == typeof a && /^\[object (HTMLCollection|NodeList|Object)\]$/.test(b) && a.length !== d && (0 === a.length || "object" == typeof a[0] && a[0].nodeType > 0) 23 } 24 25 function h(a) { 26 return a.jquery || b.Zepto && b.Zepto.zepto.isZ(a) 27 } 28 29 function i(a, b) { 30 var c = a; 31 return "string" == typeof a ? s.Easings[a] || (c = !1) : c = q(a) && 2 === a.length ? u.apply(null, a.concat([b])) : q(a) && 4 === a.length ? t.apply(null, a) : !1, c === !1 && (c = s.Easings[s.defaults.easing] ? s.defaults.easing : n), c 32 } 33 34 function j(a) { 35 if (a) 36 for (var b = (new Date).getTime(), c = 0, e = s.State.calls.length; e > c; c++) 37 if (s.State.calls[c]) { 38 var f = s.State.calls[c], 39 g = f[0], 40 h = f[2], 41 i = f[3]; 42 i || (i = s.State.calls[c][3] = b - 16); 43 for (var m = Math.min((b - i) / h.duration, 1), n = 0, o = g.length; o > n; n++) { 44 var q = g[n], 45 t = q.element; 46 if (r.data(t, l)) { 47 var u = !1; 48 h.display && "none" !== h.display && v.setPropertyValue(t, "display", h.display); 49 for (var w in q) 50 if ("element" !== w) { 51 var x, y = q[w], 52 z = "string" == typeof y.easing ? s.Easings[y.easing] : y.easing; 53 if (x = 1 === m ? y.endValue : y.startValue + (y.endValue - y.startValue) * z(m), y.currentValue = x, v.Hooks.registered[w]) { 54 var A = v.Hooks.getRoot(w), 55 B = r.data(t, l).rootPropertyValueCache[A]; 56 B && (y.rootPropertyValue = B) 57 } 58 var C = v.setPropertyValue(t, w, y.currentValue + (0 === parseFloat(x) ? "" : y.unitType), y.rootPropertyValue, y.scrollData); 59 v.Hooks.registered[w] && (r.data(t, l).rootPropertyValueCache[A] = v.Normalizations.registered[A] ? v.Normalizations.registered[A]("extract", null, C[1]) : C[1]), "transform" === C[0] && (u = !0) 60 } 61 h.mobileHA && r.data(t, l).transformCache.translate3d === d && (r.data(t, l).transformCache.translate3d = "(0px, 0px, 0px)", u = !0), u && v.flushTransformCache(t) 62 } 63 } 64 h.display && "none" !== h.display && (s.State.calls[c][2].display = !1), 1 === m && k(c) 65 } 66 s.State.isTicking && p(j) 67 } 68 69 function k(a) { 70 for (var b = s.State.calls[a][0], c = s.State.calls[a][1], e = s.State.calls[a][2], f = !1, g = 0, h = b.length; h > g; g++) { 71 var i = b[g].element; 72 if ("none" !== e.display || e.loop || v.setPropertyValue(i, "display", e.display), (r.queue(i)[1] === d || !/\.velocityQueueEntryFlag/i.test(r.queue(i)[1])) && r.data(i, l)) { 73 r.data(i, l).isAnimating = !1, r.data(i, l).rootPropertyValueCache = {}; 74 var j, k = ["transformPerspective", "translateZ", "rotateX", "rotateY"], 75 m = !1; 76 for (var n in k) j = k[n], /^\(0[^.]/.test(r.data(i, l).transformCache[j]) && (m = !0, delete r.data(i, l).transformCache[j]); 77 e.mobileHA && (m = !0, delete r.data(i, l).transformCache.translate3d), m && v.flushTransformCache(i) 78 } 79 if (g === h - 1 && !e.loop && e.complete) { 80 var o = c.jquery ? c.get() : c; 81 e.complete.call(o, o) 82 } 83 e.queue !== !1 && r.dequeue(i, e.queue) 84 } 85 s.State.calls[a] = !1; 86 for (var p = 0, q = s.State.calls.length; q > p; p++) 87 if (s.State.calls[p] !== !1) { 88 f = !0; 89 break 90 } 91 f === !1 && (s.State.isTicking = !1, delete s.State.calls, s.State.calls = []) 92 } 93 var l = "velocity", 94 m = 400, 95 n = "swing", 96 o = function() { 97 if (c.documentMode) return c.documentMode; 98 for (var a = 7; a > 4; a--) { 99 var b = c.createElement("div"); 100 if (b.innerHTML = "<!--[if IE " + a + "]><span></span><![endif]-->", b.getElementsByTagName("span").length) return b = null, a 101 } 102 return d 103 }(), 104 p = b.requestAnimationFrame || function() { 105 var a = 0; 106 return b.webkitRequestAnimationFrame || b.mozRequestAnimationFrame || function(b) { 107 var c, d = (new Date).getTime(); 108 return c = Math.max(0, 16 - (d - a)), a = d + c, setTimeout(function() { 109 b(d + c) 110 }, c) 111 } 112 }(), 113 q = Array.isArray || function(a) { 114 return "[object Array]" === Object.prototype.toString.call(a) 115 }, 116 r = b.jQuery || a.Velocity && a.Velocity.Utilities; 117 if (!r) throw new Error("Velocity: Either jQuery or Velocity's jQuery shim must first be loaded."); 118 if (a.Velocity !== d && !a.Velocity.Utilities) throw new Error("Velocity: Namespace is occupied."); 119 if (7 >= o) { 120 if (b.jQuery) return void(b.jQuery.fn.velocity = b.jQuery.fn.animate); 121 throw new Error("Velocity: For IE<=7, Velocity falls back to jQuery, which must first be loaded.") 122 } 123 if (8 === o && !b.jQuery) throw new Error("Velocity: For IE8, Velocity requires jQuery to be loaded. (Velocity's jQuery shim does not work with IE8.)"); 124 var s = a.Velocity = a.velocity = r.extend(a.Velocity || {}, { 125 State: { 126 isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), 127 isAndroid: /Android/i.test(navigator.userAgent), 128 isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent), 129 prefixElement: c.createElement("div"), 130 prefixMatches: {}, 131 scrollAnchor: null, 132 scrollPropertyLeft: null, 133 scrollPropertyTop: null, 134 isTicking: !1, 135 calls: [] 136 }, 137 CSS: {}, 138 Utilities: {}, 139 Sequences: {}, 140 Easings: {}, 141 defaults: { 142 queue: "", 143 duration: m, 144 easing: n, 145 complete: null, 146 display: null, 147 loop: !1, 148 delay: !1, 149 mobileHA: !0, 150 _cacheValues: !0 151 }, 152 animate: function() {}, 153 debug: !1 154 }); 155 b.pageYOffset !== d ? (s.State.scrollAnchor = b, s.State.scrollPropertyLeft = "pageXOffset", s.State.scrollPropertyTop = "pageYOffset") : (s.State.scrollAnchor = c.documentElement || c.body.parentNode || c.body, s.State.scrollPropertyLeft = "scrollLeft", s.State.scrollPropertyTop = "scrollTop"); 156 var t = function() { 157 function a(a, b) { 158 return 1 - 3 * b + 3 * a 159 } 160 161 function b(a, b) { 162 return 3 * b - 6 * a 163 } 164 165 function c(a) { 166 return 3 * a 167 } 168 169 function d(d, e, f) { 170 return ((a(e, f) * d + b(e, f)) * d + c(e)) * d 171 } 172 173 function e(d, e, f) { 174 return 3 * a(e, f) * d * d + 2 * b(e, f) * d + c(e) 175 } 176 return function(a, b, c, f) { 177 function g(b) { 178 for (var f = b, g = 0; 8 > g; ++g) { 179 var h = e(f, a, c); 180 if (0 === h) return f; 181 var i = d(f, a, c) - b; 182 f -= i / h 183 } 184 return f 185 } 186 if (4 !== arguments.length) return !1; 187 for (var h = 0; 4 > h; ++h) 188 if ("number" != typeof arguments[h] || isNaN(arguments[h]) || !isFinite(arguments[h])) return !1; 189 return a = Math.min(a, 1), c = Math.min(c, 1), a = Math.max(a, 0), c = Math.max(c, 0), 190 function(e) { 191 return a === b && c === f ? e : d(g(e), b, f) 192 } 193 } 194 }(), 195 u = function() { 196 function a(a) { 197 return -a.tension * a.x - a.friction * a.v 198 } 199 200 function b(b, c, d) { 201 var e = { 202 x: b.x + d.dx * c, 203 v: b.v + d.dv * c, 204 tension: b.tension, 205 friction: b.friction 206 }; 207 return { 208 dx: e.v, 209 dv: a(e) 210 } 211 } 212 213 function c(c, d) { 214 var e = { 215 dx: c.v, 216 dv: a(c) 217 }, 218 f = b(c, .5 * d, e), 219 g = b(c, .5 * d, f), 220 h = b(c, d, g), 221 i = 1 / 6 * (e.dx + 2 * (f.dx + g.dx) + h.dx), 222 j = 1 / 6 * (e.dv + 2 * (f.dv + g.dv) + h.dv); 223 return c.x = c.x + i * d, c.v = c.v + j * d, c 224 } 225 return function d(a, b, e) { 226 var f, g, h, i = { 227 x: -1, 228 v: 0, 229 tension: null, 230 friction: null 231 }, 232 j = [0], 233 k = 0, 234 l = 1e-4, 235 m = .016; 236 for (a = parseFloat(a) || 600, b = parseFloat(b) || 20, e = e || null, i.tension = a, i.friction = b, f = null !== e, f ? (k = d(a, b), g = k / e * m) : g = m;;) 237 if (h = c(h || i, g), j.push(1 + h.x), k += 16, !(Math.abs(h.x) > l && Math.abs(h.v) > l)) break; 238 return f ? function(a) { 239 return j[a * (j.length - 1) | 0] 240 } : k 241 } 242 }(); 243 ! function() { 244 s.Easings.linear = function(a) { 245 return a 246 }, s.Easings.swing = function(a) { 247 return .5 - Math.cos(a * Math.PI) / 2 248 }, s.Easings.ease = t(.25, .1, .25, 1), s.Easings["ease-in"] = t(.42, 0, 1, 1), s.Easings["ease-out"] = t(0, 0, .58, 1), s.Easings["ease-in-out"] = t(.42, 0, .58, 1); 249 var a = {}; 250 r.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(b, c) { 251 a[c] = function(a) { 252 return Math.pow(a, b + 2) 253 } 254 }), r.extend(a, { 255 Sine: function(a) { 256 return 1 - Math.cos(a * Math.PI / 2) 257 }, 258 Circ: function(a) { 259 return 1 - Math.sqrt(1 - a * a) 260 }, 261 Elastic: function(a) { 262 return 0 === a || 1 === a ? a : -Math.pow(2, 8 * (a - 1)) * Math.sin((80 * (a - 1) - 7.5) * Math.PI / 15) 263 }, 264 Back: function(a) { 265 return a * a * (3 * a - 2) 266 }, 267 Bounce: function(a) { 268 for (var b, c = 4; a < ((b = Math.pow(2, --c)) - 1) / 11;);
269 return 1 / Math.pow(4, 3 - c) - 7.5625 * Math.pow((3 * b - 2) / 22 - a, 2) 270 } 271 }), r.each(a, function(a, b) { 272 s.Easings["easeIn" + a] = b, s.Easings["easeOut" + a] = function(a) { 273 return 1 - b(1 - a) 274 }, s.Easings["easeInOut" + a] = function(a) { 275 return .5 > a ? b(2 * a) / 2 : 1 - b(-2 * a + 2) / 2 276 } 277 }), s.Easings.spring = function(a) { 278 return 1 - Math.cos(4.5 * a * Math.PI) * Math.exp(6 * -a) 279 } 280 }(); 281 var v = s.CSS = { 282 RegEx: { 283 valueUnwrap: /^[A-z]+\((.*)\)$/i, 284 wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, 285 valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi 286 }, 287 Hooks: { 288 templates: { 289 color: ["Red Green Blue Alpha", "255 255 255 1"], 290 backgroundColor: ["Red Green Blue Alpha", "255 255 255 1"], 291 borderColor: ["Red Green Blue Alpha", "255 255 255 1"], 292 borderTopColor: ["Red Green Blue Alpha", "255 255 255 1"], 293 borderRightColor: ["Red Green Blue Alpha", "255 255 255 1"], 294 borderBottomColor: ["Red Green Blue Alpha", "255 255 255 1"], 295 borderLeftColor: ["Red Green Blue Alpha", "255 255 255 1"], 296 outlineColor: ["Red Green Blue Alpha", "255 255 255 1"], 297 textShadow: ["Color X Y Blur", "black 0px 0px 0px"], 298 boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"], 299 clip: ["Top Right Bottom Left", "0px 0px 0px 0px"], 300 backgroundPosition: ["X Y", "0% 0%"], 301 transformOrigin: ["X Y Z", "50% 50% 0%"], 302 perspectiveOrigin: ["X Y", "50% 50%"] 303 }, 304 registered: {}, 305 register: function() { 306 var a, b, c; 307 if (o) 308 for (a in v.Hooks.templates) { 309 b = v.Hooks.templates[a], c = b[0].split(" "); 310 var d = b[1].match(v.RegEx.valueSplit); 311 "Color" === c[0] && (c.push(c.shift()), d.push(d.shift()), v.Hooks.templates[a] = [c.join(" "), d.join(" ")]) 312 } 313 for (a in v.Hooks.templates) { 314 b = v.Hooks.templates[a], c = b[0].split(" "); 315 for (var e in c) { 316 var f = a + c[e], 317 g = e; 318 v.Hooks.registered[f] = [a, g] 319 } 320 } 321 }, 322 getRoot: function(a) { 323 var b = v.Hooks.registered[a]; 324 return b ? b[0] : a 325 }, 326 cleanRootPropertyValue: function(a, b) { 327 return v.RegEx.valueUnwrap.test(b) && (b = b.match(v.Hooks.RegEx.valueUnwrap)[1]), v.Values.isCSSNullValue(b) && (b = v.Hooks.templates[a][1]), b 328 }, 329 extractValue: function(a, b) { 330 var c = v.Hooks.registered[a]; 331 if (c) { 332 var d = c[0], 333 e = c[1]; 334 return b = v.Hooks.cleanRootPropertyValue(d, b), b.toString().match(v.RegEx.valueSplit)[e] 335 } 336 return b 337 }, 338 injectValue: function(a, b, c) { 339 var d = v.Hooks.registered[a]; 340 if (d) { 341 var e, f, g = d[0], 342 h = d[1]; 343 return c = v.Hooks.cleanRootPropertyValue(g, c), e = c.toString().match(v.RegEx.valueSplit), e[h] = b, f = e.join(" ") 344 } 345 return c 346 } 347 }, 348 Normalizations: { 349 registered: { 350 clip: function(a, b, c) { 351 switch (a) { 352 case "name": 353 return "clip"; 354 case "extract": 355 var d; 356 return v.RegEx.wrappedValueAlreadyExtracted.test(c) ? d = c : (d = c.toString().match(v.RegEx.valueUnwrap), d = d ? d[1].replace(/,(\s+)?/g, " ") : c), d; 357 case "inject": 358 return "rect(" + c + ")" 359 } 360 }, 361 opacity: function(a, b, c) { 362 if (8 >= o) switch (a) { 363 case "name": 364 return "filter"; 365 case "extract": 366 var d = c.toString().match(/alpha\(opacity=(.*)\)/i); 367 return c = d ? d[1] / 100 : 1; 368 case "inject": 369 return b.style.zoom = 1, parseFloat(c) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(c), 10) + ")" 370 } else switch (a) { 371 case "name": 372 return "opacity"; 373 case "extract": 374 return c; 375 case "inject": 376 return c 377 } 378 } 379 }, 380 register: function() { 381 function a(a) { 382 var b, c = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, 383 d = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i; 384 return a = a.replace(c, function(a, b, c, d) { 385 return b + b + c + c + d + d 386 }), b = d.exec(a), b ? "rgb(" + (parseInt(b[1], 16) + " " + parseInt(b[2], 16) + " " + parseInt(b[3], 16)) + ")" : "rgb(0 0 0)" 387 } 388 var b = ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"]; 389 9 >= o || s.State.isGingerbread || (b = b.concat(["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"])); 390 for (var c = 0, e = b.length; e > c; c++) ! function() { 391 var a = b[c]; 392 v.Normalizations.registered[a] = function(b, c, e) { 393 switch (b) { 394 case "name": 395 return "transform"; 396 case "extract": 397 return r.data(c, l).transformCache[a] === d ? /^scale/i.test(a) ? 1 : 0 : r.data(c, l).transformCache[a].replace(/[()]/g, ""); 398 case "inject": 399 var f = !1; 400 switch (a.substr(0, a.length - 1)) { 401 case "translate": 402 f = !/(%|px|em|rem|\d)$/i.test(e); 403 break; 404 case "scal": 405 case "scale": 406 s.State.isAndroid && r.data(c, l).transformCache[a] === d && (e = 1), f = !/(\d)$/i.test(e); 407 break; 408 case "skew": 409 f = !/(deg|\d)$/i.test(e); 410 break; 411 case "rotate": 412 f = !/(deg|\d)$/i.test(e) 413 } 414 return f || (r.data(c, l).transformCache[a] = "(" + e + ")"), r.data(c, l).transformCache[a] 415 } 416 } 417 }(); 418 for (var f = ["color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"], c = 0, g = f.length; g > c; c++) ! function() { 419 var b = f[c]; 420 v.Normalizations.registered[b] = function(c, e, f) { 421 switch (c) { 422 case "name": 423 return b; 424 case "extract": 425 var g; 426 if (v.RegEx.wrappedValueAlreadyExtracted.test(f)) g = f; 427 else { 428 var h, i = { 429 aqua: "rgb(0, 255, 255);", 430 black: "rgb(0, 0, 0)", 431 blue: "rgb(0, 0, 255)", 432 fuchsia: "rgb(255, 0, 255)", 433 gray: "rgb(128, 128, 128)", 434 green: "rgb(0, 128, 0)", 435 lime: "rgb(0, 255, 0)",
436 maroon: "rgb(128, 0, 0)", 437 navy: "rgb(0, 0, 128)", 438 olive: "rgb(128, 128, 0)", 439 purple: "rgb(128, 0, 128)", 440 red: "rgb(255, 0, 0)", 441 silver: "rgb(192, 192, 192)", 442 teal: "rgb(0, 128, 128)", 443 white: "rgb(255, 255, 255)", 444 yellow: "rgb(255, 255, 0)" 445 }; 446 /^[A-z]+$/i.test(f) ? h = i[f] !== d ? i[f] : i.black : /^#([A-f\d]{3}){1,2}$/i.test(f) ? h = a(f) : /^rgba?\(/i.test(f) || (h = i.black), g = (h || f).toString().match(v.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ") 447 } 448 return 8 >= o || 3 !== g.split(" ").length || (g += " 1"), g; 449 case "inject": 450 return 8 >= o ? 4 === f.split(" ").length && (f = f.split(/\s+/).slice(0, 3).join(" ")) : 3 === f.split(" ").length && (f += " 1"), (8 >= o ? "rgb" : "rgba") + "(" + f.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")" 451 } 452 } 453 }() 454 } 455 }, 456 Names: { 457 camelCase: function(a) { 458 return a.replace(/-(\w)/g, function(a, b) { 459 return b.toUpperCase() 460 }) 461 }, 462 prefixCheck: function(a) { 463 if (s.State.prefixMatches[a]) return [s.State.prefixMatches[a], !0]; 464 for (var b = ["", "Webkit", "Moz", "ms", "O"], c = 0, d = b.length; d > c; c++) { 465 var e; 466 if (e = 0 === c ? a : b[c] + a.replace(/^\w/, function(a) { 467 return a.toUpperCase() 468 }), "string" == typeof s.State.prefixElement.style[e]) return s.State.prefixMatches[a] = e, [e, !0] 469 } 470 return [a, !1] 471 } 472 }, 473 Values: { 474 isCSSNullValue: function(a) { 475 return 0 == a || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a) 476 }, 477 getUnitType: function(a) { 478 return /^(rotate|skew)/i.test(a) ? "deg" : /(^(scale|scaleX|scaleY|scaleZ|opacity|alpha|fillOpacity|flexGrow|flexHeight|zIndex|fontWeight)$)|color/i.test(a) ? "" : "px" 479 }, 480 getDisplayType: function(a) { 481 var b = a.tagName.toString().toLowerCase(); 482 return /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(b) ? "inline" : /^(li)$/i.test(b) ? "list-item" : /^(tr)$/i.test(b) ? "table-row" : "block" 483 } 484 }, 485 getPropertyValue: function(a, c, e, f) { 486 function g(a, c) { 487 var e = 0; 488 if (8 >= o) e = r.css(a, c); 489 else { 490 if (!f) { 491 if ("height" === c && "border-box" !== v.getPropertyValue(a, "boxSizing").toString().toLowerCase()) return a.offsetHeight - (parseFloat(v.getPropertyValue(a, "borderTopWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "borderBottomWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingTop")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingBottom")) || 0); 492 if ("width" === c && "border-box" !== v.getPropertyValue(a, "boxSizing").toString().toLowerCase()) return a.offsetWidth - (parseFloat(v.getPropertyValue(a, "borderLeftWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "borderRightWidth")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingLeft")) || 0) - (parseFloat(v.getPropertyValue(a, "paddingRight")) || 0) 493 } 494 var h; 495 h = r.data(a, l) === d ? b.getComputedStyle(a, null) : r.data(a, l).computedStyle ? r.data(a, l).computedStyle : r.data(a, l).computedStyle = b.getComputedStyle(a, null), o && "borderColor" === c && (c = "borderTopColor"), e = 9 === o && "filter" === c ? h.getPropertyValue(c) : h[c], ("" === e || null === e) && (e = a.style[c]) 496 } 497 if ("auto" === e && /^(top|right|bottom|left)$/i.test(c)) { 498 var i = g(a, "position"); 499 ("fixed" === i || "absolute" === i && /top|left/i.test(c)) && (e = r(a).position()[c] + "px") 500 } 501 return e 502 } 503 var h; 504 if (v.Hooks.registered[c]) { 505 var i = c, 506 j = v.Hooks.getRoot(i); 507 e === d && (e = v.getPropertyValue(a, v.Names.prefixCheck(j)[0])), v.Normalizations.registered[j] && (e = v.Normalizations.registered[j]("extract", a, e)), h = v.Hooks.extractValue(i, e) 508 } else if (v.Normalizations.registered[c]) { 509 var k, m;
510 k = v.Normalizations.registered[c]("name", a), "transform" !== k && (m = g(a, v.Names.prefixCheck(k)[0]), v.Values.isCSSNullValue(m) && v.Hooks.templates[c] && (m = v.Hooks.templates[c][1])), h = v.Normalizations.registered[c]("extract", a, m) 511 } 512 return /^[\d-]/.test(h) || (h = g(a, v.Names.prefixCheck(c)[0])), v.Values.isCSSNullValue(h) && (h = 0), s.debug >= 2 && console.log("Get " + c + ": " + h), h 513 }, 514 setPropertyValue: function(a, c, d, e, f) { 515 var g = c; 516 if ("scroll" === c) f.container ? f.container["scroll" + f.direction] = d : "Left" === f.direction ? b.scrollTo(d, f.alternateValue) : b.scrollTo(f.alternateValue, d); 517 else if (v.Normalizations.registered[c] && "transform" === v.Normalizations.registered[c]("name", a)) v.Normalizations.registered[c]("inject", a, d), g = "transform", d = r.data(a, l).transformCache[c]; 518 else { 519 if (v.Hooks.registered[c]) { 520 var h = c, 521 i = v.Hooks.getRoot(c); 522 e = e || v.getPropertyValue(a, i), d = v.Hooks.injectValue(h, d, e), c = i 523 } 524 if (v.Normalizations.registered[c] && (d = v.Normalizations.registered[c]("inject", a, d), c = v.Normalizations.registered[c]("name", a)), g = v.Names.prefixCheck(c)[0], 8 >= o) try { 525 a.style[g] = d 526 } catch (j) { 527 console.log("Error setting [" + g + "] to [" + d + "]") 528 } else a.style[g] = d; 529 s.debug >= 2 && console.log("Set " + c + " (" + g + "): " + d) 530 } 531 return [g, d] 532 }, 533 flushTransformCache: function(a) { 534 var b, c, d, e = ""; 535 for (b in r.data(a, l).transformCache) c = r.data(a, l).transformCache[b], "transformPerspective" !== b ? (9 === o && "rotateZ" === b && (b = "rotate"), e += b + c + " ") : d = c; 536 d && (e = "perspective" + d + " " + e), v.setPropertyValue(a, "transform", e) 537 } 538 }; 539 v.Hooks.register(), v.Normalizations.register(), s.animate = function() { 540 function a() { 541 function a() { 542 function a(a) { 543 var c = d, 544 e = d, 545 h = d; 546 return q(a) ? (c = a[0], !q(a[1]) && /^[\d-]/.test(a[1]) || f(a[1]) ? h = a[1] : ("string" == typeof a[1] || q(a[1])) && (e = i(a[1], g.duration), a[2] && (h = a[2]))) : c = a, e = e || g.easing, f(c) && (c = c.call(b, x, w)), f(h) && (h = h.call(b, x, w)), [c || 0, e, h] 547 } 548 549 function m(a, b) { 550 var c, d; 551 return d = (b || 0).toString().toLowerCase().replace(/[%A-z]+$/, function(a) { 552 return c = a, "" 553 }), c || (c = v.Values.getUnitType(a)), [d, c] 554 } 555 556 function t() { 557 var a = { 558 parent: b.parentNode, 559 position: v.getPropertyValue(b, "position"), 560 fontSize: v.getPropertyValue(b, "fontSize") 561 }, 562 d = a.position === D.lastPosition && a.parent === D.lastParent, 563 e = a.fontSize === D.lastFontSize && a.parent === D.lastParent; 564 D.lastParent = a.parent, D.lastPosition = a.position, D.lastFontSize = a.fontSize, null === D.remToPxRatio && (D.remToPxRatio = parseFloat(v.getPropertyValue(c.body, "fontSize")) || 16); 565 var f = { 566 overflowX: null, 567 overflowY: null, 568 boxSizing: null, 569 width: null, 570 minWidth: null, 571 maxWidth: null, 572 height: null, 573 minHeight: null, 574 maxHeight: null, 575 paddingLeft: null 576 }, 577 g = {}, 578 h = 10; 579 if (g.remToPxRatio = D.remToPxRatio, o) var i = /^auto$/i.test(b.currentStyle.width), 580 j = /^auto$/i.test(b.currentStyle.height); 581 d && e || (f.overflowX = v.getPropertyValue(b, "overflowX"), f.overflowY = v.getPropertyValue(b, "overflowY"), f.boxSizing = v.getPropertyValue(b, "boxSizing"), f.width = v.getPropertyValue(b, "width", null, !0), f.minWidth = v.getPropertyValue(b, "minWidth"), f.maxWidth = v.getPropertyValue(b, "maxWidth") || "none", f.height = v.getPropertyValue(b, "height", null, !0), f.minHeight = v.getPropertyValue(b, "minHeight"), f.maxHeight = v.getPropertyValue(b, "maxHeight") || "none", f.paddingLeft = v.getPropertyValue(b, "paddingLeft")), d ? (g.percentToPxRatioWidth = D.lastPercentToPxWidth, g.percentToPxRatioHeight = D.lastPercentToPxHeight) : (v.setPropertyValue(b, "overflowX", "hidden"), v.setPropertyValue(b, "overflowY", "hidden"), v.setPropertyValue(b, "boxSizing", "content-box"), v.setPropertyValue(b, "width", h + "%"), v.setPropertyValue(b, "minWidth", h + "%"), v.setPropertyValue(b, "maxWidth", h + "%"), v.setPropertyValue(b, "height", h + "%"), v.setPropertyValue(b, "minHeight", h + "%"), v.setPropertyValue(b, "maxHeight", h + "%")), e ? g.emToPxRatio = D.lastEmToPx : v.setPropertyValue(b, "paddingLeft", h + "em"), d || (g.percentToPxRatioWidth = D.lastPercentToPxWidth = (parseFloat(v.getPropertyValue(b, "width", null, !0)) || 1) / h, g.percentToPxRatioHeight = D.lastPercentToPxHeight = (parseFloat(v.getPropertyValue(b, "height", null, !0)) || 1) / h), e || (g.emToPxRatio = D.lastEmToPx = (parseFloat(v.getPropertyValue(b, "paddingLeft")) || 1) / h); 582 for (var k in f) null !== f[k] && v.setPropertyValue(b, k, f[k]); 583 return o ? (i && v.setPropertyValue(b, "width", "auto"), j && v.setPropertyValue(b, "height", "auto")) : (v.setPropertyValue(b, "height", "auto"), f.height !== v.getPropertyValue(b, "height", null, !0) && v.setPropertyValue(b, "height", f.height), v.setPropertyValue(b, "width", "auto"), f.width !== v.getPropertyValue(b, "width", null, !0) && v.setPropertyValue(b, "width", f.width)), s.debug >= 1 && console.log("Unit ratios: " + JSON.stringify(g), b), g 584 } 585 if (0 === x && p && f(p.begin)) { 586 var u = k.jquery ? k.get() : k; 587 p.begin.call(u, u) 588 } 589 if ("scroll" === A) { 590 var y, z, B, C = /^x$/i.test(g.axis) ? "Left" : "Top", 591 F = parseFloat(g.offset) || 0; 592 g.container ? g.container.jquery || g.container.nodeType ? (g.container = g.container[0] || g.container, y = g.container["scroll" + C], B = y + r(b).position()[C.toLowerCase()] + F) : g.container = null : (y = s.State.scrollAnchor[s.State["scrollProperty" + C]], z = s.State.scrollAnchor[s.State["scrollProperty" + ("Left" === C ? "Top" : "Left")]], B = r(b).offset()[C.toLowerCase()] + F), h = { 593 scroll: { 594 rootPropertyValue: !1, 595 startValue: y,
596 currentValue: y, 597 endValue: B, 598 unitType: "", 599 easing: g.easing, 600 scrollData: { 601 container: g.container, 602 direction: C, 603 alternateValue: z 604 } 605 }, 606 element: b 607 } 608 } else if ("reverse" === A) { 609 if (!r.data(b, l).tweensContainer) return void r.dequeue(b, g.queue); 610 "none" === r.data(b, l).opts.display && (r.data(b, l).opts.display = "block"), r.data(b, l).opts.loop = !1, r.data(b, l).opts.begin = null, r.data(b, l).opts.complete = null, p.easing || delete g.easing, p.duration || delete g.duration, g = r.extend({}, r.data(b, l).opts, g); 611 var G = r.extend(!0, {}, r.data(b, l).tweensContainer); 612 for (var H in G) 613 if ("element" !== H) { 614 var I = G[H].startValue; 615 G[H].startValue = G[H].currentValue = G[H].endValue, G[H].endValue = I, p && (G[H].easing = g.easing) 616 } 617 h = G 618 } else if ("start" === A) { 619 var G; 620 r.data(b, l).tweensContainer && r.data(b, l).isAnimating === !0 && (G = r.data(b, l).tweensContainer); 621 for (var J in n) { 622 var K = a(n[J]), 623 L = K[0], 624 M = K[1], 625 N = K[2]; 626 J = v.Names.camelCase(J); 627 var O = v.Hooks.getRoot(J), 628 P = !1; 629 if (v.Names.prefixCheck(O)[1] !== !1 || v.Normalizations.registered[O] !== d) { 630 g.display && "none" !== g.display && /opacity|filter/.test(J) && !N && 0 !== L && (N = 0), g._cacheValues && G && G[J] ? (N === d && (N = G[J].endValue + G[J].unitType), P = r.data(b, l).rootPropertyValueCache[O]) : v.Hooks.registered[J] ? N === d ? (P = v.getPropertyValue(b, O), N = v.getPropertyValue(b, J, P)) : P = v.Hooks.templates[O][1] : N === d && (N = v.getPropertyValue(b, J)); 631 var Q, R, S, T; 632 Q = m(J, N), N = Q[0], S = Q[1], Q = m(J, L), L = Q[0].replace(/^([+-\/*])=/, function(a, b) { 633 return T = b, "" 634 }), R = Q[1], N = parseFloat(N) || 0, L = parseFloat(L) || 0; 635 var U; 636 if ("%" === R && (/^(fontSize|lineHeight)$/.test(J) ? (L /= 100, R = "em") : /^scale/.test(J) ? (L /= 100, R = "") : /(Red|Green|Blue)$/i.test(J) && (L = L / 100 * 255, R = "")), /[\/*]/.test(T)) R = S; 637 else if (S !== R && 0 !== N) 638 if (0 === L) R = S; 639 else { 640 U = U || t(); 641 var V = /margin|padding|left|right|width|text|word|letter/i.test(J) || /X$/.test(J) ? "x" : "y"; 642 switch (S) { 643 case "%": 644 N *= "x" === V ? U.percentToPxRatioWidth : U.percentToPxRatioHeight; 645 break; 646 case "em": 647 N *= U.emToPxRatio; 648 break; 649 case "rem": 650 N *= U.remToPxRatio; 651 break; 652 case "px": 653 } 654 switch (R) { 655 case "%": 656 N *= 1 / ("x" === V ? U.percentToPxRatioWidth : U.percentToPxRatioHeight); 657 break; 658 case "em": 659 N *= 1 / U.emToPxRatio; 660 break; 661 case "rem": 662 N *= 1 / U.remToPxRatio; 663 break; 664 case "px": 665 } 666 } 667 switch (T) { 668 case "+": 669 L = N + L; 670 break; 671 case "-": 672 L = N - L; 673 break; 674 case "*": 675 L = N * L; 676 break; 677 case "/": 678 L = N / L 679 } 680 h[J] = { 681 rootPropertyValue: P, 682 startValue: N, 683 currentValue: N, 684 endValue: L, 685 unitType: R, 686 easing: M 687 }, s.debug && console.log("tweensContainer (" + J + "): " + JSON.stringify(h[J]), b) 688 } else s.debug && console.log("Skipping [" + O + "] due to a lack of browser support.") 689 } 690 h.element = b 691 } 692 h.element && (E.push(h), r.data(b, l).tweensContainer = h, r.data(b, l).opts = g, r.data(b, l).isAnimating = !0, x === w - 1 ? (s.State.calls.length > 1e4 && (s.State.calls = e(s.State.calls)), s.State.calls.push([E, k, g]), s.State.isTicking === !1 && (s.State.isTicking = !0, j())) : x++) 693 } 694 var b = this, 695 g = r.extend({}, s.defaults, p), 696 h = {}; 697 if ("stop" === A) return r.queue(b, "string" == typeof p ? p
697: "", []), !0; 698 switch (r.data(b, l) === d && r.data(b, l, { 699 isAnimating: !1, 700 computedStyle: null, 701 tweensContainer: null, 702 rootPropertyValueCache: {}, 703 transformCache: {} 704 }), /^\d/.test(g.delay) && g.queue !== !1 && r.queue(b, g.queue, function(a) { 705 s.velocityQueueEntryFlag = !0, setTimeout(a, parseFloat(g.delay)) 706 }), g.duration.toString().toLowerCase()) { 707 case "fast": 708 g.duration = 200; 709 break; 710 case "normal": 711 g.duration = m; 712 break; 713 case "slow": 714 g.duration = 600; 715 break; 716 default: 717 g.duration = parseFloat(g.duration) || 1 718 } 719 g.easing = i(g.easing, g.duration), p && p.complete && !f(p.complete) && (p.complete = null), g.display && (g.display = g.display.toString().toLowerCase()), g.mobileHA = g.mobileHA && s.State.isMobile && !s.State.isGingerbread, g.queue === !1 ? g.delay ? setTimeout(a, g.delay) : a() : r.queue(b, g.queue, function(b) { 720 s.velocityQueueEntryFlag = !0, a(b) 721 }), "" !== g.queue && "fx" !== g.queue || "inprogress" === r.queue(b)[0] || r.dequeue(b) 722 } 723 var b, k, n, p, t = arguments[0] && arguments[0].properties !== d, 724 u = h(this); 725 u ? (k = this, b = 0) : (k = t ? arguments[0].elements : arguments[0], k = h(k) ? [].slice.call(k) : k, b = 1), t ? (n = arguments[0].properties, p = arguments[0].options) : (n = arguments[b], p = arguments[b + 1]); 726 var w = g(k) || q(k) ? k.length : 1, 727 x = 0; 728 if ("stop" !== n && !r.isPlainObject(p)) { 729 var y = b + 1; 730 p = {}; 731 for (var z = y; z < arguments.length; z++) !q(arguments[z]) && /^\d/.test(arguments[z]) ? p.duration = parseFloat(arguments[z]) : "string" == typeof arguments[z] ? p.easing = arguments[z] : !q(arguments[z]) || 2 !== arguments[z].length && 4 !== arguments[z].length ? f(arguments[z]) && (p.complete = arguments[z]) : p.easing = arguments[z] 732 } 733 var A; 734 switch (n) { 735 case "scroll": 736 A = "scroll"; 737 break; 738 case "reverse": 739 A = "reverse"; 740 break; 741 case "stop": 742 A = "stop"; 743 break; 744 default: 745 if (!r.isPlainObject(n) || r.isEmptyObject(n)) { 746 if ("string" == typeof n && s.Sequences[n]) { 747 var B = k, 748 C = p.duration; 749 return p.backwards === !0 && (k = (k.jquery ? [].slice.call(k) : k).reverse()), r.each(k, function(a, b) { 750 parseFloat(p.stagger) && (p.delay = parseFloat(p.stagger) * a), p.drag && (p.duration = parseFloat(C) || (/^(callout|transition)/.test(n) ? 1e3 : m), p.duration = Math.max(p.duration * (p.backwards ? 1 - a / w : (a + 1) / w), .75 * p.duration, 200)), s.Sequences[n].call(b, b, p || {}, a, w) 751 }), B 752 } 753 return console.log("First argument was not a property map, a known action, or a registered sequence. Aborting."), k 754 } 755 A = "start" 756 } 757 var D = { 758 lastParent: null, 759 lastPosition: null, 760 lastFontSize: null, 761 lastPercentToPxWidth: null, 762 lastPercentToPxHeight: null, 763 lastEmToPx: null, 764 remToPxRatio: null 765 }, 766 E = []; 767 if (u) k.each(a); 768 else if (1 === w && k.nodeType) a.call(k); 769 else 770 for (var F in k) k[F].nodeType && a.call(k[F]); 771 var G, H = r.extend({}, s.defaults, p); 772 if (H.loop = parseInt(H.loop), G = 2 * H.loop - 1, H.loop) 773 for (var I = 0; G > I; I++) { 774 var J = { 775 delay: H.delay 776 }; 777 H.complete && I === G - 1 && (J.complete = H.complete), u ? k.velocity("reverse", J) : s.animate(k, "reverse", J) 778 } 779 return k 780 }; 781 var w = b.jQuery || b.Zepto; 782 w ? (w.fn.velocity = s.animate, w.fn.velocity.defaults = s.defaults) : "undefined" != typeof define && define.amd ? define(function() { 783 return s 784 }) : "undefined" != typeof module && module.exports && (module.exports = s), r.each(["Down", "Up"], function(a, b) { 785 s.Sequences["slide" + b] = function(a, c) { 786 var d = r.extend({}, c), 787 e = { 788 height: null, 789 marginTop: null, 790 marginBottom: null, 791 paddingTop: null, 792 paddingBottom: null, 793 overflow: null, 794 overflowX: null, 795 overflowY: null 796 }, 797 f = d.begin, 798 g = d.complete, 799 h = !1; 800 d.display = "Down" === b ? d.display || "block" : d.display || "none", d.begin = function() { 801 function c() { 802 a.style.display = "block", e.height = s.CSS.getPropertyValue(a, "height"), a.style.height = "auto", s.CSS.getPropertyValue(a, "height") === e.height && (h = !0), s.CSS.setPropertyValue(a, "height", e.height + "px") 803 } 804 if ("Down" === b) { 805 e.overflow = [s.CSS.getPropertyValue(a, "overflow"), 0], e.overflowX = [s.CSS.getPropertyValue(a, "overflowX"), 0], e.overflowY = [s.CSS.getPropertyValue(a, "overflowY"), 0], a.style.overflow = "hidden", a.style.overflowX = "visible", a.style.overflowY = "hidden", c(); 806 for (var d in e) /^overflow/.test(d) || (e[d] = [s.CSS.getPropertyValue(a, d), 0]); 807 a.style.display = "none" 808 } else { 809 c();
810 for (var d in e) e[d] = [0, s.CSS.getPropertyValue(a, d)]; 811 a.style.overflow = "hidden", a.style.overflowX = "visible", a.style.overflowY = "hidden" 812 } 813 f && f.call(a, a) 814 }, d.complete = function(a) { 815 var c = "Down" === b ? 0 : 1; 816 h === !0 ? e.height[c] = "auto" : e.height[c] += "px"; 817 for (var d in e) a.style[d] = e[d][c]; 818 g && g.call(a, a) 819 }, s.animate(a, e, d) 820 } 821 }), r.each(["In", "Out"], function(a, b) { 822 s.Sequences["fade" + b] = function(a, c, d, e) { 823 var f = r.extend({}, c), 824 g = { 825 opacity: "In" === b ? 1 : 0 826 }; 827 d !== e - 1 && (f.complete = f.begin = null), null !== f.display && (f.display = "In" === b ? s.CSS.Values.getDisplayType(a) : "none"), s.animate(this, g, f) 828 } 829 }) 830}(window.jQuery || window.Zepto || window, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.