$(document).ready(function() {    var updateTime = 5;            checkInvitations();    setInterval('checkInvitations();', updateTime*1000);        $('#content .invitation button').live('click', function() {        var div = $(this).parent().parent();        if ($(this).html() == 'Nie')            div.hide();        else if ($(this).html() == 'Tak') {            div.hide();            window.open(Host+'/chat/priv/accept/0/'+div.attr('id'), div.attr('title'), 'width=715, height=550');        }    });            $('.font_size').click(function() {        clicked = $('.font_size').index(this);        if (clicked == 1) size = 10;        if (clicked == 2) size = 12;        if (clicked == 3) size = 14;        var date = new Date();        date.setTime(date.getTime()+(30*24*60*60*1000));        document.cookie = 'ztrFont='+size+'; expires='+date.toGMTString()+'; path=/';        $('.mainpage-body').css({ 'font-size' : size+'px' });        $('.template-text').css({ 'font-size' : size+'px' });        return false;    });    $('.home_page_content div:eq(0)').css('display', 'block');    $('.home_page_icon').click(function() {        $('.home_page_container').fadeIn('normal');     });    $('.home_page_cross').click(function() {        $('.home_page_container').fadeOut('normal');     });    $('.home_page_browsers li').click(function() {        $('.home_page_content div').css('display', 'none');        $('.home_page_content div:eq('+$('.home_page_browsers li').index(this)+')').css('display', 'block');    });});function checkInvitations() {	$.ajax({		url: 'http://localhost/ztr/ajax/ajax_chat.php?action=checkInvitations',		cache: false,		type: 'POST',		//data: ({RecipientID: UserID, SenderID: RecipientID, RoomID: RoomID}),		dataType: 'html',		success: function(data) {            if (data) {				$('#content').append(data);			}		}	});};