/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 10/29/2007
 * @author Ariel Flesler
 * @version 1.2 
 * Compatible with jQuery 1.2.1, tested on Firefox 2.0.0.7, and IE 6, both on Windows.
 **/
(function($){$.scrollTo=function(a,b){return $('html,body').scrollTo(a,b)};$.fn.scrollTo=function(e,f){f=$.extend({axis:'y',speed:1},f||{});if(f.axis.length!=2)f.queue=false;if(f.queue)f.speed=Math.ceil(f.speed/2);return this.each(function(){var d=$(this),t=e,toff,eoff,attr={};switch(typeof t){case'string':if(/^([+-]=)?\d+(px)?$/.test(t))break;t=$(t,this);case'object':toff=$(t).offset();eoff=d.is('html,body')?{top:0,left:0}:d.offset()}$.each(f.axis.split(''),parse);animate(f.onAfter);function parse(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase();var c='scroll'+b;attr[c]=toff?toff[pos]+d[0][c]-eoff[pos]:t;if(f.margin&&typeof t=='object')attr[c]-=parseInt($(t).css('margin'+b))||0;if(!i&&f.queue){if(d[0][c]!=attr[c])animate(f.onAfterFirst);delete attr[c]}};function animate(a){d.animate(attr,f.speed,f.easing,a)}})}})(jQuery);
