

jQuery(function( $ ){

        $('#content').attr({scrollTop:0,scrollLeft:0});

        // Scroll initially if there's a hash (#something) in the url
        $.localScroll.hash({
                target: '#content', //could be a selector or a jQuery object too.
                axis:'xy',//the default is 'y'
                queue:true,
                duration:1500
        });

        var $last = $([]);//save the last link

        $.localScroll({
                target: '#content', //could be a selector or a jQuery object too.
                axis: 'xy', //the default is 'y'
                queue: true,
                duration: 1500,
                hash: true,
                onBefore: function( e, anchor, $target ){//'this' is the clicked link
                        $subLink = $('#nav-' + anchor.getAttribute('id'));
                        $last.removeClass('scrolling').parent().removeClass('on');
                        $last = $subLink.addClass('scrolling');
                        $subLink.parent().addClass('on');
                        if( this.blur ) this.blur();//remove the awful outline
                },
                onAfter: function( anchor ){
                        $last.removeClass('scrolling');
                }
        });
});


$(document).ready(function() {

	$('#footerbg').fadeTo('fast', '0.6');

});
