var cateDesc = new Array ('Mieszkania sprzedaż', 'Mieszkania wynajem', 'Domy sprzedaż', 'Domy wynajem', 'Lokale sprzedaż', 'Lokale wynajem', 'Obiekty sprzedaż', 'Obiekty wynajem', 'Działki sprzedaż', 'Działki wynajem');
var offerCateAction = 'add';

addToCatr_inf = false;

function addToCart ( offerField )
{
 path = self.location.host;
 path = 'http://'+path+'/_adds/';
 
 var offerId = offerField.id;
 offerId = offerId.replace( 'del_', '' );
 offerId = offerId.replace( 'lst_', '' );
 offerStatus = $( '#toCart_'+offerId ).val();
 addToCatr_inf = true;
 
 $.ajax({
  type: "GET",
  cache: false,
  url: path+'basketChange.php',
  
  data: "operation="+offerStatus+"&offerId="+offerId,
  success: function( msg )
  {
   if (offerStatus == 'add')
   {
    $('#toCart_'+offerId).val('del');
    $('#lst_'+offerId).html('usuń z notesu');
   }
   else
   {
    $('#toCart_'+offerId).val('add');
    $('#lst_'+offerId).html('dodaj do notesu');
   }
   $('#lBaskerShortList').html(msg);
   //alert( msg );
  }
 });
}


function cancelbubble(ev) { ev.cancelBubble = true; }

function linkHref( linkH )
{
 if( addToCatr_inf == true ) { addToCatr_inf = false; return false; }
 addToCatr_inf = false;
 location.href = linkH;
}