jQuery(function ($) {
    $('span.slider').click(function () {
        if ($(this).is('.active'))
        {
            $(this).prev('span.slider-cont')
            .slideUp('normal')
            .end()
            .removeClass('active')
            .text($(this).data('inActiveText'));
        }//if ($(this).is('.active'))
        else
        {
            $(this).prev('span.slider-cont')
            .slideDown('normal')
            .end()
            .addClass('active')
            .text($(this).data('activeText'));
        }//else
    });
    
    //
    //
    //
    
    $('a[id^="project-"]').hover(
        function () {
            $(this).find('img').get(0).src = $(this).data('onImg');
        },
        function () {
            $(this).find('img').get(0).src = $(this).data('offImg');
        }
    );
    
    //
    //
    //  temp
    
    /*
    $('#footer-bottom ul li a').click(function () {
        var id = $(this).get(0).className;
        
        loadPage(id);
    
        return false;
    });
    */
});

function loadPage(id)
{
    var req = 'id=' + id;
    
    AJAXRequest(req,web_root + 'load_page.xml',loadPageCallBack)
}//loadPage

function loadPageCallBack(xml)
{
    var $ = jQuery;

    if ($(xml).find('error').get(0))
    {
        ProcessErrors(xml);
    }
    else
    {
        var cont = $(xml).find('cont').text();
        
        $('#main-cont').html(cont);
    }//else
}//loadPageCallBack