/**
 * jQuery.ScrollTo
 * Copyright (c) 2007 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * @projectDescription Easy element scrolling using jQuery.
 * Date: 10/05/2007
 * @author Ariel Flesler
 * @version 1.0
 **/
(function($){$.fn.scrollTo=function(a,b){b=b||{};var c={},pos=b.horizontal?'left':'top',key='scroll'+pos.charAt(0).toUpperCase()+pos.substring(1);return this.each(function(){switch(typeof a){case'string':if(/(\d|px|em|%)$/.test(a))break;a=$(a,this);case'object':a=$(a).position()[pos]}if(b.speed){c[key]=a;$(this).animate(c,b.speed,b.easing,b.callback)}else{this[key]=a}})};$.scrollTo=function(a,b){return $('html,body').scrollTo(a,b)}})(jQuery);