$(function()
  {
    
    $("#ajax-loader").ajaxStart(function(){
        $(this).show();
    });
    $("#ajax-loader").ajaxStop(function(){
        $(this).hide();
    });
    
    $('#check-kod-owner').click(function()
    {
       var string = $('#check_owner_cod').val();
       var id = $('#id_lisitng').val();
       $.post('check-owner.php',{listing_string: string, id_lisiting: id, action: 'check'},function(checked)
       {
          //  var result = INT(checked);
          //  alert(result);
          if(checked ==1)
          {
            if(esyndicat.conf.mod_rewrite==1)
            {
                window.location='claim-update-'+id;
            }
            else
            {
                window.location='check-owner.php?update='+id;    
            }
            
          }
          else
          {
            $('#not_found').show();
          }
       });
    });
  });