$(document).ready(function(){
        $("a[rel=lightbox]").lightBox();
        /*$.LightBox.construct({
            "speed": 500,
            "show_linkback": false,
            "keys": {
                        close:        "q",
                        prev:        "z",
                        next:        "x"
                },
                "opacity": 0.9,
                text: {
                        image:                "Фотография",
                        of:                        "из",
                        close:                "Закрыть",
                        closeInfo:        "Окончание просмотра",
                        help: {
                                close:                "Закрыть",
                                interact:        "Закрытие картинки"
                        },
                        about: {
                                text:         "Powered by LCS",
                                title:        "Powered by LCS",
                                link:        "http://planeta-toys.ru"
                        }
                },
                files: {
                        images: {
                                prev:                "img/prev.gif",
                                next:                "img/next.gif",
                                blank:                "img/blank.gif",
                                loading:        "img/loading.gif"
                        }
                }
    });*/
    $("#loading").bind("ajaxSend", function(){
    $(this).show(); // показываем элемент
}).bind("ajaxComplete", function(){
    $(this).hide(); // скрываем элемент
});
});
function getCat(id){
    $.post(
        "ajax/getCat.php",
        "id="+id,
        function(data){
            complete:
                $("#catp"+id).html(data);
                $("#catp"+id).show();
        },
        "html"

    );
}
function addReci(id){
    $.post(
        "ajax/addReci.php",
        "id="+id,
        function(data){
            complete:
                alert("Добавлено в корзину");
        },
        "html"
    );
}
function LoadPhotoPrice(id){
    $.post(
        "ajax/loadPhotoPrice.php",
        "id="+id,
        function(data){
            complete:
                $("#PricePhotoList").html(data);
        },
        "html"
    );
    goPhoto(0, id);
}
function goPhoto(i, id){
    $.post(
        "ajax/loadPhotoImg.php",
        "i="+i+"&id="+id,
        function(data){
            complete:
                $("#PriceImg").html(data);
        },
        "html"
    );
}
