| Line 78... |
Line 78... |
| 78 |
$('#store-address-header-text').html(" Select a pickup point (<b>" + count + "</b> available)");
|
78 |
$('#store-address-header-text').html(" Select a pickup point (<b>" + count + "</b> available)");
|
| 79 |
};
|
79 |
};
|
| 80 |
|
80 |
|
| 81 |
$("#zone-selector").change(showSpecificStores);
|
81 |
$("#zone-selector").change(showSpecificStores);
|
| 82 |
|
82 |
|
| 83 |
$(".unselected-tab").live('click', function() {
|
83 |
changePickupType = function(pickupTypeContainer){
|
| - |
|
84 |
$('div.deliveryopts > div').css("font-weight","normal");
|
| - |
|
85 |
pickupTypeContainer.parent().css("font-weight","bold");
|
| 84 |
var tabToBeSelected = $(this).attr('id');
|
86 |
var value = pickupTypeContainer.val();
|
| 85 |
var deliveryType = "In-Store Pickup";
|
87 |
var deliveryType = "In-Store Pickup";
|
| 86 |
if(tabToBeSelected == 'tab-left') {
|
88 |
if(value == 'myLocation') {
|
| 87 |
$('#inStoreLocationMsg').addClass('invisibleDiv');
|
89 |
$('#inStoreLocationMsg').addClass('invisibleDiv');
|
| 88 |
$("#tabSelector").val("myLocation");
|
- |
|
| 89 |
$('#tabSelectorForAddAddressForm').val('myLocation');
|
90 |
$('#tabSelectorForAddAddressForm').val('myLocation');
|
| 90 |
$('#newAddressFormHeading').text("Enter the address where you want the items to be delivered");
|
91 |
$('#newAddressFormHeading').text("Enter the address where you want the items to be delivered");
|
| 91 |
deliveryType = "Deliver to Address";
|
92 |
deliveryType = "Deliver to Address";
|
| 92 |
} else {
|
93 |
} else {
|
| 93 |
$('#inStoreLocationMsg').removeClass('invisibleDiv');
|
94 |
$('#inStoreLocationMsg').removeClass('invisibleDiv');
|
| 94 |
$("#tabSelector").val("HotSpot");
|
- |
|
| 95 |
$('#tabSelectorForAddAddressForm').val('HotSpot');
|
95 |
$('#tabSelectorForAddAddressForm').val('HotSpot');
|
| 96 |
$('#newAddressFormHeading').text("Enter the address which you want printed on the bill");
|
96 |
$('#newAddressFormHeading').text("Enter the address which you want printed on the bill");
|
| 97 |
}
|
97 |
}
|
| - |
|
98 |
var hiddenPane = $('#main-right-container').find('.hidden-div');
|
| - |
|
99 |
$('#main-right-container').find('.not-hidden-div').addClass('hidden-div').removeClass('not-hidden-div');
|
| - |
|
100 |
$(hiddenPane).removeClass('hidden-div').addClass('not-hidden-div');
|
| 98 |
trackEventWithGA('DeliveryType', deliveryType);
|
101 |
trackEventWithGA('DeliveryType', deliveryType);
|
| - |
|
102 |
};
|
| - |
|
103 |
|
| 99 |
$(this).removeClass('unselected-tab').addClass('selected-tab');
|
104 |
$('div.deliveryopts > div').find('input').change(function(e){
|
| - |
|
105 |
changePickupType($(this).parent());
|
| - |
|
106 |
});
|
| - |
|
107 |
|
| 100 |
$(this).siblings().removeClass('selected-tab').addClass('unselected-tab');
|
108 |
$('div.deliveryopts > div').live('click', function() {
|
| 101 |
var hiddenPane = $(this).parent().siblings('.hidden-div');
|
109 |
var inputSelected = $(this).find('input');
|
| 102 |
$(this).parent().siblings().addClass('hidden-div');
|
110 |
if(!inputSelected.is(":checked")){
|
| 103 |
$(hiddenPane).removeClass('hidden-div');
|
111 |
inputSelected.attr("checked", true);
|
| - |
|
112 |
changePickupType(inputSelected);
|
| - |
|
113 |
}
|
| 104 |
});
|
114 |
});
|
| 105 |
|
115 |
|
| 106 |
$('.shipping-page-addresses .button-address-select').click(function(){
|
116 |
$('.shipping-page-addresses .button-address-select').click(function(){
|
| 107 |
var addressId = $(this).attr('id').split('_')[1];
|
117 |
var addressId = $(this).attr('id').split('_')[1];
|
| 108 |
$('#formChangeAddressTo_' + addressId).submit();
|
118 |
$('#formChangeAddressTo_' + addressId).submit();
|