<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9477] trunk/src/bp-core: Undeprecate jquery.scroll-to.js.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9477">9477</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9477","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-02-12 15:27:00 +0000 (Thu, 12 Feb 2015)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Undeprecate jquery.scroll-to.js.

This file was deprecated as part of <a href="http://buddypress.trac.wordpress.org/changeset/8559">[8559]</a>, which did some miscellaneous
cleanup of old scripts. However, `scrollTo()` continues to be used in bp-legacy
JS, and so jquery.scroll-to remains a requirement. It should not be broken by
`BP_IGNORE_DEPRECATED`.

Props wpdennis.
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/6216">#6216</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcorebpcorecssjsphp">trunk/src/bp-core/bp-core-cssjs.php</a></li>
<li><a href="#trunksrcbpcoredeprecated21php">trunk/src/bp-core/deprecated/2.1.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcbpcorejsjqueryscrolltojs">trunk/src/bp-core/js/jquery-scroll-to.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunksrcbpcoredeprecatedjsjqueryscrolltojs">trunk/src/bp-core/deprecated/js/jquery-scroll-to.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcorebpcorecssjsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-cssjs.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-cssjs.php       2015-02-11 21:38:40 UTC (rev 9476)
+++ trunk/src/bp-core/bp-core-cssjs.php 2015-02-12 15:27:00 UTC (rev 9477)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,6 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                'bp-widget-members' => array( 'file' => "{$url}widget-members{$min}.js", 'dependencies' => array( 'jquery' ) ),
</span><span class="cx" style="display: block; padding: 0 10px">                'bp-jquery-query'   => array( 'file' => "{$url}jquery-query{$min}.js",   'dependencies' => array( 'jquery' ) ),
</span><span class="cx" style="display: block; padding: 0 10px">                'bp-jquery-cookie'  => array( 'file' => "{$url}jquery-cookie{$min}.js",  'dependencies' => array( 'jquery' ) ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                'bp-jquery-scroll-to' => array( 'file' => "{$url}jquery-scroll-to{$min}.js", 'dependencies' => array( 'jquery' ) ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // 2.1
</span><span class="cx" style="display: block; padding: 0 10px">                'jquery-caret' => array( 'file' => "{$url}jquery.caret{$min}.js", 'dependencies' => array( 'jquery' ) ),
</span></span></pre></div>
<a id="trunksrcbpcoredeprecated21php"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/deprecated/2.1.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/deprecated/2.1.php      2015-02-11 21:38:40 UTC (rev 9476)
+++ trunk/src/bp-core/deprecated/2.1.php        2015-02-12 15:27:00 UTC (rev 9477)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,12 +21,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $scripts = apply_filters( 'bp_core_register_deprecated_scripts', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Core
-               'bp-jquery-scroll-to' => array(
-                       'file'         => "{$url}jquery-scroll-to{$min}.js",
-                       'dependencies' => array( 'jquery' ),
-               ),
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Messages
</span><span class="cx" style="display: block; padding: 0 10px">                'bp-jquery-autocomplete'    => array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'file'          => "{$url}autocomplete/jquery.autocomplete{$min}.js",
</span></span></pre></div>
<a id="trunksrcbpcoredeprecatedjsjqueryscrolltojs"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/bp-core/deprecated/js/jquery-scroll-to.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/deprecated/js/jquery-scroll-to.js       2015-02-11 21:38:40 UTC (rev 9476)
+++ trunk/src/bp-core/deprecated/js/jquery-scroll-to.js 2015-02-12 15:27:00 UTC (rev 9477)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,208 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/* jshint undef: false */
-/* jshint -W065 */
-
-/*!
- * jQuery.ScrollTo
- * Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
- * Licensed under MIT
- * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
- * @projectDescription Easy element scrolling using jQuery.
- * @author Ariel Flesler
- * @version 1.4.12
- */
-
-(function(factory) {
-       // AMD
-       if (typeof define === 'function' && define.amd) {
-               define(['jquery'], factory);
-       // CommonJS
-       } else if (typeof exports === 'object') {
-               factory(require('jquery'));
-       // Browser globals
-       } else {
-               factory(jQuery);
-       }
-}(function($) {
-
-       var $scrollTo = $.scrollTo = function(target, duration, settings) {
-               return $(window).scrollTo(target, duration, settings);
-       };
-
-       $scrollTo.defaults = {
-               axis: 'xy',
-               duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1,
-               limit: true
-       };
-
-       // Returns the element that needs to be animated to scroll the window.
-       // Kept for backwards compatibility (specially for localScroll & serialScroll)
-       $scrollTo.window = function() {
-               return $(window)._scrollable();
-       };
-
-       // Hack, hack, hack :)
-       // Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
-       $.fn._scrollable = function() {
-               return this.map(function() {
-                       var elem = this,
-                                       isWin = !elem.nodeName || $.inArray(elem.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) !== -1;
-
-                       if (!isWin) {
-                               return elem;
-                       }
-
-                       var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
-
-                       return /webkit/i.test(navigator.userAgent) || doc.compatMode === 'BackCompat' ?
-                                       doc.body :
-                                       doc.documentElement;
-               });
-       };
-
-       $.fn.scrollTo = function(target, duration, settings) {
-               if (typeof duration === 'object') {
-                       settings = duration;
-                       duration = 0;
-               }
-               if (typeof settings === 'function') {
-                       settings = {onAfter: settings};
-               }
-
-               if (target === 'max') {
-                       target = 9e9;
-               }
-
-               settings = $.extend({}, $scrollTo.defaults, settings);
-               // Speed is still recognized for backwards compatibility
-               duration = duration || settings.duration;
-               // Make sure the settings are given right
-               settings.queue = settings.queue && settings.axis.length > 1;
-
-               // Let's keep the overall duration
-               if (settings.queue) {
-                       duration /= 2;
-               }
-
-               settings.offset = both(settings.offset);
-               settings.over = both(settings.over);
-
-               return this._scrollable().each(function() {
-
-                       // Null target yields nothing, just like jQuery does
-                       if (target === null) {
-                               return;
-                       }
-
-                       var elem = this,
-                                       $elem = $(elem),
-                                       targ = target, toff, attr = {},
-                                       win = $elem.is('html,body');
-
-                       switch (typeof targ) {
-                               // A number will pass the regex
-                               case 'number':
-                               case 'string':
-                                       if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
-                                               targ = both(targ);
-                                               // We are done
-                                               break;
-                                       }
-                                       // Relative/Absolute selector, no break!
-                                       targ = win ? $(targ) : $(targ, this);
-                                       if (!targ.length) {
-                                               return;
-                                       }
-                                       /* falls through */
-                               case 'object':
-                                       // DOMElement / jQuery
-                                       if (targ.is || targ.style) {
-                                               // Get the real position of the target
-                                               toff = (targ = $(targ)).offset();
-                                       }
-                       }
-
-                       var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
-
-                       $.each(settings.axis.split(''), function(i, axis) {
-                               var Pos = axis === 'x' ? 'Left' : 'Top',
-                                               pos = Pos.toLowerCase(),
-                                               key = 'scroll' + Pos,
-                                               old = elem[key],
-                                               max = $scrollTo.max(elem, axis);
-
-                               if (toff) {// jQuery / DOMElement
-                                       attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]);
-
-                                       // If it's a dom element, reduce the margin
-                                       if (settings.margin) {
-                                               attr[key] -= parseInt(targ.css('margin' + Pos)) || 0;
-                                               attr[key] -= parseInt(targ.css('border' + Pos + 'Width')) || 0;
-                                       }
-
-                                       attr[key] += offset[pos] || 0;
-
-                                       // Scroll to a fraction of its width/height
-                                       if (settings.over[pos]) {
-                                               attr[key] += targ[axis === 'x' ? 'width' : 'height']() * settings.over[pos];
-                                       }
-                               } else {
-                                       var val = targ[pos];
-                                       // Handle percentage values
-                                       attr[key] = val.slice && val.slice(-1) === '%' ?
-                                                       parseFloat(val) / 100 * max
-                                                       : val;
-                               }
-
-                               // Number or 'number'
-                               if (settings.limit && /^\d+$/.test(attr[key])) {
-                                       // Check the limits
-                                       attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
-                               }
-
-                               // Queueing axes
-                               if (!i && settings.queue) {
-                                       // Don't waste time animating, if there's no need.
-                                       if (old !== attr[key]) {
-                                               // Intermediate animation
-                                               animate(settings.onAfterFirst);
-                                       }
-                                       // Don't animate this axis again in the next iteration.
-                                       delete attr[key];
-                               }
-                       });
-
-                       animate(settings.onAfter);
-
-                       function animate(callback) {
-                               $elem.animate(attr, duration, settings.easing, callback && function() {
-                                       callback.call(this, targ, settings);
-                               });
-                       }
-
-               }).end();
-       };
-
-       // Max scrolling position, works on quirks mode
-       // It only fails (not too badly) on IE, quirks mode.
-       $scrollTo.max = function(elem, axis) {
-               var Dim = axis === 'x' ? 'Width' : 'Height',
-                               scroll = 'scroll' + Dim;
-
-               if (!$(elem).is('html,body')) {
-                       return elem[scroll] - $(elem)[Dim.toLowerCase()]();
-               }
-
-               var size = 'client' + Dim,
-                               html = elem.ownerDocument.documentElement,
-                               body = elem.ownerDocument.body;
-
-               return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
-       };
-
-       function both(val) {
-               return $.isFunction(val) || typeof val === 'object' ? val : {top: val, left: val};
-       }
-
-       // AMD requirement
-       return $scrollTo;
-}));
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcbpcorejsjqueryscrolltojsfromrev9475trunksrcbpcoredeprecatedjsjqueryscrolltojs"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/src/bp-core/js/jquery-scroll-to.js (from rev 9475, trunk/src/bp-core/deprecated/js/jquery-scroll-to.js)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/js/jquery-scroll-to.js                          (rev 0)
+++ trunk/src/bp-core/js/jquery-scroll-to.js    2015-02-12 15:27:00 UTC (rev 9477)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,208 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* jshint undef: false */
+/* jshint -W065 */
+
+/*!
+ * jQuery.ScrollTo
+ * Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
+ * Licensed under MIT
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
+ * @projectDescription Easy element scrolling using jQuery.
+ * @author Ariel Flesler
+ * @version 1.4.12
+ */
+
+(function(factory) {
+       // AMD
+       if (typeof define === 'function' && define.amd) {
+               define(['jquery'], factory);
+       // CommonJS
+       } else if (typeof exports === 'object') {
+               factory(require('jquery'));
+       // Browser globals
+       } else {
+               factory(jQuery);
+       }
+}(function($) {
+
+       var $scrollTo = $.scrollTo = function(target, duration, settings) {
+               return $(window).scrollTo(target, duration, settings);
+       };
+
+       $scrollTo.defaults = {
+               axis: 'xy',
+               duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1,
+               limit: true
+       };
+
+       // Returns the element that needs to be animated to scroll the window.
+       // Kept for backwards compatibility (specially for localScroll & serialScroll)
+       $scrollTo.window = function() {
+               return $(window)._scrollable();
+       };
+
+       // Hack, hack, hack :)
+       // Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
+       $.fn._scrollable = function() {
+               return this.map(function() {
+                       var elem = this,
+                                       isWin = !elem.nodeName || $.inArray(elem.nodeName.toLowerCase(), ['iframe', '#document', 'html', 'body']) !== -1;
+
+                       if (!isWin) {
+                               return elem;
+                       }
+
+                       var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
+
+                       return /webkit/i.test(navigator.userAgent) || doc.compatMode === 'BackCompat' ?
+                                       doc.body :
+                                       doc.documentElement;
+               });
+       };
+
+       $.fn.scrollTo = function(target, duration, settings) {
+               if (typeof duration === 'object') {
+                       settings = duration;
+                       duration = 0;
+               }
+               if (typeof settings === 'function') {
+                       settings = {onAfter: settings};
+               }
+
+               if (target === 'max') {
+                       target = 9e9;
+               }
+
+               settings = $.extend({}, $scrollTo.defaults, settings);
+               // Speed is still recognized for backwards compatibility
+               duration = duration || settings.duration;
+               // Make sure the settings are given right
+               settings.queue = settings.queue && settings.axis.length > 1;
+
+               // Let's keep the overall duration
+               if (settings.queue) {
+                       duration /= 2;
+               }
+
+               settings.offset = both(settings.offset);
+               settings.over = both(settings.over);
+
+               return this._scrollable().each(function() {
+
+                       // Null target yields nothing, just like jQuery does
+                       if (target === null) {
+                               return;
+                       }
+
+                       var elem = this,
+                                       $elem = $(elem),
+                                       targ = target, toff, attr = {},
+                                       win = $elem.is('html,body');
+
+                       switch (typeof targ) {
+                               // A number will pass the regex
+                               case 'number':
+                               case 'string':
+                                       if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
+                                               targ = both(targ);
+                                               // We are done
+                                               break;
+                                       }
+                                       // Relative/Absolute selector, no break!
+                                       targ = win ? $(targ) : $(targ, this);
+                                       if (!targ.length) {
+                                               return;
+                                       }
+                                       /* falls through */
+                               case 'object':
+                                       // DOMElement / jQuery
+                                       if (targ.is || targ.style) {
+                                               // Get the real position of the target
+                                               toff = (targ = $(targ)).offset();
+                                       }
+                       }
+
+                       var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
+
+                       $.each(settings.axis.split(''), function(i, axis) {
+                               var Pos = axis === 'x' ? 'Left' : 'Top',
+                                               pos = Pos.toLowerCase(),
+                                               key = 'scroll' + Pos,
+                                               old = elem[key],
+                                               max = $scrollTo.max(elem, axis);
+
+                               if (toff) {// jQuery / DOMElement
+                                       attr[key] = toff[pos] + (win ? 0 : old - $elem.offset()[pos]);
+
+                                       // If it's a dom element, reduce the margin
+                                       if (settings.margin) {
+                                               attr[key] -= parseInt(targ.css('margin' + Pos)) || 0;
+                                               attr[key] -= parseInt(targ.css('border' + Pos + 'Width')) || 0;
+                                       }
+
+                                       attr[key] += offset[pos] || 0;
+
+                                       // Scroll to a fraction of its width/height
+                                       if (settings.over[pos]) {
+                                               attr[key] += targ[axis === 'x' ? 'width' : 'height']() * settings.over[pos];
+                                       }
+                               } else {
+                                       var val = targ[pos];
+                                       // Handle percentage values
+                                       attr[key] = val.slice && val.slice(-1) === '%' ?
+                                                       parseFloat(val) / 100 * max
+                                                       : val;
+                               }
+
+                               // Number or 'number'
+                               if (settings.limit && /^\d+$/.test(attr[key])) {
+                                       // Check the limits
+                                       attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
+                               }
+
+                               // Queueing axes
+                               if (!i && settings.queue) {
+                                       // Don't waste time animating, if there's no need.
+                                       if (old !== attr[key]) {
+                                               // Intermediate animation
+                                               animate(settings.onAfterFirst);
+                                       }
+                                       // Don't animate this axis again in the next iteration.
+                                       delete attr[key];
+                               }
+                       });
+
+                       animate(settings.onAfter);
+
+                       function animate(callback) {
+                               $elem.animate(attr, duration, settings.easing, callback && function() {
+                                       callback.call(this, targ, settings);
+                               });
+                       }
+
+               }).end();
+       };
+
+       // Max scrolling position, works on quirks mode
+       // It only fails (not too badly) on IE, quirks mode.
+       $scrollTo.max = function(elem, axis) {
+               var Dim = axis === 'x' ? 'Width' : 'Height',
+                               scroll = 'scroll' + Dim;
+
+               if (!$(elem).is('html,body')) {
+                       return elem[scroll] - $(elem)[Dim.toLowerCase()]();
+               }
+
+               var size = 'client' + Dim,
+                               html = elem.ownerDocument.documentElement,
+                               body = elem.ownerDocument.body;
+
+               return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
+       };
+
+       function both(val) {
+               return $.isFunction(val) || typeof val === 'object' ? val : {top: val, left: val};
+       }
+
+       // AMD requirement
+       return $scrollTo;
+}));
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>