var $j = jQuery.noConflict();

(function($){$.fn.extend({pageScroll:function(d){var f={direction:'vertical',speed:1000,offset:0,easing:'',activeClass:'current',anchorSrc:'href',event:'click',writeHash:true,onScrollStart:function(){},onScrollFinish:function(){}};var o=$.extend(f,d);$j(this).bind(o.event,function(e){var a=$j(this);o.onScrollStart.call(this,a);if(!o.writeHash){e.preventDefault()}$j('.'+o.activeClass).removeClass(o.activeClass);a.addClass(o.activeClass);var b=a.attr(o.anchorSrc);var c=$j(b).offset();if(c!==null){$j('body, html').stop().animate({scrollTop:c.top-o.offset},o.speed,o.easing).last().queue(function(){o.onScrollFinish.call(this,a);$j(this).dequeue()})}})}})})(jQuery);
