<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var specialsWidgetLocaleStrings = {
    'expiration': 'Expires:',
    'currency': '$',
    'currencyAbbreviation' : '',
    'currencyGroupSymbol' : ',',
    'loading': 'Loading',
    'noSpecials': 'No specials available at the moment. Please check back soon!',
    'print': 'Print',
    'showPrintButton': '',
    'printButtonOverrideURL': '',
    'details': 'Details',
    'all' : 'View All',
    'filterBy' : "Filter by: "

};
//Create promo list view
var SpecialsList = {

    events : null,
    today : null,
    latestDate: null,
    elements : null,
    rootLoc: '',
    siteExtension: '',
    dataSourceFile: '',
    vehicleData: {},
    dateFormat : '',

    onVehicleLoad : function(vehicleData, domContainer) {},
    onSearchFinished : function (totalResults) {},

    formatPrice : function(price,event) {
        var decimals = 0;
        var thousands_sep = specialsWidgetLocaleStrings.currencyGroupSymbol;
        // assuming 1,234,567.89 or 1.234.567,89 formats only
        var decimal_sep = ( thousands_sep == ',' ) ? '.' : ',';
        var thousandsRegex = ( thousands_sep == ',' ) ? new RegExp(',','g') : new RegExp('\\.','g');
        var decimalRegex = ( decimal_sep == ',' ) ? new RegExp(',','g') : new RegExp('\\.','g');

        var n = String(price).replace(thousandsRegex,""),
            n = String(n).replace(decimalRegex,"."),
            c = isNaN(decimals) ? 2 : Math.abs(decimals), //if decimal is zero we must take it, it means user does not want to show any decimal
            d = decimal_sep || '.', //if no decimal separator is passed we use the dot as default decimal separator (we MUST use a decimal separator)
            t = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, //if you don't want to use a thousands separator you can pass empty string as thousands_sep value
            sign = (n &lt; 0) ? '-' : '',

            //extracting the absolute value of the integer part of the number and converting to string
            i = parseInt(n = Math.abs(n).toFixed(c)) + '',
            j = ((j = i.length) &gt; 3) ? j % 3 : 0;

        var roundPrice = event.vehicleKey !== '' &amp;&amp; event.useFeedPrice === true;
        if ( roundPrice === false ) {
            i = String(price).replace(thousandsRegex,"");
        }

        var result = sign + (j ? i.substr(0, j) + t : '') + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : '');

        return specialsWidgetLocaleStrings.currency + result + ' ' + specialsWidgetLocaleStrings.currencyAbbreviation;
    },

    init : function(selector, dataSourceFile) {

        this.elements = $(selector);

        if(typeof bpDate == 'undefined' || bpDate == '')
        {
            this.today = new Date();
        }
        else
        {
            this.today = new Date( bpDate );
        }

        this.rootLoc = window.rootloc || '';
        this.siteExtension = window.siteExtension || '';
        this.dataSourceFile = dataSourceFile || 'calendarEvents.json';

        this.today.setHours(0,0,0);

        if (this.elements.length &gt; 0) {
            var progressRow = $('&lt;div class="loadingSpecials"&gt;&lt;i class="fa fa-spinner fa-spin"&gt;&lt;/i&gt; '+ specialsWidgetLocaleStrings.loading + '&lt;/div&gt;');
            $.each(SpecialsList.elements,function(idx,elem){
                $(elem).append(progressRow);
            });
            //Load Data
            $.ajax({
                url: this.rootLoc + 'data/' + SpecialsList.dataSourceFile,
                dataType: 'json',
                error:function(){
                    SpecialsList.events = [];
                },
                success:function(data){
                    var sync = {waits: 0},
                        validData = [],
                        dealers = [];

                    this.rootLoc = window.rootloc || '';

                    $.ajax({
                        url: this.rootLoc + 'data/dealersByConditionFeedDealer.json',
                        dataType: 'json',
                        success:function(dealerData){

                            dealers = dealerData;

                            async.map(data,
                                // iterate
                                function(special, done) {
                                    // if special has vehicle key, validate it against the feed data
                                    if (special.vehicleKey) {
                                        inventoryDaoRich.lookupId(special.vehicleKey, function(err, vehicle) {
                                            if (err) done(err);
                                            else {
                                                if (vehicle) {
                                                    SpecialsList.vehicleData[vehicle['_id']] = vehicle;
                                                }

                                                if( vehicle &amp;&amp; vehicle.filters.isSold == "0" )
                                                {
                                                    if( special.useFeedPrice )
                                                    {
                                                        if( vehicle.filters.dealer_map_key &amp;&amp; dealers[vehicle.filters.dealer_map_key.toLowerCase()] )
                                                        {
                                                            if( dealers[vehicle.filters.dealer_map_key.toLowerCase()].priceField )
                                                            {

                                                                var priceFieldToUse = dealers[vehicle.filters.dealer_map_key.toLowerCase()].priceField;

                                                                special.price = vehicle['filters']['price'][priceFieldToUse];
                                                            }
                                                        }
                                                    }

                                                    done(null, special);
                                                } else done();
                                            }
                                        });
                                    }

                                    // otherwise, there's nothing to validate
                                    else done(null, special);
                                },
                                // callback
                                function(err, data) {
                                    SpecialsList.events = data ? data.filter(function(val) {return val;}) : [];

                                    $.each(SpecialsList.elements, function(idx,element) {
                                        var elem = $(element);
                                        var categories = elem.attr('data-categories')
                                            ? JSON.parse(elem.attr('data-categories'))
                                            : [];

                                        var bpcpf = window.bpCustomPageFields;
                                        if( typeof bpcpf !== 'undefined' )
                                        {
                                            var bpcpf= jQuery.parseJSON( bpcpf );
                                            if(typeof bpcpf =='object')
                                            {
                                                if( bpcpf.hasOwnProperty('specials_widget_categories') )
                                                {
                                                    if( bpcpf.specials_widget_categories.trim() )
                                                    {
                                                        var categories = bpcpf.specials_widget_categories.trim();
                                                    }
                                                }
                                            }
                                        }

                                        var featuredOnly = elem.attr('data-featured-only') == "1" || false;
                                        var maxEvents = elem.attr('data-limit') || 0;
                                        var eventsCount = 0;

                                        var events = SpecialsList.events.slice(0).sort(function (a, b) {

                                            //SORT EVENTS BY ORDER FIELD
                                            if (a.order == b.order) {
                                                return 0;
                                            }
                                            return (a.order &lt; b.order) ? -1 : 1;

                                        }).map(function (e) {
                                            return $.extend({}, e);
                                        });

                                        var accSubscribes = $(elem).attr('data-acc_specials_subscribe');
                                        if ( accSubscribes != "" ) {
                                            var accPos = $(elem).attr('data-acc_specials_subscribe_position');
                                            var query = {
                                                "accId": window.aId,
                                                "accCats": accSubscribes,
                                                "accPos": accPos
                                            };

                                            var accountSpecials = $.ajax({
                                                type: "POST",
                                                dataType: 'json',
                                                url: rootloc + 'getAccountCurrentActiveSpecials',
                                                data: query,
                                                async: false,
                                                success: function (data) {
                                                    return data;
                                                }
                                            }).responseJSON;

                                            if ( accPos == 'first' ) {
                                                events =  typeof accountSpecials != 'undefined' ? accountSpecials.concat(events) : events;
                                            } else {
                                                events =  typeof accountSpecials != 'undefined' ? events.concat(accountSpecials) : events ;
                                            }
                                        }

                                        events = events.filter(function (event) {

                                            //FILTER OUT ACCORDING TO CONDITIONS
                                            var featureOnlyCondition = !featuredOnly || event.featured;

                                            var categoriesCondition = null != event.category &amp;&amp;
                                                (categories.length == 0 || categories.indexOf(event.category.name.replace(/"/g,'&amp;quot;')) &gt; -1);// see category in inventorySpecialsDialog.js

                                            if ( typeof event.isAccountEvent != 'undefined' ) {
                                                // account specials should ignore categories specified in widget...
                                                categoriesCondition = event.isAccountEvent;
                                            }

                                            var startDateParts = event.start.split('-');
                                            var endDateParts = event.end.split('-');
                                            if(event.start == ""){
                                                var date = new Date( SpecialsList.today.getTime() );
                                                event.start = new Date(date.setDate(date.getDate() - 1));
                                            }
                                            else{
                                                event.start = new Date(startDateParts[0], startDateParts[1] - 1, startDateParts[2]);
                                                event.start.setHours(0, 0, 0, 0);
                                            }

                                            var endDate = "";
                                            if(event.end != "" &amp;&amp; event.end.length &gt; 0){
                                                var date = new Date(endDateParts[0], endDateParts[1] - 1, endDateParts[2]);
                                                date.setHours(0, 0, 0, 0);
                                                endDate = event.end = date;
                                            }
                                            else{
                                                endDate = SpecialsList.getFutureDate();
                                            }

                                            SpecialsList.today.setHours(0, 0, 0, 0);

                                            if (SpecialsList.latestDate == null || event.end == "" ? false : SpecialsList.latestDate.getTime() &lt; event.end.getTime()) {
                                                SpecialsList.latestDate = endDate;
                                            }

                                            var upcomingCondition = event.end == "" ? true : SpecialsList.today.getTime() &lt;= event.end.getTime();

                                            var hideUntilCondition = true;

                                            if (event.hideUntil) {
                                                var hideUntilDateParts = event.hideUntil.split('-');
                                                event.hideUntil = new Date(hideUntilDateParts[0], hideUntilDateParts[1] - 1,
                                                    hideUntilDateParts[2]);
                                                event.hideUntil.setHours(0, 0, 0, 0);
                                                hideUntilCondition = SpecialsList.today.getTime() &gt;= event.hideUntil.getTime();
                                            }

                                            var mainCondition = featureOnlyCondition &amp;&amp; categoriesCondition &amp;&amp; upcomingCondition
                                                &amp;&amp; hideUntilCondition;
                                            if (mainCondition) {
                                                eventsCount++;
                                                var countCondition = !maxEvents || eventsCount &lt;= maxEvents || maxEvents == 0;
                                                mainCondition = mainCondition &amp;&amp; countCondition;
                                            }

                                            return mainCondition;

                                        });

                                        var uniqueId = 'specials-widget-' + idx;

                                        elem.attr('id', uniqueId);
                                        $('div.loadingSpecials').remove();
                                        SpecialsList.renderer[elem.attr('data-type')](uniqueId, elem, events);
                                        if(events.length === 0){
                                            var noSpecialsDiv = $('&lt;div class="noSpecials"&gt;'+ specialsWidgetLocaleStrings.noSpecials + '&lt;/div&gt;');
                                            elem.append(noSpecialsDiv);
                                        }

                                        SpecialsList.onSearchFinished(events.length);

                                    });
                                }
                            );


                            $('.special img').load(function(){
                                SpecialsList.fixHeights();
                            });

                            setTimeout(function(){
                                SpecialsList.fixHeights();
                            },1000);

                            $(window).on('resize',function(){
                                SpecialsList.fixHeights();
                            });

                            $(window).on('load',function(){
                                SpecialsList.fixHeights();
                            });


                        }
                    });

                }
            });
        }
    },


    getFlipCardHTML : function(event,cssClass,titleOnFront, currDate, elem) {

        var eventDateTxt = '',
            price,
            displayPrice,
            i;


        if( undefined != event.dateText &amp;&amp; event.dateText != "" )
        {
            eventDateTxt = event.dateText;
        }
        else
        {
            if ( event.recurrence == 'noRecurrence') {
                eventDateTxt = event.start.toFormatString('M d');
                eventDateTxt += '&lt;sup&gt;' + event.start.toFormatString('S') + '&lt;/sup&gt;';
                var endDate = event.end != "" ? event.end : SpecialsList.getFutureDate();
                if ( event.start.toFormatString('Y-M-d') != endDate.toFormatString('Y-M-d') ){
                    eventDateTxt += " - " + endDate.toFormatString('M d');
                    eventDateTxt += '&lt;sup&gt;'+ endDate.toFormatString('S') +'&lt;/sup&gt; ' + currDate.toFormatString('Y');
                } else {
                    eventDateTxt += ' ' + currDate.toFormatString('Y');
                }
            } else {
                eventDateTxt = currDate.toFormatString('M d') + '&lt;sup&gt;' + currDate.toFormatString('S') + '&lt;/sup&gt; ' + currDate.toFormatString('Y');
            }
        }

        if (undefined != event.price &amp;&amp; null != event.price &amp;&amp; event.price != '' &amp;&amp; event.price != '0') {
            var price = $.isNumeric(event.price) ? Number(event.price).toString() : event.price;
            displayPrice = SpecialsList.formatPrice(price,event); // denote currency
        }

        var detailsBtn = "";
        var cardBackOnClick = "";
        if (event.details != "") {
            event.details = event.details.replace("{root}", SpecialsList.rootLoc);
            event.details = event.details.replace("{{site_page_extension}}", SpecialsList.siteExtension);

            if( event.vehicleKey !== null &amp;&amp; event.vehicleKey != "" )
            {
                if( event.details.indexOf("?") == -1 )
                {
                    event.details = event.details + '?vehicleId='+event.vehicleKey;
                }
                else
                {
                    event.details = event.details + '&amp;vehicleId='+event.vehicleKey;
                }
            }

            var buttonText = elem.attr('data-button-text');
            detailsBtn += '&lt;a href="'+ event.details.replace(/%2F/g, '') +'" class="button yellow col-xs-12" itemprop="url" target="'+event.target+'"&gt;' + buttonText +  '&lt;/a&gt;';
            cardBackOnClick = ' onclick="window.open = (\''+event.details+'\', \''+event.target+'\')" ';
        }

        var frontTitle = "";
        var priceItemProp = displayPrice ? "itemprop='price'" : '';
        frontTitle = "&lt;div class='front-title'"+priceItemProp+"&gt;&lt;h2&gt;" + event.title;

        if( displayPrice ) {
            frontTitle = frontTitle + " : " + displayPrice;
            frontTitle = frontTitle + "&lt;/h2&gt;&lt;/div&gt;";
        } else {
            frontTitle = frontTitle + "&lt;/h2&gt;&lt;/div&gt;";
        }

        if (displayPrice) {
            event.shortDescription = event.shortDescription.replace("{{special-price}}", displayPrice);
            event.description = event.description.replace("{{special-price}}", displayPrice);
        }

        var altText = event.altText || '';

        var flipCardHtml = '&lt;div class="cardWrapper" data-always-flip="true"&gt;';
        flipCardHtml += '&lt;div class="card"&gt;';
        flipCardHtml += '&lt;div class="cardFace front"&gt;&lt;img alt="' + altText + '" src="'+ event.tile +'" itemprop="image"&gt;'+ frontTitle +'&lt;/div&gt;';
        flipCardHtml += '&lt;div class="cardFace back" '+cardBackOnClick+'itemprop="description"&gt;';

        if (undefined != event.shortDescription &amp;&amp; event.shortDescription != ""){
            flipCardHtml += "&lt;p&gt;" + event.shortDescription + "&lt;/p&gt;";
        }

        if (elem.data('expiration') &amp;&amp; undefined != event.end &amp;&amp; null != event.end &amp;&amp; event.end != '') {
            flipCardHtml += '&lt;div class="col-xs-12 expiration" itemprop="validThrough"&gt;' + specialsWidgetLocaleStrings.expiration +' '+ $.datepicker.formatDate(SpecialsList.dateFormat, event.end) + '&lt;/div&gt;';
        }

        if (detailsBtn != ""){
            flipCardHtml += '&lt;div class="detail-btn-area"&gt;' + detailsBtn + '&lt;/div&gt;';
        }

        flipCardHtml += '&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;';

        return flipCardHtml ;
    },


    appendFilter : function(calendarId, elem, arrCategories) {

        var enableFilters = elem.attr('data-enable-filters') || "1";

        if (arrCategories.length &gt; 1 &amp;&amp; enableFilters == "1") {

            var filterRow = $('&lt;div class="block row calendar-filter"&gt;&lt;/div&gt;');
            var filtersDiv = $('&lt;div class="col col-xs-12"&gt;&lt;/div&gt;');
            filterRow.append(filtersDiv);

            filtersDiv.append('&lt;span&gt;' + specialsWidgetLocaleStrings.filterBy + '&lt;/span&gt; ');

            $.each(arrCategories.sort(), function(idx, category) {
                var toggleClass =  "." + calendarId + "-" + category.replace(/[^a-zA-Z0-9]/g,'_');
                var anchor = ((idx &gt; 0) ? " | " : "") + '&lt;a href="javascript:;" class="toggle" data-toggle-value="#' + calendarId + ' ' + toggleClass + '" data-toggle-default-visible="true" data-toggle-show-animation="" data-toggle-show-animation-options="{}" data-toggle-hide-animation="" data-toggle-hide-animation-options="{}"&gt;' + category + '&lt;/a&gt;';
                filtersDiv.append(anchor);
            });

            var allAnchor = ' | &lt;a href="javascript:;" class="toggle active" data-toggle-value="#' + calendarId + ' .all' + '" data-toggle-default-visible="true" data-toggle-show-animation="" data-toggle-show-animation-options="{}" data-toggle-hide-animation="" data-toggle-hide-animation-options="{}"&gt;' + specialsWidgetLocaleStrings.all + '&lt;/a&gt;';
            filtersDiv.append(allAnchor);
            elem.prepend(filterRow);


            filtersDiv.find('a').click(function(){
                filtersDiv.find('a').removeClass('active');
                $(this).addClass('active');
            });

            toggleables.init();
        }

    },

    getFutureDate : function(){
        var date = new Date( SpecialsList.today.getTime() );
        date.setFullYear(date.getFullYear() + 1);
        return date;
    },

    fixHeights: function() {

        function processRow(row) {

            //find max heights
            var titleHeight = 0;
            var imageHeight = 0;
            var descHeight = 0;

            $.each(row, function() {
                var elem = $(this);

                var elemTitleHeight = elem.find('.title').attr('style','').height();
                var elemImageHeight = elem.find('.image').attr('style','').height();
                var elemDescHeight = elem.find('.description').attr('style','').height();

                if (elemTitleHeight &gt; titleHeight) {
                    titleHeight = elemTitleHeight;
                }

                if (elemImageHeight &gt; imageHeight) {
                    imageHeight = elemImageHeight;
                }

                if (elemDescHeight &gt; descHeight) {
                    descHeight = elemDescHeight;
                }

            });

            //set the heights
            $.each(row, function() {
                var elem = $(this);
                elem.find('.title').height(titleHeight);
                elem.find('.image').height(imageHeight);
                elem.find('.description').height(descHeight);
            });



        }

        var specials = $('.special');
        if (specials.length &gt; 0) {

            var lastTop = -100;
            var row = [];
            $.each(specials,function(){
                var holder = $(this);
                var elemTop = holder.offset().top;
                if (elemTop &gt; lastTop &amp;&amp; elemTop &gt; lastTop + 100 ) {
                    lastTop = elemTop;
                    if (row.length &gt; 0) {
                        processRow(row);
                        row = [];
                    }
                }
                row.push(holder);
            });

            if (row.length &gt; 0) {
                processRow(row);
                row = [];
            }

        }

    },


    renderer : {

        iterateDays : function(events, callbackFnc) {

            var today = new Date( SpecialsList.today.getTime() );
            today.setHours(0,0,0,0);

            $.each(events, function(idx, event){
                var eventStart = new Date(event.start);
                var eventEnd = event.end ? new Date(event.end) : SpecialsList.getFutureDate();

                if(today &lt;= eventEnd &amp;&amp; today &gt;= eventStart){
                    callbackFnc(event, today);
                }
            });
        },


        'tiles' : function(calendarId, elem, events) {
            var arrCategories = [];
            var enableDatesInFront = elem.attr('data-enable-dates-in-front') == '1';
            var tilesRow = $('&lt;div class="block row vertical-padded-elements"&gt;&lt;/div&gt;');

            this.iterateDays(events,function(event,currDate) {
                var html = SpecialsList.getFlipCardHTML(event,"",enableDatesInFront, currDate, elem);

                var toggleClass = calendarId + "-" + event.category.name.replace(/[^a-zA-Z0-9]/g,'_');
                var col = $('&lt;div class="col col-xs-12 col-sm-6 col-md-4 col-lg-3 toggleable all '+ toggleClass +'" itemscope itemtype="http://schema.org/Offer"&gt;&lt;/div&gt;');
                col.append(html);
                tilesRow.append(col);

                if (typeof event.vehicleKey !== 'undefined' &amp;&amp; event.vehicleKey !== '') {
                    col.attr('data-vehicle_id',event.vehicleKey);
                    var vehicle = typeof SpecialsList.vehicleData[event.vehicleKey] !== 'undefined' ? SpecialsList.vehicleData[event.vehicleKey] : null;
                    SpecialsList.onVehicleLoad(vehicle,col);
                }

                if (arrCategories.indexOf(event.category.name) == -1) {
                    arrCategories.push(event.category.name);
                }
            });

            elem.append(tilesRow);
            SpecialsList.appendFilter(calendarId, elem, arrCategories);
            heroWidget.init();
            resizeToggle();

        },

        'traditional' : function(calendarId, elem, events) {
            var arrCategories = [];
            var tilesRow = $('&lt;div class="block row vertical-padded-elements"&gt;&lt;/div&gt;');

            var idx = 0;
            this.iterateDays(events,function(event,currDate) {
                idx++;
                var detailsBtn = "";
                let allInP = SpecialsList.vehicleData[event.vehicleKey] &amp;&amp; JSON.parse(SpecialsList.vehicleData[event.vehicleKey].hasOwnProperty("allInPricingItems")) ? JSON.parse(SpecialsList.vehicleData[event.vehicleKey].allInPricingItems) : [];

                if( event.useFeedPrice === false )
                {
                    allInP = [];
                }

                if (specialsWidgetLocaleStrings.showPrintButton != "off") {

                    if (specialsWidgetLocaleStrings.printButtonOverrideURL != "") {
                        detailsBtn += '&lt;a href="'+specialsWidgetLocaleStrings.printButtonOverrideURL+'" class="btn btn-primary col-sm-12 hidden-xs detail-btn print-btn"&gt;' + specialsWidgetLocaleStrings.print + '&lt;/a&gt;';
                    } else {
                        detailsBtn += '&lt;a onclick="$(this).closest(\'.special\').find(\'.specialPrintableSection\').print();" class="btn btn-primary col-sm-12 hidden-xs detail-btn print-btn"&gt;' + specialsWidgetLocaleStrings.print + '&lt;/a&gt;';
                    }

                }
                if (event.details != "") {
                    event.details = event.details.replace("{root}", SpecialsList.rootLoc);
                    event.details = event.details.replace("{{site_page_extension}}", SpecialsList.siteExtension);

                    if (event.vehicleKey !== null &amp;&amp; event.vehicleKey != "") {
                        if (event.details.indexOf("?") == -1) {
                            event.details = event.details + '?vehicleId=' + event.vehicleKey;
                        }
                        else {
                            event.details = event.details + '&amp;vehicleId=' + event.vehicleKey;
                        }
                    }

                    var buttonText = elem.attr('data-button-text');
                    detailsBtn += '&lt;a href="' + event.details + '" class="btn btn-primary col-xs-12 detail-btn" itemprop="url" target="'+event.target+'"&gt;' + buttonText + ' &lt;i class="fa fa-chevron-circle-right"&gt;&lt;/i&gt; &lt;/a&gt;';
                }


                var html = "&lt;div class='special'&gt;";
                if (undefined != event.category &amp;&amp; null != event.category &amp;&amp; event.category.name != '') {
                    html += "&lt;div class='col-xs-12 category'&gt;" + event.category.name + "&lt;/div&gt;";
                }

                if( !event.hasOwnProperty('bodyStyle') || event.bodyStyle == null || event.bodyStyle == undefined ) event.bodyStyle = "";

                html += "&lt;div class='specialPrintableSection'&gt;&lt;div class='col-xs-12 title' itemprop='itemOffered' itemscope itemtype='http://schema.org/Product' data-bodystyle='"+event.bodyStyle+"'&gt;" + event.title + "&lt;/div&gt;";
                if (undefined != event.tile &amp;&amp; null != event.tile &amp;&amp; event.tile != '') {
                    var altText = event.altText || '';
                    html += "&lt;div class='col-xs-12 image' itemprop='image'&gt;&lt;img alt='" + altText + "' class='img-responsive' src=\"" + event.tile + "\"&gt;&lt;/div&gt;";
                }

                if (undefined != event.price &amp;&amp; null != event.price &amp;&amp; event.price != '' &amp;&amp; event.price != '0') {
                    var msrp = ($.isNumeric(event.price) ? Number(event.price).toString() : event.price).replace(",", "");
                    var price = Number(msrp);
                    if (allInP.length !== 0) {
                        var adminFee = ($.isNumeric(allInP.adminFee) ? Number(allInP.adminFee).toString() : allInP.adminFee).replace("'", "");
                        var fuelSurcharge = ($.isNumeric(allInP.fuelSurcharge) ? Number(allInP.fuelSurcharge).toString() : allInP.fuelSurcharge).replace("'", "");
                        var regulatoryFee = ($.isNumeric(allInP.regulatoryFee) ? Number(allInP.regulatoryFee).toString() : allInP.regulatoryFee).replace("'", "");
                        var otherFees = ($.isNumeric(allInP.otherFees) ? Number(allInP.otherFees).toString() : allInP.otherFees).replace("'", "");
                        price += Number(adminFee) + Number(fuelSurcharge) + Number(regulatoryFee) + Number(otherFees);
                    }
                    if (price &gt; msrp) {
                        html += "&lt;div class='col-xs-12 price' itemprop='price'&gt;"+ SpecialsList.formatPrice(price,event) + "&lt;/div&gt;";
                        html += "&lt;div class='col-xs-12' itemprop='msrp'&gt;MSRP: "+ SpecialsList.formatPrice(msrp,event) + "&lt;/div&gt;";
                    } else {
                        html += "&lt;div class='col-xs-12 price' itemprop='price'&gt;"+ SpecialsList.formatPrice(price,event) + "&lt;/div&gt;";
                    }

                    if (undefined != allInP.adminFee &amp;&amp; null != allInP.adminFee &amp;&amp; allInP.adminFee != '') {
                        html += "&lt;div class='col-xs-12' itemprop='adminFee'&gt;Admin Fee: " + SpecialsList.formatPrice(adminFee,event) + "&lt;/div&gt;";
                    }

                    if (undefined != allInP.fuelSurcharge &amp;&amp; null != allInP.fuelSurcharge &amp;&amp; allInP.fuelSurcharge != '') {
                        html += "&lt;div class='col-xs-12' itemprop='fuelSurcharge'&gt;Fuel Surcharge: " + SpecialsList.formatPrice(fuelSurcharge,event) + "&lt;/div&gt;";
                    }

                    if (undefined != allInP.regulatoryFee &amp;&amp; null != allInP.regulatoryFee &amp;&amp; allInP.regulatoryFee != '') {
                        html += "&lt;div class='col-xs-12' itemprop='regulatoryFee'&gt;Regulatory Fee: " + SpecialsList.formatPrice(regulatoryFee,event) + "&lt;/div&gt;";
                    }

                    if (undefined != allInP.otherFees &amp;&amp; null != allInP.otherFees &amp;&amp; allInP.otherFees != '') {
                        html += "&lt;div class='col-xs-12' itemprop='otherFees'&gt;Other Fees: " + SpecialsList.formatPrice(otherFees,event) + "&lt;/div&gt;";
                    }
                }

                if (undefined != event.shortDescription &amp;&amp; null != event.shortDescription &amp;&amp; event.shortDescription != '') {
                    html += "&lt;div class='col-xs-12 description' itemprop='description'&gt;" + event.shortDescription + "&lt;/div&gt;";
                }

                if (undefined != event.multi &amp;&amp; null != event.multi &amp;&amp; event.multi != "" &amp;&amp; event.multi != "{}") {
                    var multi = JSON.parse(event.multi);
                    if (multi.length &gt; 0) {
                        html += "&lt;div class='col-xs-12 multi'&gt;";

                        $(multi).each(function () {

                            var multiItem = this;

                            if( !multiItem.hasOwnProperty('multiYear') || multiItem.multiYear == null || multiItem.multiYear == undefined ) multiItem.multiYear = "";
                            if( !multiItem.hasOwnProperty('multiOfferType') || multiItem.multiOfferType == null || multiItem.multiOfferType == undefined ) multiItem.multiOfferType = "";

                            html += "&lt;div class='multi-item' data-multiyear='"+multiItem.multiYear+"' data-multioffertype='"+multiItem.multiOfferType+"'&gt;";
                            if ((multiItem.headline || "") !== "") {
                                html += "&lt;div class='headline'&gt;" + multiItem.headline + "&lt;/div&gt;";
                            }
                            if ((multiItem.priceText || "") !== "") {
                                html += "&lt;div class='headline'&gt;" + multiItem.priceText + "&lt;/div&gt;";
                            }
                            if ((multiItem.buttonText || "") !== "") {
                                html += "&lt;a class='button' target='_blank' href='" + multiItem.buttonURL. replace(/'/g,"") + "'&gt;" + multiItem.buttonText + "&lt;/a&gt;";
                            }
                            html += "&lt;/div&gt;";
                        });

                        html += "&lt;/div&gt;";
                    }
                }

                if (elem.data('expiration') &amp;&amp; undefined != event.end &amp;&amp; null != event.end &amp;&amp; event.end != '') {
                    html += "&lt;div class='col-xs-12 expiration' itemprop='validThrough'&gt;" + specialsWidgetLocaleStrings.expiration +' '+ $.datepicker.formatDate(SpecialsList.dateFormat, event.end) + "&lt;/div&gt;";
                }
                html += '&lt;/div&gt;';
                if (detailsBtn != '') {
                    html += detailsBtn;
                }

                html += "&lt;/div&gt;";

                var toggleClass = calendarId + "-" + event.category.name.replace(/[^a-zA-Z0-9]/g,'_');
                var col = $('&lt;div class="col col-xs-12 col-sm-6 col-md-4 col-lg-3 toggleable all '+ toggleClass +'" itemscope itemtype="http://schema.org/Offer"&gt;&lt;/div&gt;');
                col.append(html);

                if (typeof event.vehicleKey !== 'undefined' &amp;&amp; event.vehicleKey !== '') {
                    col.attr('data-vehicle_id',event.vehicleKey);
                    var vehicle = typeof SpecialsList.vehicleData[event.vehicleKey] !== 'undefined' ? SpecialsList.vehicleData[event.vehicleKey] : null;
                    SpecialsList.onVehicleLoad(vehicle,col);
                }

                tilesRow.append(col);

                //Clear Fixes
                if (idx % 4 == 0) {
                    tilesRow.append("&lt;div class='clearfix visible-lg'&gt;&lt;/div&gt;");
                }
                if (idx % 3 == 0) {
                    tilesRow.append("&lt;div class='clearfix visible-md'&gt;&lt;/div&gt;");
                }
                if (idx % 2 == 0) {
                    tilesRow.append("&lt;div class='clearfix visible-sm'&gt;&lt;/div&gt;");
                }
                if (idx % 1 == 0) {
                    tilesRow.append("&lt;div class='clearfix visible-xs'&gt;&lt;/div&gt;");
                }

                if (arrCategories.indexOf(event.category.name) == -1) {
                    arrCategories.push(event.category.name);
                }



            });

            elem.append(tilesRow);
            SpecialsList.appendFilter(calendarId, elem, arrCategories);
        }


    }
};

$(function() {
    window.inventoryDaoRich = VehicleData.create( rootloc+"queryInventory" );
    SpecialsList.init('.specials-widget', 'specials.json?' + tstamp);
});
</pre></body></html>