$(
  function()
  {
    /*$("li").mouseover( function(){$(this).children('div').show();} );
    $("li").mouseout( function(){$(this).children('div').hide();} );*/
/*
    $(document).mousemove(
          function(event)
          {
            var X = $(document).width()-30;
            var Y = $(document).height()-30;
            if( X > event.pageX && Y > event.pageY )
              {
                  $('.latajacy_ptaszek').css('top',event.pageY);
                  $('.latajacy_ptaszek').css('left',event.pageX);
              }
          });*/
  }
);


pokaz = function(obiekt)
  {
      $(obiekt).toggle(0);
  }

zawijaj = function(source,destination)
  {
     $(source).effect('pulsate');
     $(destination).toggle('blind');
  }




//------------------------------------------------------------------ 


function ajax_post(adres,typ_zwracany,argumenty,pole_wyswietlania)
{
    $.ajax(
      {
      type: "POST",
      url: adres,
      data: argumenty,
      success: function(msg)
              {
                //$(pole_wyswietlania).hide(400).show(400);
                $(pole_wyswietlania).effect('highlight');
                $(pole_wyswietlania).html(msg);
                $(pole_wyswietlania).show("slow");
                //console.log('Operacja zakonczona sukcesem');
              },
      complete: function(msg)
              {
                //console.log('zakonczono pobieranie: '+msg);
              },
      error: function(msg)
              {
                //console.log('blad podczas operacji: '+msg);
                alert( " blad podczas wykonywania operacji");
              },
      beforeSend: function(msg)
              {
                $(pole_wyswietlania).html('Ładowanie treści proszę czekać...');
                //console.log('Wyslano operacje na serwer: ' + msg );
              },
      start: function(msg)
              {
                //console.log('Zainicjowano ajax: ' + msg );
              },
      stop: function(msg)
              {
                //console.log('Zatrzymano ajax: ' + msg );
              },
      dataType: typ_zwracany,
      async: true
      }
    );
}
