'].join('');
}
function handleError(){
$('#gui-modal-product-inventory-location-wrapper').show();
$('#gui-modal-product-inventory-location-content').html('');
}
// Get product inventory location information
function inventoryOnClick() {
$.getJSON('https://www.spokesmancycles.com/product-inventory/?id=79141959', function (response) {
if(!response || !response.productInventory || (response.productInventory.locations && !response.productInventory.locations.length)){
handleError();
return;
}
var locations = response.productInventory.locations || [];
var rows = locations.map(function(item, index) {
return createLocationRow(item, index === 0)
});
$('#gui-modal-product-inventory-location-content').html(rows);
var dateObj = new Date();
var hours = dateObj.getHours() ',
'', 'Last updated:', ' ',
'Today at ', hours, ':', minutes,
'
',
'
Online and in-store prices may differ
'].join('');
$('#gui-modal-product-inventory-location-footer').html(footerContent);
$('#gui-modal-product-inventory-location-wrapper').show();
}).fail(handleError);
}
$('#productLocationInventory').click(inventoryOnClick);
// When the user clicks on 'Close' in the modal, close it
$('#gui-modal-product-inventory-location-close').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
// When the user clicks anywhere outside of the modal, close it
$('.gui-modal-product-inventory-location-background').click(function(){
$('#gui-modal-product-inventory-location-wrapper').hide();
});
})();
Smooth, fast rolling tread with water evacuating grooves and raised, textured shoulder blocks
Provides unrivaled grip in wet road conditions
Alternating, slightly raised shoulders grip well even over loose debris
Reflective sidewall striping keeps you seen and safe on your early morning or late night commute
Magnitude III level puncture protection - a 60x60 TPI Nylon layer beneath the tread surface