
$(document).ready(function()
{
    $('#splash-wrapper').css('display', 'block');
    $('#splash-wrapper').css('top', ($(window).height()-$('#splash-wrapper').height())/2);
    $('#splash-wrapper').css('left', ($(window).width()-$('#splash-wrapper').width())/2);
    $('#splash-wrapper').stop(true, true).animate({'opacity':'0'}, 0, function()
    {
        $('#splash-wrapper').stop(true, true).animate({'opacity':'1'}, 600);
    });
});

function changeLanguage(language)
{
    setCookie('karisma_language', language, 7);
    window.location = '?page=home';
}

function setCookie(c_name, value, expiredays)
{
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);

    document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}
