var sRemoteServer = location.protocol + '//' + location.host + '/';

$(document).ready(function() {

    $('#sitemapCreate').click(function() {
   
      $.post(sRemoteServer, {
        request: 'index/refresh'
      }, function(output) {
       var data = eval('('+output+')');
                if (data != undefined) {
                if(data.result){
                    $('#sitemapCreated').text(data.lastCreated);
                    alert('Mapa zauktualizowana')
                }
            } else alert(data.message);
        

      });
    });

});
