Advertisement
Guest User

Untitled

a guest
May 28th, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- a/velocity.js   2015-05-24 19:20:26.755835442 -0300
  2. +++ b/velocity.js   2015-05-28 11:10:38.197740315 -0300
  3. @@ -1,405 +1,406 @@
  4.  /*! VelocityJS.org (1.2.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
  5.  
  6. -/*************************
  7. -   Velocity jQuery Shim
  8. -*************************/
  9. -
  10. -/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
  11. -
  12. -/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity's dependency on a full copy of jQuery, and allowing it to work in any environment. */
  13. -/* These shimmed functions are only used if jQuery isn't present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */
  14. -/* Browser support: Using this shim instead of jQuery proper removes support for IE8. */
  15. -
  16. -;(function (window) {
  17. -    /***************
  18. -         Setup
  19. -    ***************/
  20. -
  21. -    /* If jQuery is already loaded, there's no point in loading this shim. */
  22. -    if (window.jQuery) {
  23. -        return;
  24. -    }
  25. -
  26. -    /* jQuery base. */
  27. -    var $ = function (selector, context) {
  28. -        return new $.fn.init(selector, context);
  29. -    };
  30. -
  31. -    /********************
  32. -       Private Methods
  33. -    ********************/
  34. -
  35. -    /* jQuery */
  36. -    $.isWindow = function (obj) {
  37. -        /* jshint eqeqeq: false */
  38. -        return obj != null && obj == obj.window;
  39. -    };
  40. -
  41. -    /* jQuery */
  42. -    $.type = function (obj) {
  43. -        if (obj == null) {
  44. -            return obj + "";
  45. -        }
  46. -
  47. -        return typeof obj === "object" || typeof obj === "function" ?
  48. -            class2type[toString.call(obj)] || "object" :
  49. -            typeof obj;
  50. -    };
  51. -
  52. -    /* jQuery */
  53. -    $.isArray = Array.isArray || function (obj) {
  54. -        return $.type(obj) === "array";
  55. -    };
  56. -
  57. -    /* jQuery */
  58. -    function isArraylike (obj) {
  59. -        var length = obj.length,
  60. -            type = $.type(obj);
  61. -
  62. -        if (type === "function" || $.isWindow(obj)) {
  63. -            return false;
  64. -        }
  65. -
  66. -        if (obj.nodeType === 1 && length) {
  67. -            return true;
  68. -        }
  69. -
  70. -        return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj;
  71. -    }
  72. -
  73. -    /***************
  74. -       $ Methods
  75. -    ***************/
  76. -
  77. -    /* jQuery: Support removed for IE<9. */
  78. -    $.isPlainObject = function (obj) {
  79. -        var key;
  80. -
  81. -        if (!obj || $.type(obj) !== "object" || obj.nodeType || $.isWindow(obj)) {
  82. -            return false;
  83. -        }
  84. -
  85. -        try {
  86. -            if (obj.constructor &&
  87. -                !hasOwn.call(obj, "constructor") &&
  88. -                !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
  89. -                return false;
  90. -            }
  91. -        } catch (e) {
  92. -            return false;
  93. -        }
  94. -
  95. -        for (key in obj) {}
  96. -
  97. -        return key === undefined || hasOwn.call(obj, key);
  98. -    };
  99. -
  100. -    /* jQuery */
  101. -    $.each = function(obj, callback, args) {
  102. -        var value,
  103. -            i = 0,
  104. -            length = obj.length,
  105. -            isArray = isArraylike(obj);
  106. -
  107. -        if (args) {
  108. -            if (isArray) {
  109. -                for (; i < length; i++) {
  110. -                    value = callback.apply(obj[i], args);
  111. -
  112. -                    if (value === false) {
  113. -                        break;
  114. -                    }
  115. -                }
  116. -            } else {
  117. -                for (i in obj) {
  118. -                    value = callback.apply(obj[i], args);
  119. -
  120. -                    if (value === false) {
  121. -                        break;
  122. -                    }
  123. -                }
  124. -            }
  125. -
  126. -        } else {
  127. -            if (isArray) {
  128. -                for (; i < length; i++) {
  129. -                    value = callback.call(obj[i], i, obj[i]);
  130. -
  131. -                    if (value === false) {
  132. -                        break;
  133. -                    }
  134. -                }
  135. -            } else {
  136. -                for (i in obj) {
  137. -                    value = callback.call(obj[i], i, obj[i]);
  138. -
  139. -                    if (value === false) {
  140. -                        break;
  141. -                    }
  142. -                }
  143. -            }
  144. -        }
  145. -
  146. -        return obj;
  147. -    };
  148. -
  149. -    /* Custom */
  150. -    $.data = function (node, key, value) {
  151. -        /* $.getData() */
  152. -        if (value === undefined) {
  153. -            var id = node[$.expando],
  154. -                store = id && cache[id];
  155. -
  156. -            if (key === undefined) {
  157. -                return store;
  158. -            } else if (store) {
  159. -                if (key in store) {
  160. -                    return store[key];
  161. -                }
  162. -            }
  163. -        /* $.setData() */
  164. -        } else if (key !== undefined) {
  165. -            var id = node[$.expando] || (node[$.expando] = ++$.uuid);
  166. -
  167. -            cache[id] = cache[id] || {};
  168. -            cache[id][key] = value;
  169. -
  170. -            return value;
  171. -        }
  172. -    };
  173. -
  174. -    /* Custom */
  175. -    $.removeData = function (node, keys) {
  176. -        var id = node[$.expando],
  177. -            store = id && cache[id];
  178. -
  179. -        if (store) {
  180. -            $.each(keys, function(_, key) {
  181. -                delete store[key];
  182. -            });
  183. -        }
  184. -    };
  185. -
  186. -    /* jQuery */
  187. -    $.extend = function () {
  188. -        var src, copyIsArray, copy, name, options, clone,
  189. -            target = arguments[0] || {},
  190. -            i = 1,
  191. -            length = arguments.length,
  192. -            deep = false;
  193. -
  194. -        if (typeof target === "boolean") {
  195. -            deep = target;
  196. -
  197. -            target = arguments[i] || {};
  198. -            i++;
  199. -        }
  200. -
  201. -        if (typeof target !== "object" && $.type(target) !== "function") {
  202. -            target = {};
  203. -        }
  204. -
  205. -        if (i === length) {
  206. -            target = this;
  207. -            i--;
  208. -        }
  209. -
  210. -        for (; i < length; i++) {
  211. -            if ((options = arguments[i]) != null) {
  212. -                for (name in options) {
  213. -                    src = target[name];
  214. -                    copy = options[name];
  215. -
  216. -                    if (target === copy) {
  217. -                        continue;
  218. -                    }
  219. -
  220. -                    if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
  221. -                        if (copyIsArray) {
  222. -                            copyIsArray = false;
  223. -                            clone = src && $.isArray(src) ? src : [];
  224. -
  225. -                        } else {
  226. -                            clone = src && $.isPlainObject(src) ? src : {};
  227. -                        }
  228. -
  229. -                        target[name] = $.extend(deep, clone, copy);
  230. -
  231. -                    } else if (copy !== undefined) {
  232. -                        target[name] = copy;
  233. -                    }
  234. -                }
  235. -            }
  236. -        }
  237. -
  238. -        return target;
  239. -    };
  240. -
  241. -    /* jQuery 1.4.3 */
  242. -    $.queue = function (elem, type, data) {
  243. -        function $makeArray (arr, results) {
  244. -            var ret = results || [];
  245. -
  246. -            if (arr != null) {
  247. -                if (isArraylike(Object(arr))) {
  248. -                    /* $.merge */
  249. -                    (function(first, second) {
  250. -                        var len = +second.length,
  251. -                            j = 0,
  252. -                            i = first.length;
  253. -
  254. -                        while (j < len) {
  255. -                            first[i++] = second[j++];
  256. -                        }
  257. -
  258. -                        if (len !== len) {
  259. -                            while (second[j] !== undefined) {
  260. -                                first[i++] = second[j++];
  261. -                            }
  262. -                        }
  263. -
  264. -                        first.length = i;
  265. -
  266. -                        return first;
  267. -                    })(ret, typeof arr === "string" ? [arr] : arr);
  268. -                } else {
  269. -                    [].push.call(ret, arr);
  270. -                }
  271. -            }
  272. -
  273. -            return ret;
  274. -        }
  275. -
  276. -        if (!elem) {
  277. -            return;
  278. -        }
  279. -
  280. -        type = (type || "fx") + "queue";
  281. -
  282. -        var q = $.data(elem, type);
  283. -
  284. -        if (!data) {
  285. -            return q || [];
  286. -        }
  287. -
  288. -        if (!q || $.isArray(data)) {
  289. -            q = $.data(elem, type, $makeArray(data));
  290. -        } else {
  291. -            q.push(data);
  292. -        }
  293. -
  294. -        return q;
  295. -    };
  296. -
  297. -    /* jQuery 1.4.3 */
  298. -    $.dequeue = function (elems, type) {
  299. -        /* Custom: Embed element iteration. */
  300. -        $.each(elems.nodeType ? [ elems ] : elems, function(i, elem) {
  301. -            type = type || "fx";
  302. -
  303. -            var queue = $.queue(elem, type),
  304. -                fn = queue.shift();
  305. -
  306. -            if (fn === "inprogress") {
  307. -                fn = queue.shift();
  308. -            }
  309. -
  310. -            if (fn) {
  311. -                if (type === "fx") {
  312. -                    queue.unshift("inprogress");
  313. -                }
  314. -
  315. -                fn.call(elem, function() {
  316. -                    $.dequeue(elem, type);
  317. -                });
  318. -            }
  319. -        });
  320. -    };
  321. -
  322. -    /******************
  323. -       $.fn Methods
  324. -    ******************/
  325. -
  326. -    /* jQuery */
  327. -    $.fn = $.prototype = {
  328. -        init: function (selector) {
  329. -            /* Just return the element wrapped inside an array; don't proceed with the actual jQuery node wrapping process. */
  330. -            if (selector.nodeType) {
  331. -                this[0] = selector;
  332. -
  333. -                return this;
  334. -            } else {
  335. -                throw new Error("Not a DOM node.");
  336. -            }
  337. -        },
  338. -
  339. -        offset: function () {
  340. -            /* jQuery altered code: Dropped disconnected DOM node checking. */
  341. -            var box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };
  342. -
  343. -            return {
  344. -                top: box.top + (window.pageYOffset || document.scrollTop  || 0)  - (document.clientTop  || 0),
  345. -                left: box.left + (window.pageXOffset || document.scrollLeft  || 0) - (document.clientLeft || 0)
  346. -            };
  347. -        },
  348. -
  349. -        position: function () {
  350. -            /* jQuery */
  351. -            function offsetParent() {
  352. -                var offsetParent = this.offsetParent || document;
  353. -
  354. -                while (offsetParent && (!offsetParent.nodeType.toLowerCase === "html" && offsetParent.style.position === "static")) {
  355. -                    offsetParent = offsetParent.offsetParent;
  356. -                }
  357. -
  358. -                return offsetParent || document;
  359. -            }
  360. -
  361. -            /* Zepto */
  362. -            var elem = this[0],
  363. -                offsetParent = offsetParent.apply(elem),
  364. -                offset = this.offset(),
  365. -                parentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? { top: 0, left: 0 } : $(offsetParent).offset()
  366. -
  367. -            offset.top -= parseFloat(elem.style.marginTop) || 0;
  368. -            offset.left -= parseFloat(elem.style.marginLeft) || 0;
  369. -
  370. -            if (offsetParent.style) {
  371. -                parentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0
  372. -                parentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0
  373. -            }
  374. -
  375. -            return {
  376. -                top: offset.top - parentOffset.top,
  377. -                left: offset.left - parentOffset.left
  378. -            };
  379. -        }
  380. -    };
  381. -
  382. -    /**********************
  383. -       Private Variables
  384. -    **********************/
  385. -
  386. -    /* For $.data() */
  387. -    var cache = {};
  388. -    $.expando = "velocity" + (new Date().getTime());
  389. -    $.uuid = 0;
  390. -
  391. -    /* For $.queue() */
  392. -    var class2type = {},
  393. -        hasOwn = class2type.hasOwnProperty,
  394. -        toString = class2type.toString;
  395. -
  396. -    var types = "Boolean Number String Function Array Date RegExp Object Error".split(" ");
  397. -    for (var i = 0; i < types.length; i++) {
  398. -        class2type["[object " + types[i] + "]"] = types[i].toLowerCase();
  399. -    }
  400. -
  401. -    /* Makes $(node) possible, without having to call init. */
  402. -    $.fn.init.prototype = $.fn;
  403. -
  404. -    /* Globalize Velocity onto the window, and assign its Utilities property. */
  405. -    window.Velocity = { Utilities: $ };
  406. +/*************************
  407. +   Velocity jQuery Shim
  408. +*************************/
  409. +
  410. +/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
  411. +
  412. +/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity's dependency on a full copy of jQuery, and allowing it to work in any environment. */
  413. +/* These shimmed functions are only used if jQuery isn't present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */
  414. +/* Browser support: Using this shim instead of jQuery proper removes support for IE8. */
  415. +
  416. +;(function (window) {
  417. +    "use strict";
  418. +    /***************
  419. +         Setup
  420. +    ***************/
  421. +
  422. +    /* If jQuery is already loaded, there's no point in loading this shim. */
  423. +    if (window.jQuery) {
  424. +        return;
  425. +    }
  426. +
  427. +    /* jQuery base. */
  428. +    var $ = function (selector, context) {
  429. +        return new $.fn.init(selector, context);
  430. +    };
  431. +
  432. +    /********************
  433. +       Private Methods
  434. +    ********************/
  435. +
  436. +    /* jQuery */
  437. +    $.isWindow = function (obj) {
  438. +        /* jshint eqeqeq: false */
  439. +        return obj != null && obj == obj.window;
  440. +    };
  441. +
  442. +    /* jQuery */
  443. +    $.type = function (obj) {
  444. +        if (obj == null) {
  445. +            return obj + "";
  446. +        }
  447. +
  448. +        return typeof obj === "object" || typeof obj === "function" ?
  449. +            class2type[toString.call(obj)] || "object" :
  450. +            typeof obj;
  451. +    };
  452. +
  453. +    /* jQuery */
  454. +    $.isArray = Array.isArray || function (obj) {
  455. +        return $.type(obj) === "array";
  456. +    };
  457. +
  458. +    /* jQuery */
  459. +    function isArraylike (obj) {
  460. +        var length = obj.length,
  461. +            type = $.type(obj);
  462. +
  463. +        if (type === "function" || $.isWindow(obj)) {
  464. +            return false;
  465. +        }
  466. +
  467. +        if (obj.nodeType === 1 && length) {
  468. +            return true;
  469. +        }
  470. +
  471. +        return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj;
  472. +    }
  473. +
  474. +    /***************
  475. +       $ Methods
  476. +    ***************/
  477. +
  478. +    /* jQuery: Support removed for IE<9. */
  479. +    $.isPlainObject = function (obj) {
  480. +        var key;
  481. +
  482. +        if (!obj || $.type(obj) !== "object" || obj.nodeType || $.isWindow(obj)) {
  483. +            return false;
  484. +        }
  485. +
  486. +        try {
  487. +            if (obj.constructor &&
  488. +                !hasOwn.call(obj, "constructor") &&
  489. +                !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
  490. +                return false;
  491. +            }
  492. +        } catch (e) {
  493. +            return false;
  494. +        }
  495. +
  496. +        for (key in obj) {}
  497. +
  498. +        return key === undefined || hasOwn.call(obj, key);
  499. +    };
  500. +
  501. +    /* jQuery */
  502. +    $.each = function(obj, callback, args) {
  503. +        var value,
  504. +            i = 0,
  505. +            length = obj.length,
  506. +            isArray = isArraylike(obj);
  507. +
  508. +        if (args) {
  509. +            if (isArray) {
  510. +                for (; i < length; i++) {
  511. +                    value = callback.apply(obj[i], args);
  512. +
  513. +                    if (value === false) {
  514. +                        break;
  515. +                    }
  516. +                }
  517. +            } else {
  518. +                for (i in obj) {
  519. +                    value = callback.apply(obj[i], args);
  520. +
  521. +                    if (value === false) {
  522. +                        break;
  523. +                    }
  524. +                }
  525. +            }
  526. +
  527. +        } else {
  528. +            if (isArray) {
  529. +                for (; i < length; i++) {
  530. +                    value = callback.call(obj[i], i, obj[i]);
  531. +
  532. +                    if (value === false) {
  533. +                        break;
  534. +                    }
  535. +                }
  536. +            } else {
  537. +                for (i in obj) {
  538. +                    value = callback.call(obj[i], i, obj[i]);
  539. +
  540. +                    if (value === false) {
  541. +                        break;
  542. +                    }
  543. +                }
  544. +            }
  545. +        }
  546. +
  547. +        return obj;
  548. +    };
  549. +
  550. +    /* Custom */
  551. +    $.data = function (node, key, value) {
  552. +        /* $.getData() */
  553. +        if (value === undefined) {
  554. +            var id = node[$.expando],
  555. +                store = id && cache[id];
  556. +
  557. +            if (key === undefined) {
  558. +                return store;
  559. +            } else if (store) {
  560. +                if (key in store) {
  561. +                    return store[key];
  562. +                }
  563. +            }
  564. +        /* $.setData() */
  565. +        } else if (key !== undefined) {
  566. +            var id = node[$.expando] || (node[$.expando] = ++$.uuid);
  567. +
  568. +            cache[id] = cache[id] || {};
  569. +            cache[id][key] = value;
  570. +
  571. +            return value;
  572. +        }
  573. +    };
  574. +
  575. +    /* Custom */
  576. +    $.removeData = function (node, keys) {
  577. +        var id = node[$.expando],
  578. +            store = id && cache[id];
  579. +
  580. +        if (store) {
  581. +            $.each(keys, function(_, key) {
  582. +                delete store[key];
  583. +            });
  584. +        }
  585. +    };
  586. +
  587. +    /* jQuery */
  588. +    $.extend = function () {
  589. +        var src, copyIsArray, copy, name, options, clone,
  590. +            target = arguments[0] || {},
  591. +            i = 1,
  592. +            length = arguments.length,
  593. +            deep = false;
  594. +
  595. +        if (typeof target === "boolean") {
  596. +            deep = target;
  597. +
  598. +            target = arguments[i] || {};
  599. +            i++;
  600. +        }
  601. +
  602. +        if (typeof target !== "object" && $.type(target) !== "function") {
  603. +            target = {};
  604. +        }
  605. +
  606. +        if (i === length) {
  607. +            target = this;
  608. +            i--;
  609. +        }
  610. +
  611. +        for (; i < length; i++) {
  612. +            if ((options = arguments[i]) != null) {
  613. +                for (name in options) {
  614. +                    src = target[name];
  615. +                    copy = options[name];
  616. +
  617. +                    if (target === copy) {
  618. +                        continue;
  619. +                    }
  620. +
  621. +                    if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
  622. +                        if (copyIsArray) {
  623. +                            copyIsArray = false;
  624. +                            clone = src && $.isArray(src) ? src : [];
  625. +
  626. +                        } else {
  627. +                            clone = src && $.isPlainObject(src) ? src : {};
  628. +                        }
  629. +
  630. +                        target[name] = $.extend(deep, clone, copy);
  631. +
  632. +                    } else if (copy !== undefined) {
  633. +                        target[name] = copy;
  634. +                    }
  635. +                }
  636. +            }
  637. +        }
  638. +
  639. +        return target;
  640. +    };
  641. +
  642. +    /* jQuery 1.4.3 */
  643. +    $.queue = function (elem, type, data) {
  644. +        function $makeArray (arr, results) {
  645. +            var ret = results || [];
  646. +
  647. +            if (arr != null) {
  648. +                if (isArraylike(Object(arr))) {
  649. +                    /* $.merge */
  650. +                    (function(first, second) {
  651. +                        var len = +second.length,
  652. +                            j = 0,
  653. +                            i = first.length;
  654. +
  655. +                        while (j < len) {
  656. +                            first[i++] = second[j++];
  657. +                        }
  658. +
  659. +                        if (len !== len) {
  660. +                            while (second[j] !== undefined) {
  661. +                                first[i++] = second[j++];
  662. +                            }
  663. +                        }
  664. +
  665. +                        first.length = i;
  666. +
  667. +                        return first;
  668. +                    })(ret, typeof arr === "string" ? [arr] : arr);
  669. +                } else {
  670. +                    [].push.call(ret, arr);
  671. +                }
  672. +            }
  673. +
  674. +            return ret;
  675. +        }
  676. +
  677. +        if (!elem) {
  678. +            return;
  679. +        }
  680. +
  681. +        type = (type || "fx") + "queue";
  682. +
  683. +        var q = $.data(elem, type);
  684. +
  685. +        if (!data) {
  686. +            return q || [];
  687. +        }
  688. +
  689. +        if (!q || $.isArray(data)) {
  690. +            q = $.data(elem, type, $makeArray(data));
  691. +        } else {
  692. +            q.push(data);
  693. +        }
  694. +
  695. +        return q;
  696. +    };
  697. +
  698. +    /* jQuery 1.4.3 */
  699. +    $.dequeue = function (elems, type) {
  700. +        /* Custom: Embed element iteration. */
  701. +        $.each(elems.nodeType ? [ elems ] : elems, function(i, elem) {
  702. +            type = type || "fx";
  703. +
  704. +            var queue = $.queue(elem, type),
  705. +                fn = queue.shift();
  706. +
  707. +            if (fn === "inprogress") {
  708. +                fn = queue.shift();
  709. +            }
  710. +
  711. +            if (fn) {
  712. +                if (type === "fx") {
  713. +                    queue.unshift("inprogress");
  714. +                }
  715. +
  716. +                fn.call(elem, function() {
  717. +                    $.dequeue(elem, type);
  718. +                });
  719. +            }
  720. +        });
  721. +    };
  722. +
  723. +    /******************
  724. +       $.fn Methods
  725. +    ******************/
  726. +
  727. +    /* jQuery */
  728. +    $.fn = $.prototype = {
  729. +        init: function (selector) {
  730. +            /* Just return the element wrapped inside an array; don't proceed with the actual jQuery node wrapping process. */
  731. +            if (selector.nodeType) {
  732. +                this[0] = selector;
  733. +
  734. +                return this;
  735. +            } else {
  736. +                throw new Error("Not a DOM node.");
  737. +            }
  738. +        },
  739. +
  740. +        offset: function () {
  741. +            /* jQuery altered code: Dropped disconnected DOM node checking. */
  742. +            var box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };
  743. +
  744. +            return {
  745. +                top: box.top + (window.pageYOffset || document.scrollTop  || 0)  - (document.clientTop  || 0),
  746. +                left: box.left + (window.pageXOffset || document.scrollLeft  || 0) - (document.clientLeft || 0)
  747. +            };
  748. +        },
  749. +
  750. +        position: function () {
  751. +            /* jQuery */
  752. +            function offsetParent() {
  753. +                var offsetParent = this.offsetParent || document;
  754. +
  755. +                while (offsetParent && (!offsetParent.nodeType.toLowerCase === "html" && offsetParent.style.position === "static")) {
  756. +                    offsetParent = offsetParent.offsetParent;
  757. +                }
  758. +
  759. +                return offsetParent || document;
  760. +            }
  761. +
  762. +            /* Zepto */
  763. +            var elem = this[0],
  764. +                offsetParent = offsetParent.apply(elem),
  765. +                offset = this.offset(),
  766. +                parentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? { top: 0, left: 0 } : $(offsetParent).offset()
  767. +
  768. +            offset.top -= parseFloat(elem.style.marginTop) || 0;
  769. +            offset.left -= parseFloat(elem.style.marginLeft) || 0;
  770. +
  771. +            if (offsetParent.style) {
  772. +                parentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0
  773. +                parentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0
  774. +            }
  775. +
  776. +            return {
  777. +                top: offset.top - parentOffset.top,
  778. +                left: offset.left - parentOffset.left
  779. +            };
  780. +        }
  781. +    };
  782. +
  783. +    /**********************
  784. +       Private Variables
  785. +    **********************/
  786. +
  787. +    /* For $.data() */
  788. +    var cache = {};
  789. +    $.expando = "velocity" + (new Date().getTime());
  790. +    $.uuid = 0;
  791. +
  792. +    /* For $.queue() */
  793. +    var class2type = {},
  794. +        hasOwn = class2type.hasOwnProperty,
  795. +        toString = class2type.toString;
  796. +
  797. +    var types = "Boolean Number String Function Array Date RegExp Object Error".split(" ");
  798. +    for (var i = 0; i < types.length; i++) {
  799. +        class2type["[object " + types[i] + "]"] = types[i].toLowerCase();
  800. +    }
  801. +
  802. +    /* Makes $(node) possible, without having to call init. */
  803. +    $.fn.init.prototype = $.fn;
  804. +
  805. +    /* Globalize Velocity onto the window, and assign its Utilities property. */
  806. +    window.Velocity = { Utilities: $ };
  807.  })(window);
  808.  
  809.  /******************
  810. @@ -407,6 +408,7 @@
  811.  ******************/
  812.  
  813.  ;(function (factory) {
  814. +    "use strict";
  815.      /* CommonJS module. */
  816.      if (typeof module === "object" && typeof module.exports === "object") {
  817.          module.exports = factory();
  818. @@ -418,6 +420,7 @@
  819.          factory();
  820.      }
  821.  }(function() {
  822. +"use strict";
  823.  return function (global, window, document, undefined) {
  824.  
  825.      /***************
  826. @@ -1636,11 +1639,11 @@
  827.                          CSS.setPropertyValue(element, "display", CSS.Values.getDisplayType(element));
  828.                      }
  829.  
  830. -                    function revertDisplay () {
  831. +                    var revertDisplay = function () {
  832.                          if (toggleDisplay) {
  833.                              CSS.setPropertyValue(element, "display", "none");
  834.                          }
  835. -                    }
  836. +                    };
  837.  
  838.                      if (!forceStyleLookup) {
  839.                          if (property === "height" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") {
  840. @@ -1882,9 +1885,9 @@
  841.              if ((IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) && Data(element).isSVG) {
  842.                  /* Since transform values are stored in their parentheses-wrapped form, we use a helper function to strip out their numeric values.
  843.                     Further, SVG transform properties only take unitless (representing pixels) values, so it's okay that parseFloat() strips the unit suffixed to the float value. */
  844. -                function getTransformFloat (transformProperty) {
  845. +                var getTransformFloat = function (transformProperty) {
  846.                      return parseFloat(CSS.getPropertyValue(element, transformProperty));
  847. -                }
  848. +                };
  849.  
  850.                  /* Create an object to organize all the transforms that we'll apply to the SVG element. To keep the logic simple,
  851.                     we process *all* transform properties -- even those that may not be explicitly applied (since they default to their zero-values anyway). */
  852. @@ -2688,7 +2691,7 @@
  853.                         or 2) an array in the form of [ endValue, [, easing] [, startValue] ].
  854.                         The optional third parameter is a forcefed startValue to be used instead of querying the DOM for
  855.                         the element's current value. Read Velocity's docmentation to learn more about forcefeeding: VelocityJS.org/#forcefeeding */
  856. -                    function parsePropertyValue (valueData, skipResolvingEasing) {
  857. +                    var parsePropertyValue = function (valueData, skipResolvingEasing) {
  858.                          var endValue = undefined,
  859.                              easing = undefined,
  860.                              startValue = undefined;
  861. @@ -2735,7 +2738,7 @@
  862.  
  863.                          /* Allow startValue to be left as undefined to indicate to the ensuing code that its value was not forcefed. */
  864.                          return [ endValue || 0, easing, startValue ];
  865. -                    }
  866. +                    };
  867.  
  868.                      /* Cycle through each property in the map, looking for shorthand color properties (e.g. "color" as opposed to "colorRed"). Inject the corresponding
  869.                         colorRed, colorGreen, and colorBlue RGB component tweens into the propertiesMap (which Velocity understands) and remove the shorthand property. */
  870. @@ -2859,7 +2862,7 @@
  871.                              operator = false;
  872.  
  873.                          /* Separates a property value into its numeric value and its unit type. */
  874. -                        function separateValue (property, value) {
  875. +                        var separateValue = function (property, value) {
  876.                              var unitType,
  877.                                  numericValue;
  878.  
  879. @@ -2881,7 +2884,7 @@
  880.                              }
  881.  
  882.                              return [ numericValue, unitType ];
  883. -                        }
  884. +                        };
  885.  
  886.                          /* Separate startValue. */
  887.                          separatedValue = separateValue(property, startValue);
  888. @@ -2941,7 +2944,7 @@
  889.                             of batching the SETs and GETs together upfront outweights the potential overhead
  890.                             of layout thrashing caused by re-querying for uncalculated ratios for subsequently-processed properties. */
  891.                          /* Todo: Shift this logic into the calls' first tick instance so that it's synced with RAF. */
  892. -                        function calculateUnitRatios () {
  893. +                        var calculateUnitRatios = function () {
  894.  
  895.                              /************************
  896.                                  Same Ratio Checks
  897. @@ -3036,7 +3039,7 @@
  898.                              if (Velocity.debug >= 1) console.log("Unit ratios: " + JSON.stringify(unitRatios), element);
  899.  
  900.                              return unitRatios;
  901. -                        }
  902. +                        };
  903.  
  904.                          /********************
  905.                             Unit Conversion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement