  //jQuery.ScrollTo - Easy element scrolling using jQuery.
  //Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com  httpflesler.blogspot.com
  //Dual licensed under MIT and GPL.
  //Date 9112008
  //@author Ariel Flesler
  //@version 1.4
 
  //httpflesler.blogspot.com200710jqueryscrollto.html
 
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis'y',duration1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindowthis.defaultView,c=this.nodeName=='#document'b.frameElementbthis,g=c.contentDocument(c.contentWindowc).document,i=c.setInterval;return c.nodeName=='IFRAME'i&&h.browser.safarig.bodyig.documentElementthis})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAftera};a=h.extend({},m.defaults,a);j=ja.speeda.duration;a.queue=a.queue&&a.axis.length1;if(a.queue)j=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number'case'string'if(^([+-]=)d+(px)$.test(d)){d=n(d);break}d=h(d,this);case'object'if(d.isd.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x''Left''Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x''Width''Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p0s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))0;e[f]-=parseInt(d.css('border'+g+'Width'))0}e[f]+=a.offset[i]0;if(a.over[i])e[f]+=d[v]()a.over[i]}else e[f]=d[i];if(^d+$.test(e[f]))e[f]=e[f]=00Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return pMath.max(g.documentElement[c],g.body[c])k[c]}}).end()};function n(b){return typeof b=='object'b{topb,leftb}}})(jQuery);