function handleCompare( id, remove )
{
    if( remove )
    {
        jQuery.ajax({type:'POST',dataType:'html',success:function(data, textStatus){jQuery('#selected-notebooks').html(data);},beforeSend:function(XMLHttpRequest){jQuery('#compared-notebooks-loader').show('normal'  );},complete:function(XMLHttpRequest, textStatus){jQuery('#compared-notebooks-loader').hide('normal'  );},url:'/usun-z-porownania/' + id + '/notebook.html'});
        $('input[name=compare-notebook-' + id + ']').attr('checked', false);
    }

    if( $('input[name=compare-notebook-' + id + ']').is(':checked') )
    {
        jQuery.ajax({type:'POST',dataType:'html',success:function(data, textStatus){jQuery('#selected-notebooks').html(data);},beforeSend:function(XMLHttpRequest){jQuery('#compared-notebooks-loader').show('normal'  );},complete:function(XMLHttpRequest, textStatus){jQuery('#compared-notebooks-loader').hide('normal'  );},url:'/dodaj-do-porownania/'+ id + '/notebook.html'})
    }
    else
    {
        jQuery.ajax({type:'POST',dataType:'html',success:function(data, textStatus){jQuery('#selected-notebooks').html(data);},beforeSend:function(XMLHttpRequest){jQuery('#compared-notebooks-loader').show('normal'  );},complete:function(XMLHttpRequest, textStatus){jQuery('#compared-notebooks-loader').hide('normal'  );},url:'/usun-z-porownania/' + id + '/notebook.html'});
    }

}