$(function () {
    if (window.location.hash) {
        window.location = '{% urly website home %}' + window.location.hash.substring(1);
    }

    $('a.maingotopage').live('click', function (ev) {
        ev.preventDefault();
        var me = $(this);
        devlib.load({
            url: $(this).attr('href'),
            selector: '#content',
            dataSelector: '#content',
            effect: 'fade'
        });
    });
    
    $('a.gotopage').live('click', function (ev) {
        ev.preventDefault();
        var me = $(this);
        devlib.load({
            url: $(this).attr('href'),
            selector: '#content',
            dataSelector: '#content',
            effect: 'fade',
            callback: function () {
                $('#content').html($('#content').children(':first').html());
            }
        });
    });

    $('a.gotophotospage').live('click', function (ev) {
        ev.preventDefault();
        var me = $(this);

        $('#content').load($(this).attr('href') + ' #contentbody', function () {
            //$('#content').html($('#content').children(':first').html());
        });
/*
        devlib.load({
            url: $(this).attr('href'),
            selector: '#content',
            dataSelector: '#content',
            effect: 'fade',
        });
*/
    });
});

