/* Minification failed. Returning unminified contents.
(1,1): run-time error CSS1019: Unexpected token, found '$'
(1,2): run-time error CSS1019: Unexpected token, found '('
(1,12): run-time error CSS1031: Expected selector, found '('
(1,12): run-time error CSS1025: Expected comma or open brace, found '('
(52,2): run-time error CSS1019: Unexpected token, found ')'
 */
$(function () {
    $('.slider-for').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        dots: false,
        arrows: false,
        asNavFor: '.slider-nav'
    });
    $('.slider-nav').slick({
        slidesToShow: 5,
        scroll: false,
        asNavFor: '.slider-for',
        dots: false,
        arrows: false,
        centerMode: false,
        focusOnSelect: true
    });
    
    $(".addtoCart").click(function () {
        var name = $('.item_name').html();
        var qty = $('.order_qty').val();
        var recordToAdd = $(this).attr("data-id");
        $(".cart_modal_item_name").text(name);
        $(".item_modal_qty").text(qty);
        $(".item_model_thumbnail").attr('src', $('#Thumbnail').val());        
        if (recordToAdd != '') {
            //update cart count
            $.post("/cart/AddToCart", { "Artnum": recordToAdd, "Qty": qty },
                function (data) {
                    $('#cart-status').text(data.CartCount);
                });
            //update cart list
            $.post("/cart/CartList", {},
                function (data) {
                    $(".drop_down_cart_details").html(data);
                });
        }
    });
    $(".plus_minus_minus").click(function () {
        var qty = $('.order_qty').val();
        if (qty > 1) {
            qty--;
            $('.order_qty').val(qty);
        }
    });
    $(".plus_minus_plus").click(function () {
        var qty = $('.order_qty').val();
        qty++;
        $('.order_qty').val(qty);
    });

});
