function basket(){
    $.getJSON('/frontoffice/basket/basket.php',{},function(d){
        $.each(d, function(k,v){
            $("#basket_colvo").text(v.pos)
            $("#basket_summa").text(v.summ)
        })
    })
}
function in_cart(k,id,price,tip){
     var col=$('#shina_col'+k).val();
     alert ('В корзину добавлено '+col+' штук по цене '+price+' руб')
     function showbasket(data,status){
        $.each(data,function(k,v){
            $("#basket_colvo").text(v.col)
            $("#basket_summa").text(v.summa)
        })
     }
     $.ajax({
        url: '/frontoffice/basket/inbasket.php',
        type: 'POST',
        data: {col:col,id:id,price:price,tip:tip},
        dataType: 'json',
        success: showbasket
    })
   
}
$(document).ready(basket());
$(document).ready(function(){
    $.getJSON("/frontoffice/ajax/menu_shiny.php",{},function(d){
        var out='';
        $.each(d, function(k,v){
            out+='<p><a href="/shiny/'+v.brand+'/index.html">'+v.brand+'</a></p>'
        })
        $('#shinylist').html(out).append('<p><a href="/shiny/all/index.html">Показать все</a></p>');
    })
     $.getJSON("/frontoffice/ajax/menu_diski.php",{},function(d){
        var out='';
        $.each(d, function(k,v){
            out+='<p><a href="/diski/'+v.brand+'/index.html">'+v.brand+'</a></p>'
        })
        $('#diskilist').html(out).append('<p><a href="/diski/all/index.html">Показать все</a></p>');
    })
})
