$(document).ready(function(){

    var $sections = $('#navigation a, #footer a, a.ajaxLink'),
    last = null;

    $sections.click(function () {
        if (last != this) {
            var url = this.hash.slice(1) + '.php';
            $('#content').html('<p class="loading"><img src="http://www.ahdootlaw.com/images/loader.gif" alt="LOADING" /></p>').load(url, function () {
                this.scrollLeft = 0;
            });
        }
        last = this;
        this.blur();
        return false;

    });

    $sections.eq(0).click();

    $('#content').localScroll({
        lazy: true,
        target: '#content',
        axis: 'x',
        duration: 500,
        onBefore: function (e, subsec, $cont) {
            if (this.blur) this.blur();
        }
    });
});

$(function () {
    $('#pane').jScrollPane({
        showArrows: true,
        dragMinHeight: 1,
        scrollbarWidth: 15,
        arrowSize: 15
    });
});