/*
Eg. :

$('.panelWrapper').scrollTo({
	offset : -12,
	duration : 700,
	easing : 'easeInOutQuart'
});

*/
(function($){
	$.fn.scrollTo = function( opts ) {
		var o = {
			offset : 0,
			duration : 500,
			easing : 'linear'
		};
		$.extend( true, o, opts );
		return this.each(function(){
			var $this = $(this);
			var thisScrollTop = $this.offset().top+o.offset;
			if ( $('html, body').scrollTop() != thisScrollTop ) {
				$('html, body').animate({ 'scrollTop':thisScrollTop }, { duration:o.duration, easing:o.easing });
			}
			return this;
		});
	};
})(jQuery);

