﻿var commerce = commerce || {};
(function() {
    // ..create the product functionality base prototypes..
    commerce.product = commerce.product || {};
    commerce.product._data = commerce.product._data || {};

    commerce.ui = commerce.ui || {};


    /*
    ** e-commerce product comparison functionality.
    **
    ** Calls .asmx web services to interact with the
    ** current context, basket and comparison lists.
    */
    if (typeof commerce._callws !== 'function') {
        commerce._callws = function(options) {
            var fn_wsok = function(data, status) {
                // ..convert from Microsoft.NET json format,
                // which serializes into a "d" field to
                // prevent cross-site scripting..
                if (typeof data == 'object' && data != null && typeof data.d != 'undefined')
                    data = eval(data.d);
                if (typeof options.success == 'function' && data.status == 200)
                    options.success(data, status);
                else if (typeof options.error == 'function')
                    options.error(data, status);
                return false;
            };
            var fn_wserr = function(data, status) {
                if (typeof data == 'object' && data != null && typeof data.d != 'undefined')
                    data = eval(data.d);
                if (typeof options.error == 'function')
                    options.error(data, status);
                return false;
            };
            var data = $.extend({ success: fn_wsok, error: fn_wserr }, options);
            if (data.success != fn_wsok) data.success = fn_wsok;
            if (data.error != fn_wserr) data.error = fn_wserr;
            $.ajax(data);
        };
    }

    if (typeof commerce.product._fetch !== 'function') {
        commerce.product._fetch = function(id, options) {
            var item = null;
            options = $.extend({ async: true, success: function(data, status) { commerce.product._data['$' + data.id] = (item = data); } }, options);
            commerce._callws($.extend({ url: '/SiteWebServices/products.asmx/Get', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ key: id }) }, options));
            return item;
        };
    }

    if (typeof commerce.product.consider !== 'function') {
        commerce.product.consider = function(id, options) {
            commerce._callws($.extend({ url: '/SiteWebServices/products.asmx/Consider', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ key: id }) }, options));
            return false;
        };
    }

    if (typeof commerce.product.disregard !== 'function') {
        commerce.product.disregard = function(id, options) {
            var k = JSON.stringify((id = id || '') === '' ? {} : { key: id });
            commerce._callws($.extend({ url: id === '' ? '/SiteWebServices/products.asmx/DisregardAll' : '/services/products.asmx/Disregard', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', data: k }, options));
            return false;
        };
    }

    if (typeof commerce.ui.new_comparison_line !== 'function') {
        commerce.ui.new_comparison_line = function(result) {
            if (typeof result == "undefined")
                return '';

            var li = $(document.createElement('li')).addClass('product').css('display', 'none');
            var a_name = $(document.createElement('a')).html('<span class="title">' + result.name + '</span>').attr({ href: result.url, title: result.name });
            var thumbn = $(document.createElement('img')).attr({ src: '/assets/en/catalogue/xxsmall/' + result.id + '.jpg', title: result.name }).css('vertical-align', 'middle');

            var a_butn = $(document.createElement('a')).html('<img src="/assets/en/site/buttons/comparison-remove.png" />').addClass('remove').attr({ href: '#?disregard=' + result.id }).css({ cursor: 'pointer' }).click(function() {
                commerce.product.disregard(result.id, { success: function() { li.slideUp('fast'); } });
            });
            li.append(a_name).append(a_butn);
            a_name.prepend(thumbn);
            li.fadeIn('slow');
            return li;
        };
    }

    if (typeof commerce.ui.new_comparison_list !== 'function') {
        commerce.ui.new_comparison_list = function(results, status) {
            $('#product-comparison .product-list').empty();
            switch (results.status) {
                case 200: // OK
                    if (results.data.length === 0) {
                        var span = $(document.createElement('span')).addClass('message');
                        $('#product-comparison .product-list').append(span);
                        span.text('You currently have no products for comparison');
                        return;
                    }

                    for (var index = 0; index < results.data.length; index++) {
                        var element = commerce.ui.new_comparison_line(results.data[index]);
                        $('#product-comparison ul.product-list').append(element);
                    }
                    break;

                case 404: // Product not found
                    var span = $(document.createElement('span')).addClass('message');
                    $('#product-comparison .product-list').append(span);
                    span.text('The product you requested could not be found!');
                    break;

                case 409: // Product definition not apporopriate
                    var span = $(document.createElement('span')).addClass('message');
                    $('#product-comparison .product-list').append(span);
                    span.text('The product you requested is not of type "' + results.message + '"; only products of the same type can be compared.');
                    break;

                default: // General error
                    var span = $(document.createElement('span')).addClass('message');
                    $('#product-comparison .product-list').append(span);
                    span.text("We don't seem to be able to to add the product for comparison; sorry about that.");
                    break;
            }
        };
    }


    /*
    ** e-commerce product variant styles functionality.
    **
    ** Calls .asmx web services to interact with the
    ** current context, basket and comparison lists.
    */
    if (typeof commerce.product.find !== 'function') {
        commerce.product.find = function(id, attrs) {
            var item = commerce.product._data['$' + id] || commerce.product._fetch(id);
            if (item == null) return null;
            if (arguments.length == 1)
                return item;
            if (attrs == null || attrs.length === 0)
                return null;
            for (var v = 0, m = 0; v < item.variants.length; v++, m = 0) {
                for (var n = 0; n < attrs.length; n++) {
                    if (typeof item.variants[v][attrs[n].key] === 'undefined')
                        continue;
                    var a = (attrs[n].value || '').toLowerCase();
                    var b = (item.variants[v][attrs[n].key].id || '').toLowerCase();
                    if (a == b && a != '') {  // don't match on null
                        m++;
                    }
                    else {
                        // try and match on the variantid
                        var c = (item.variants[v].id);
                        if (a == c)
                            m++;
                    }
                }
                if (m === attrs.length) {
                    return item.variants[v];
                }
            }
            return null;
        };
    }

    if (typeof commerce.product.place !== 'function') {
        commerce.product.place = function(p, v, c, options, bcnt) {           
            if (!navigator.cookieEnabled) {
                window.location = $('.hdnCookiePageUrl').val();
            }
            var fn = function(data, status) {                
                var msg = 'Unable to add product to basket; system failure.';
                if (status == 'success') {
                    var expandMiniBasket = true;
                    var json = eval('(' + data + ')');

                    if (json !== null && json.itemcount != 'undefined') {

                        $('p#basket-nav-summary').html('<span><em>' + json.itemcount + '</em> '
                            + (json.itemcount == 1 ? 'item...' : 'items...')
                            + '</span> <span class="right">' + '<var class="jsincludevat">' + json.totalincludevat + '</var><var class="jsexcludevat">' + json.totalexcludevat + '</var>' + '</span>');
                    }
                    $(".panelinsufficient").attr("style", "display:none;");

                    var p1 = $(document.createElement("p")).addClass('added-item');
                    var imagebtn = $('#ctl00_cphBodyContent_product_basket');
                    $('.added-item').remove();
                    
                    if (imagebtn[0] !== undefined && imagebtn[0].tagName == 'AREA') {
                        /* from banner images on home page just show if failure message */
                        if (!json.products[0].addToBasket) {
                            $('#home-body-banner-menu').prepend(p1).slideDown('slow');

                            //hide mini-basket if visible
                            if ($("[id$='mini_basket']").is(':visible')) {
                                $("[id$='lnkMiniExpand']").click();
                            }
                            expandMiniBasket = false;
                        }
                    }
                    else {
                        imagebtn.parent().append(p1).fadeIn('slow');
                    }

                    if (typeof json.products != 'undefined' && json.products.length != 0) {
                        // Set quantity on Hand, Buttonid and quantity text box id for overlay 
                         $('.hdnQuantityOnHand').val(json.products[0].quantityOnHand)
                         $('hdnVariantID').val(json.products[0].vid);
                         $('hdnProductID').val(json.products[0].pid);

                        // set the category id correctly - used by Omniture
                        if (json.products[0].cid != null && json.products[0].cid != 'undefined' && json.products[0].cid != '') {
                            c = json.products[0].cid;
                        }

                         $('hdnQOHButton').val(".add-basket.button");
                         $('hdnQOHQuanty').val(".product-quantity");

                        msg = (json.products[0].addToBasket ? '<img src="/assets/en/site/canvas/tick.gif" alt="tick"/>' + options.quantity + ' added' : (json.products[0].reason || 'not added'));
                        // Trade Doubler tracking on add to basket success
                        var tdDate = new Date();
                        var prodBasket = (json.products[0].vid != '' ? json.products[0].vid : json.products[0].pid);
                        $('.optionsPanel').append('<img src="https://www.ist-track.com/ProcessBasketImage.ashx?companyId=724692e0-2f99-4874-9565-6fc82074fe86&itemCount=' + json.products[0].qty +'&basketItems=' + prodBasket + '&userDefinedFieldOne=&userDefinedFieldTwo=&userDefinedFieldThree=&timeStamp=' + encodeURI(tdDate) +'" alt="" width="1" />');
                    } else {
                        msg = 'not added';
                    }
                    var intQtyOnHand = parseInt(json.products[0].quantityOnHand); 
                    if(intQtyOnHand > 0 && json.products[0].addToBasket == false)
                    {
                        // Show confirmation overlay 
                        $('.quantityavailable-QOH').text(intQtyOnHand);
                        Overlay.show(".InsufficientStock-Confirmation-overlay"); 
                        $('.added-item').remove();
                    }
                    else
                    {
                        p1.html(msg);
                    

                        if (typeof Omniture != 'undefined') Omniture.SubmitAddToBasketSingle(p, v, c, options.quantity, bcnt);

                         // check if  upsell is valid on  product added 
                   
                        if (json.products[0].upsellqty > 0) {
                            expandMiniBasket = false;
                            if ($("[id$='mini_basket']").is(':visible')) {
                                $("[id$='lnkMiniExpand']").click();
                            }                        
                            // Show upsell overlay
                            Overlay.show('.Upselloverlay', '.hdUpsellstatus');
                            var QtyAddedMsg = $('.hdUpsellAddedMsg').val();
                            QtyAddedMsg = QtyAddedMsg.replace('{0}',String(options.quantity));
                            $('.product-added').html(QtyAddedMsg);
                            $('.hdUpsellQty').val(String(json.products[0].upsellqty));
                            var UpsellMsg = $('.hdUpsellMsg').val()
                            UpsellMsg = UpsellMsg.replace('{0}',String(json.products[0].upsellqty));
                            UpsellMsg = UpsellMsg.replace('{1}',String(json.products[0].upselldiscount));
                            $('.product-upsell-msg').html(UpsellMsg);

                           // if (upsellQty !== undefined) $(upsellQty).text(String(json.products[0].upsellqty));
                        
                            //var upsellDiscount = $('.jsupselldiscount')
                            //if (upsellDiscount !== undefined) $(upsellDiscount).text(String(json.products[0].upselldiscount));
                       

                        }
                   
                        RebuildMiniBasket(expandMiniBasket);
                   

                    }

                    $('#basket-message .message').html(msg);
                    $('#basket-message').fadeIn('fast');
                }
                return false;
            };
            if (p !== null && typeof p != 'string') p = p.id; // ..extract the product id..
            if (v !== null && typeof v != 'string' && typeof v != 'undefined') v = v.id; // ..extract the variant id..
            //If the variant is undefined, it implies that the variant doesnt exist for the choosen product, therefore
            //set it to null
            if (typeof v == 'undefined') v = '';

             // Set Product and variant id for upsell 
                var upsellpid = $('.hdUpsellpid')
                if (upsellpid !== undefined) $(upsellpid).val(p);

                var upsellvid = $('.hdUpsellvid')
                if (upsellvid !== undefined) $(upsellvid).val(v);
                
            var o = $.extend({ command: 'AddToBasket', ajax: true, pid: p, vid: v }, options);
            var h = $.ajax({ url: '/handler.aspx', data: o, success: typeof options.success != 'undefined' ? options.success : fn, error: typeof options.error != undefined ? options.error : fn, dataType: 'text', cache: false });
        };
    }


    /*
    ** e-commerce product variant styles functionality.
    **
    ** Calls .asmx web services to interact with the
    ** current context, basket and comparison lists.
    */
    if (typeof commerce.product.find !== 'function') {
        commerce.product.find = function(id, attrs) {
            var item = commerce.product._data['$' + id] || commerce.product._fetch(id);
            if (item == null) return null;
            if (arguments.length === 1)
                return item;
            if (attrs == null || attrs.length === 0)
                return null;
            for (var v = 0, m = 0; v < item.variants.length; v++, m = 0) {
                for (var n = 0; n < attrs.length; n++) {
                    if (typeof item.variants[v][attrs[n].key] === 'undefined')
                        continue;
                    var a = (attrs[n].value || '').toLowerCase();
                    var b = (item.variants[v][attrs[n].key].id || '').toLowerCase();

                    if (a == b && a != '') {  // don't match on null
                        m++;
                    }
                    else {
                        // try and match on the variantid
                        var c = (item.variants[v].id);
                        if (a == c)
                            m++;
                    }
                }
                if (m == attrs.length) return item.variants[v];
            }
            return null;
        };
    }


    /*
    ** e-commerce product user interface functionality.
    **
    ** Utility functions for making swatches from drop-down lists
    ** and intercepting the product variant controls range selector.
    */
    if (typeof commerce.ui.swatchify !== 'function') {
        commerce.ui.swatchify_resolve = function(container) {
            var options = [];
            container.find("select.property").each(function(index, select) {
                var id = select.id.match(/[a-zA-Z0-9]+$/) || [];
                if (id.length === 0) return;

                options.push({ key: id[0].toLowerCase(), value: $(select).val() || '' });
            });

            var id = container.find("input[type='hidden'].product-key").val();

            //return the product id if the choosen options is null
            //If the choosen option is null, it implies that the selected item is a Product without any variant
            if (commerce.product.find(id, options) == null) {
                // try to get using variant id as the option value
                var options = [];
                container.find("select.property").each(function(index, select) {
                    options.push({ key: "id", value: $(select).val() || '' });
                });
                if (commerce.product.find(id, options) == null) {
                    return id;
                }
                else {
                    return commerce.product.find(id, options);
                }
            }
            else {
                return commerce.product.find(id, options);
            }
        };

        commerce.ui.swatchify_range = function(container, options) {
            if (container === null) return;
            var lists = container.find('select.colour');

            commerce.ui.swatchify(lists, options);
            lists.change(function(eventObject) {
                var id = container.find("input[type='hidden'].product-key").val();
                var pr = commerce.product.find(id);
                if (pr === null) return true;

                // ..find the 'size' selector and restructure the values
                // based on the keys found in the variant collection of
                // the product..
                var selector = container.find('select.property.size');
                if (selector !== null && selector.size() !== 0) {
                    var prev = selector.val();
                    selector.empty();

                    for (var index = 0; index < pr.variants.length; index++) {
                        var variant = pr.variants[index];
                        if (typeof variant.colour !== 'undefined' && typeof variant.size !== 'undefined' && variant.colour.id === $(this).val())
                            selector.append('<option value="' + variant.size.id + '">' + variant.size.descr + '</option>');
                    }

                    // ..reset the previously selected value (if present)
                    // and issue any custom change event handler specified
                    // in the options given..
                    selector.val(prev);
                }
                if (typeof options.change === 'function') {
                    eventObject = $.extend(eventObject, { data: commerce.ui.swatchify_resolve(container) });
                    options.change(eventObject);
                }
            });

            // ..map all other drop downs tagged as being variant properties
            // with the custom callback handler; resolve the selected product
            // and pass through as a secondary parameter..
            container.find("select.property").filter(":not(.colour)").change(function(eventObject) {
                if (typeof options.change === 'function') {
                    eventObject = $.extend(eventObject, { data: commerce.ui.swatchify_resolve(container) });
                    options.change(eventObject);
                }
            });
        };

        commerce.ui.swatchify = function(lists, options) {
            if (lists === null || lists.size() == 0)
                return;
            options = $.extend({}, options);
            lists.each(function(index, select) {
                var choice = $(select).children(':selected').val();
                var div = $(document.createElement('ul')).addClass('swatches option');
                $(select).css('display', 'none').children('option').each(function(index, option) {
                    var li = $(document.createElement('li'));
                    var a = $(document.createElement('a'));
                    var i = $(document.createElement('img'));
                    a.attr({ alt: option.text, href: '#', title: option.text }).addClass('swatch').append(i).addClass($(option).val() == choice ? 'selected' : '').click(function() {
                        $(this).parents('ul').find('a.swatch.selected').removeClass('selected');
                        $(this).addClass('selected');
                        $(select).val(option.value).change();
                        
                        if ($('.added-item').length) {
                            $('.added-item').remove();
                        }
                        return false;
                    });
                    i.attr('src', '/catalogue/swatch/' + $(option).val().replace(/[^\w]/, '') + '.gif');
                    li.append(a);

                    //show only if more than one choice
                    if ($(this).siblings('option').length > 0) {
                        $("[id$='product_config']").show();
                    }
                    div.append(li);
                });

                $(select).before(div);
            });
        };
    }

    if (typeof commerce.ui.intercept !== 'function') {
        commerce.ui.intercept = function(buttons) {
            if (buttons === null || buttons.size() == 0)
                return;

            buttons.each(function(index, button) {
                $(button).click(function() {
                    debugger;
                    var options = {};
                    var item = commerce.ui.swatchify_resolve($(button).parent());
                    if (item == null) { return true; } // ..submit the form; we can't find the product!..

                    $(button).parent().find(".product-options select.non-property").each(function(index, select) {
                        var id = select.id.match(/[a-zA-Z0-9]+$/) || [];
                        if (id.length === 0) return;

                        options[id[0].toLowerCase()] = $(select).val() || '';
                    });
                    // ..the quantity is a special case; select it directly..
                    var id = $(button).parent().find("input[type='hidden'].product-key").val();

                    //var quantity = $('select.non-property.quantity');
                    var quantity = $('.product-quantity');
                    options.quantity = quantity.size() == 0 ? '1' : quantity.val();
                    var bcnt = $('#basket-count').val();
                    if (bcnt == "True")
                    { $('#basket-count').val('False'); }
                    var cid = $('#product-cat').val();
                    commerce.product.place(id, item.id, cid, options, bcnt);
                    return false;
                });
            });
        };
        // pass in a specific span where the productrangecontrol has been placed in
        // in situation where the add button is in a different span
        commerce.ui.intercept = function(buttons, spanID) {
            if (buttons === null || buttons.size() == 0)
                return;

            if (spanID === null || spanID == 'undefined') {
                // standard button processing
                buttons.each(function(index, button) {
                    $(button).click(function() {
                        var options = {};
                        var item = commerce.ui.swatchify_resolve($(button).parent());
                        if (item == null) { return true; } // ..submit the form; we can't find the product!..

                        $(button).parent().find(".product-options select.non-property").each(function(index, select) {
                            var id = select.id.match(/[a-zA-Z0-9]+$/) || [];
                            if (id.length === 0) return;

                            options[id[0].toLowerCase()] = $(select).val() || '';
                        });
                        // ..the quantity is a special case; select it directly..
                        var id = $(button).parent().find("input[type='hidden'].product-key").val();

                        //var quantity = $('select.non-property.quantity');
                        var quantity = $('.product-quantity');
                        options.quantity = quantity.size() == 0 ? '1' : quantity.val();
                        var bcnt = $('#basket-count').val();
                        if (bcnt == "True")
                        { $('#basket-count').val('False'); }
                        var cid = $('#product-cat').val();
                        commerce.product.place(id, item.id, cid, options, bcnt);
                        return false;
                    });
                });
            }
            else {
                buttons.each(function(index, button) {
                    // processing from a specific span
                    $(button).click(function() {
                        var options = {};
                        var item = commerce.ui.swatchify_resolve($(spanID));
                        if (item == null) { return true; } // ..submit the form; we can't find the product!..

                        $(spanID).find(".product-options select.non-property").each(function(index, select) {
                            var id = select.id.match(/[a-zA-Z0-9]+$/) || [];
                            if (id.length === 0) return;

                            options[id[0].toLowerCase()] = $(select).val() || '';
                        });
                        // ..the quantity is a special case; select it directly..
                        var id = $(spanID).find("input[type='hidden'].product-key").val();

                        //var quantity = $('select.non-property.quantity');
                        var quantity = $('.product-quantity');
                        options.quantity = quantity.size() == 0 ? '1' : quantity.val();
                        var bcnt = $('#basket-count').val();
                        if (bcnt == "True")
                        { $('#basket-count').val('False'); }
                        var cid = $('#product-cat').val();
                        commerce.product.place(id, item.id, cid, options, bcnt);
                        return false;
                    });
                });
            }
        };
    }

    function RebuildMiniBasket(expandMiniBasket) {
        var options = {};
        options = $.extend({ async: true, success: function(data, status) {
            var test = "";
            // output new minibasket contents
            if (data != null && data != 'undefined' && data.data != null && data.data != 'undefined' && data.data.html != null && data.data.html != 'undefined') {

                var rawHtml = data.data.html;

                // decode all product descriptions
                $(rawHtml).find('a').each(function (index, item) {   // each url anchor
                    var thisClass = $(this).attr('class');
                    var thisClassLength = thisClass.length + 9;
                    var descLength = $(this).html().length;

                    var descStart = rawHtml.indexOf("class='" + thisClass);
                    var descEnd = descStart + thisClassLength + descLength;

                    // get the html before and after the description we are fixing
                    var startHtml = rawHtml.substring(0, descStart + thisClassLength);
                    var endHtml = rawHtml.substring(descEnd);

                    // decode this description
                    var newHtml = HtmlDecode($(this).html());

                    // set new html by combining before and after sections with new description
                    rawHtml = startHtml + newHtml + endHtml;
                });

                $("#mini-basket-main").html(rawHtml);

                // set vat overlay url link
                var vatUrl = $("#miniVatLink");
                //Display the vat link in the footer. Pick this up from the master layout
                miniVatLinkHtml = $("#basket-vat").html();

                vatUrl.html(miniVatLinkHtml);

                var hasProducts = false;
                // set product url links
                $("a[class^='miniProductURL-']").each(function(index, item) {
                    hasProducts = true;
                    var thisUrl = $(this).attr("class").split('-');
                    if (thisUrl != null && thisUrl != 'undefined' && thisUrl.length > 1) {
                        var thisId = thisUrl[1];
                        if (data.data.urls != null && data.data.urls != 'undefined' && data.data.url != '') {
                            for (var i = 0; i <= data.data.urls.length - 1; i++) {
                                if (data.data.urls[i].key == thisId) {
                                    $(this).attr("href", data.data.urls[i].value);
                                    break;
                                }
                            }
                        }
                    }
                });

                //change the basket image
                if (hasProducts)
                    $('#basket-view').addClass('fullbasket').removeClass('emptybasket');
                else {
                    $('#basket-view').addClass('emptybasket').removeClass('fullbasket');
                }
                // to change price (including\excluding) depending on what is set in cookie 
                applyVatlayout();
                //expand mini-basket if requested
                if ($("[id$='mini_basket']").is(':hidden')
                    && expandMiniBasket !== undefined
                    && expandMiniBasket === true) {

                    $("[id$='lnkMiniExpand']").click();
                }

                //Fix for IE 7 , the vat change link was disappearing when a product was more than ones
                vatUrl.html(miniVatLinkHtml);
            }
        },
            error: function(data, status) {
                //alert('error');
            }
        },
			 options);

        var userId = $('.userID').val();
        var ItemHeaderCaptionLabel = $('.ItemHeaderCaptionLabel').val();
        var BasketItemQuantityCaptionLabel = $('.BasketItemQuantityCaptionLabel').val();
        var BasketItemPriceCaptionLabel = $('.BasketItemPriceCaptionLabel').val();
        var BasketSubTotalCaptionLabel = $('.BasketSubTotalCaptionLabel').val();
        var PriceVatCaptionLabel = $('.PriceVatCaptionLabel').val();
        var VATHeadingCaptionLabel = $('.VATHeadingCaptionLabel').val();
        var VATLinkCaptionLabel = $('.VATLinkCaptionLabel').val();
        var MiniBasketCloseCaptionLabel = $('.MiniBasketCloseCaptionLabel').val();
        var miniVatLinkHtml = $('#miniVatLink').html();

        commerce._callws($.extend({ url: '/SiteWebServices/products.asmx/GetMiniBasket', type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ "userID": userId, "ItemHeaderCaptionLabel": ItemHeaderCaptionLabel, "BasketItemQuantityCaptionLabel": BasketItemQuantityCaptionLabel, "BasketItemPriceCaptionLabel": BasketItemPriceCaptionLabel, "BasketSubTotalCaptionLabel": BasketSubTotalCaptionLabel, "PriceVatCaptionLabel": PriceVatCaptionLabel, "VATHeadingCaptionLabel": VATHeadingCaptionLabel, "VATLinkCaptionLabel": VATLinkCaptionLabel, "MiniBasketCloseCaptionLabel": MiniBasketCloseCaptionLabel }) }, options));

    };

} ());





