//$(document).ready(function() {
////    zlicz_koszyk();
////
////    /* libcza produktow w koszyku */
//    var ile_produktow = $('.cart tbody tr.enable').size();
//    $('.products-counter').html(ile_produktow);
////
//    function liczba_produktow_w_koszyku(x) {
//        var liczba_produktow = parseInt($('.products-counter').html());
//        if(x == '-1') {
//            liczba_produktow = liczba_produktow - 1;
//        }
//        else return false;
//        $('.products-counter').html(liczba_produktow);
//    }
////
////    /* zliczanie ceny jednego produktu */
////    $('.cart input.count').change(function() {
////        var cena_produktu = $(this).parents('tr').find('input[name=price]').val();
////        var ile = $(this).parents('tr').find('input.count').val();
////        if(is_num(ile)) {
////            var suma = ile * cena_produktu;
////            $(this).parents('tr').find('span.sum').html(suma.toFixed(2));
////            zlicz_koszyk();
////            $(this).css('background-color','#fff');
////            $(this).css('border','1px solid #ccc');
////        } else {
////            $(this).css('background-color','#F9F0F0');
////            $(this).css('border','1px solid #DB0000');
////            return false;
////        }
////    });
////
////    function zlicz_koszyk() {
////        var suma = 0;
////        $('.cart tr.enable').each(function() {
////            var cena_produktu = $(this).find('input[name=price]').val();
////            var ile = $(this).find('input.count').val();
////            if(is_num(ile)) {
////                var cena = ile * cena_produktu;
////                $(this).find('span.sum').html(cena.toFixed(2));
////
////                suma = suma + cena;
////                $('span.sum-all').html(suma.toFixed(2));
////            } else {
////                return false;
////            }
////        });
////    }
////
////
////    /*
////        funkcja sprawdza czy zostaly wpisane tylko cyfry
////    */
////
////    function is_num(txt) {
////        var wzor = /^\d+$/;
////        if(wzor.test(txt)) {
////            return true;
////        } else {
////            return false;
////        }
////    }
////
////
////    $('.del-item').click(function(){
////        if (confirm('Usunąć ten produkt?')) {
////            $(this).parents('tr').fadeOut();
////            $(this).parents('tr').removeClass('enable');
////            $(this).parents('tr').removeClass('disable');
////            liczba_produktow_w_koszyku('-1');
////            zlicz_koszyk();
////        } else return false;
////    });
////
////    $('.del-all').click(function(){
////        if (confirm('Usunąć wszystkie produkty?')) {
////            $('tr.enable').fadeOut();
////            $('tr.enable').removeClass('enable').removeClass('disable');
////            liczba_produktow_w_koszyku('0');
////            zlicz_koszyk();
////        } else return false;
////    });
////
//});

