$(document).ready(function(){
$('.zaproszenia .accph').live("click",function(){
$id=$(this).attr('id');
alert($id)

$.ajax({
'url':'/main/mainfunction.php',
  'data': {"param": "accept", "id":$id},
  'type':'POST',
'success': function(msg) {
$('#zaproszenie'+$id+' .practions').html(msg);
setTimeout(function(){ $('#zaproszenie'+$id).fadeOut(1000,function(){
$(this).remove()}) }, 2000);

},
'error' :function(){alert('error');}
})
});


$('.zaproszenia .daccph').live("click",function(){
$id=$(this).attr('id');
alert($id)
$.ajax({
'url':'/main/mainfunction.php',
  'data': {"param": "noaccept", "id":$id},
  'type':'POST',
'success': function(msg) {
$('#zaproszenie'+$id+' .practions').html(msg),
setTimeout(function(){ $('#zaproszenie'+$id).fadeOut(1000,function(){
$(this).remove()}) }, 2000);
},
'error' :function(){alert('error');}
})
});


$('#pStart').live("click",function(){
$('#container').hide();
$('body').prepend('<div id="prezentBox"></div>'),
$('#prezentBox').css({"z-index":99999}),
$.ajax({
'url':'/prezent2.html',
'success': function(msg) {
$('#overlay').remove(),
$('#msgbox').remove(),
$('#prezentBox').html(msg);
},
'error' :function(){alert('error');}
})
});
});
