var getCookie = getCookie || function (cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1);
if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
}
return '';
};
var setCookie = setCookie || function (name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
};
var moovCookieLookup = {"9c9c3b3d-ebfd-4bef-ab0d-7226eb9a6fc8":"default"};
var mwPageData; // this will be used by utag.js
var moovMode = 'default';
var moovCookie = getCookie('moov_') || '';
if (moovCookie) {
moovMode = moovCookieLookup[moovCookie];
}
if (moovMode && document.querySelector('body').getAttribute('mw-build-version')) {
moovMode = moovMode + '-' + document.querySelector('body').getAttribute('mw-build-version');
}
if (document.querySelector('body').classList.contains('mw-error-500')) {
moovMode = 'cookieError';
}
mwPageData = { 'moovwebABTestDim' : moovMode };
var utag_data = {
"brand_current": "CCO",
"brand_entering": ["1001"],
"cellid": "WW51",
"country_code": "US",
"page_language": "en",
"page_name": "Category",
"page_type": "category"
};
$(document).ready(function(){
if(window.espotBrand!=undefined) {
addBrandClassToBody(window.espotBrand);
}
});
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/1800flowers/ww51/prod/utag.js';
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();
window.origWindowName = window.name;
$(document).ready(function() {
$("#flexForm .header span").text("Valentine's Delivery Options");
});
$(document).ready(function() {
// GA Tracking
$('.UsableNetAssistive').on('click', function() {
var usableNetGaAction;
if ($(this).text().trim() === 'Enable Accessibility') {
usableNetGaAction = 'Enable';
} else if ($(this).text().trim() === 'Disable Accessibility') {
usableNetGaAction = 'Disable';
} else {
return console.log('Couldnt set action...');
}
//
ga('fd_mbp.send', 'event', 'UsableNet', usableNetGaAction, utag_data.page_type);
});
})
function fdConsoleLog(msg) {
if(console && console.log && (typeof console.log == 'function')) {
console.log(msg);
}
}
var showSignInWidgetForMs = 0;
var showNewSignInWidget = 'N';
try {
showNewSignInWidget = 'N';
showSignInWidgetForMs = '5000';
showSignInWidgetForMs = parseInt(showSignInWidgetForMs);
if( ! showNewSignInWidget || ( showNewSignInWidget != 'Y' && showNewSignInWidget != 'y' )){
showSignInWidgetForMs = 0;
}
} catch(err) {
fdConsoleLog('Exceptpion occured while showing new signin widget:' + err);
}
try{
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", function() {
if (/iPad/i.test(navigator.userAgent))
$("body").addClass("ipad")
}, false);
}
catch (e){}
MainJS.HomePageURL = 'TopCategoriesDisplay?storeId=21551&catalogId=17302&langId=-1';
MainJS.pageIdentifier = '';
MainJS.FDFaceBookLogon = 'FDFaceBookLogon?langId=-1&storeId=21551&catalogId=17302';
MainJS.isMDMAuthEnabled = 'Y';
MainJS.isSocialABTestingEnabled = 'Y';
if(utag_data.brand_current == "TPF" || utag_data.brand_current == "CCO" || utag_data.brand_current == "18B" || utag_data.brand_current == "SCH") {
jQuery(document).on('click', '.ShippingAddress img', function() {
var phoneTrim = jQuery('#saveAddress input#WC_ShoppingCartAddressEntryForm_FormInput_phone1_1').val();
var trimphone = phoneTrim.trim()
jQuery('#saveAddress input#WC_ShoppingCartAddressEntryForm_FormInput_phone1_1').val(trimphone);
});
if ($('#EXP-BillingColumn').length === 1) {
console.log('express checkout');
if ($("#EXP-BillingColumn #exp-deliveryDateSecId .n-textfieldDelivery").is(":visible")) {
$("#EXP-BillingColumn #exp-deliveryDateSecId .BP-Deliveryhdr").css({
"width": "auto",
"background-color": "#FFF",
"padding": "0",
"margin": "20px 20px 0 20px",
"border": "none"
});
}
$("#EXP-BillingColumn .bubble").each(function() {
if ($(this).text() === "Promotion is successfully applied to the order.") {
$(this).addClass("successful");
}
});
exp_check = {
responsive: function() {
if ($('.BP-ShippingAddresses').length === 1) {
$(".BP-ShippingAddresses").insertBefore($("#BPC-ShippingAddresses"));
if ($("#n-chkPlaceOrderContainer").hasClass("exp-checkout")) {
$("#passRegularRPBtm").css("display", "none");
}
$('Open Address Book ').insertBefore('.BP-ShippingAddresses')
$(".address_button").click(function() {
if ($(this).text() == "Open Address Book") {
$(this).text("Close Address Book");
$(this).next(".BP-ShippingAddresses").show()
} else {
$(this).text("Open Address Book");
$(this).next(".BP-ShippingAddresses").hide()
}
});
}
$(function() {
var $rrordsum = $("#EXP-BillingColumn #exp-summaryColumn"),
$window = $(window),
offset = $rrordsum.offset(),
topPadding = 20;
//$("#EXP-BillingColumn #exp-summaryColumn").css("margin-top",$cartHeightInt)
setTimeout(function() {
$cartHeightInt = $('.active .exp-cart-item-wrap').height();
$("#EXP-BillingColumn #exp-summaryColumn").css("margin-top", $cartHeightInt)
}, 1000)
$window.scroll(function() {
$cartHeight = $('.active .exp-cart-item-wrap').height();
$rrordsum.css('top', $cartHeight);
if ($('.tablet-set').length == 0) {
$("#EXP-BillingColumn #exp-summaryColumn").addClass('tablet-set')
}
if ($window.scrollTop() > offset.top + ($cartHeight - topPadding)) {
$rrordsum.stop().animate({
marginTop: $window.scrollTop() - offset.top + topPadding
});
} else {
$rrordsum.stop().animate({
marginTop: 0 + $cartHeight
});
}
});
});
},
non_responsive: function() {
$("#BP-ShippingAddresses").insertBefore($("#BPC-ShippingAddresses"));
if ($("#n-chkPlaceOrderContainer").hasClass("exp-checkout")) {
$("#passRegularRPBtm").css("display", "none");
}
$(function() {
var $rrordsum = $("#EXP-BillingColumn #exp-summaryColumn"),
$window = $(window),
offset = $rrordsum.offset(),
topPadding = 20;
$window.scroll(function() {
if ($window.scrollTop() > offset.top) {
$rrordsum.stop().animate({
marginTop: $window.scrollTop() - offset.top + topPadding
});
} else {
$rrordsum.stop().animate({
marginTop: 0
});
}
});
});
}
}
$('meta[name="viewport"]').length ? exp_check.responsive() : exp_check.non_responsive();
}
}
googleSignInDataJSON = new Object();
googleSignInDataJSON.googleSigInEnabled = 'Y';
googleSignInDataJSON.gplusClientId = '420182500441-m0t5ei6no0tp9javq3vkjp9lgcvuj28p.apps.googleusercontent.com';
googleSignInDataJSON.gplusstoreId = '21551';
googleSignInDataJSON.gpluscatId = '17302';
window.trackOrderSwitch = 'y';
window.switchForFBConnect = 'Y';
window.newSignInWidget = 'N';
window.authDebug = 'N';
showAndHideGlobalHeaderEspot();
window.mmoLinkEnabled = 'N'; getUser();
MainJS.HeaderUrlJSON = new Object();
MainJS.HeaderUrlJSON.SignInSrc="//cdn1.wolfermans.com/wcsstore/Wolfermans/images/btn_signin_dropdown.png";
MainJS.HeaderUrlJSON.registerURL='/AjaxUserRegistrationForm?new=Y&catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.myAccountURL = '/AjaxLogonForm?MyAccount=Y&catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.trackOrderURL = '/OrderTrackingLogonView?catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.giftHistoryURL = '/AjaxLogonForm?fromLink=giftHistory&catalogId=17302&langId=-1&isGiftHistory=Y&storeId=21551';
MainJS.HeaderUrlJSON.AddressBookViewURL = '/AjaxLogonForm?isAddressBook=Y&catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.myAccountFreshRewardsURL = '/AjaxLogonForm?isFreshRewards=Y&catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.myPassportURL = '/AjaxLogonForm?MyAccount=Y&catalogId=17302&isPrimePassport=Y&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.trackOrderURLReg = '/OrderTrackingSearch?userAction=OrderTrackingByEmail&catalogId=17302&langId=-1&storeId=21551';
MainJS.HeaderUrlJSON.reminderEnabled = 'N';
MainJS.HeaderUrlJSON.ReminderViewURL = '';
MainJS.HeaderUrlJSON.LogonURL = 'https://m.www.wolfermans.com/webapp/wcs/stores/servlet/LogonForm?langId=-1&storeId=21551&catalogId=17302';
MainJS.HeaderUrlJSON.SEOHomePageUrl ='//m.www.wolfermans.com';
MainJS.HeaderUrlJSON.passportLogonURL = '/passport-cookies?isPrimePassportHomePage=Yes';
MainJS.HeaderUrlJSON.AjaxLogonURL = 'https://m.www.wolfermans.com/webapp/wcs/stores/servlet/AjaxLogon?langId=-1&storeId=21551&catalogId=17302';
MainJS.HeaderUrlJSON.OrderItemMoveURL = '/webapp/wcs/stores/servlet/OrderItemMove?langId=-1&storeId=21551&catalogId=17302';
MainJS.HeaderUrlJSON.ShowGiftHistoryURL = '/ShowGiftHistory?catalogId=17302&langId=-1&storeId=21551';
//MainJS.HeaderUrlJSON.trackOrderURL = '/OrderTrackingLogonView?catalogId=17302&langId=-1&storeId=21551';
//MainJS.HeaderUrlJSON.trackOrderURLReg ='/OrderTrackingSearch?userAction=OrderTrackingByEmail&catalogId=17302&langId=-1&storeId=21551';
var silentWebAuth = new auth0.WebAuth({
domain: 'login.celebrations.com',
clientID: 'n1mUYlundYYGkDDbTnsLCzYq1oCOcAww',
responseType: 'id_token token',
audience: 'https://celebrations-prod.auth0.com/api/v2/',
scope: 'openid email profile',
redirectUri: location.protocol+"//"+window.location.hostname+"/webapp/wcs/stores/servlet/"+'SignOn?langId=-1&storeId=21551&catalogId=17302&URL=%2fTopCategoriesDisplay%3fcatalogId%3d17302%26langId%3d-1%26storeId%3d21551',
prompt: 'none'
});
var showSpinner = 'true';
if(typeof showSpinner == 'string' && showSpinner == 'true') {
showSpinner = true;
} else {
showSpinner = false;
}
var crossDomainSilentAuthEnabled = 'true';
if(typeof crossDomainSilentAuthEnabled == 'string' && crossDomainSilentAuthEnabled == 'true') {
crossDomainSilentAuthEnabled = true;
} else {
crossDomainSilentAuthEnabled = false;
}
if(typeof RememberMe != "undefined" && RememberMe.isKeepMeSign() && RememberMe.isRememberedUser()) {
$(function(){
if(showSpinner) {
showSilentAuthSpinner(21551);
}
silentWebAuth.checkSession({}, function(err, result) {
if (err) {
fdConsoleLog("silentAuth checksession err::" + err.error);
if(showSpinner) {
hideSilentAuthSpinner();
}
} else if(result != null) {
silentAuthLogin(result.accessToken, '/AjaxAuth0SignOn?catalogId=17302&langId=-1&storeId=21551&silentAuth=Y&URL=%2FTopCategoriesDisplay%3FcatalogId%3D17302%26langId%3D-1%26storeId%3D21551', showSpinner);
RememberMe.isSilentAuthSuccessful = true;
}
});
});
} else if (crossDomainSilentAuthEnabled && typeof RememberMe != "undefined" && RememberMe.isGuestUser() && ! RememberMe.hasSilentAuthFailedBefore()) {
$(function(){
silentWebAuth.checkSession({}, function(err, result) {
if (err) {
fdConsoleLog("silentAuth checksession err::" + err.error);
RememberMe.setSilentAuthFailed();
} else if(result != null) {
var keepMeSignFromToken = false;
if(showSpinner && RememberMe.isKeepMeSignInToken(result.idToken)) {
keepMeSignFromToken = true;
showSilentAuthSpinner(21551);
}
silentAuthLogin(result.accessToken, '/AjaxAuth0SignOn?catalogId=17302&langId=-1&storeId=21551&silentAuth=Y&URL=%2FTopCategoriesDisplay%3FcatalogId%3D17302%26langId%3D-1%26storeId%3D21551', (showSpinner && keepMeSignFromToken));
RememberMe.isSilentAuthSuccessful = true;
}
});
});
}
function openAuthPopUp(url) {
var popUpUrl=location.protocol+"//"+window.location.hostname+"/webapp/wcs/stores/servlet/"+url;
var w = 1100,h = 750;
var brandName = 'WLF';
if(brandName!=undefined && brandName!=null && brandName!=''){
popUpUrl = popUpUrl+"&brandName="+brandName;
}
var isPrimeCookie = getCookie("isPrimeMember");// check for G only
if(isPrimeCookie!=null && isPrimeCookie!='' && isPrimeCookie!="undefined" && isPrimeCookie=="G"){
popUpUrl += '&passport=Y';
}
popUpUrl = popUpUrl+"&homePageURL="+'www.wolfermans.com';
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;
width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(popUpUrl, 'SignIn', 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)
if(!newWindow || newWindow.closed || typeof newWindow.closed=='undefined'){
//POPUP BLOCKED
popUpUrl+="&popupBlocked=true";
window.location.href = popUpUrl;
}else if (window.focus) {
newWindow.focus();
}
}
$(function() {
$(".drop-sign").click(function(e) {
e.preventDefault();
openAuthPopUp('AuthLogin?langId=-1&storeId=21551&catalogId=17302&isAzureAddressOutage=false');
});
$("#activityId_18f-hdr_signIn-dd-starthere").click(function(e) {
e.preventDefault();
openAuthPopUp('AuthLogin?langId=-1&storeId=21551&catalogId=17302&isAzureAddressOutage=false');
});
$(".drop-link").click(function(e) {
e.preventDefault();
openAuthPopUp('AuthLogin?langId=-1&storeId=21551&catalogId=17302&isAzureAddressOutage=false®ister=Y');
});
$(".reg-cus").click(function(e) {
e.preventDefault();
openAuthPopUp('AuthLogin?langId=-1&storeId=21551&catalogId=17302&isAzureAddressOutage=false');
});
$(".create-acc").click(function(e) {
e.preventDefault();
openAuthPopUp('AuthLogin?langId=-1&storeId=21551&catalogId=17302&isAzureAddressOutage=false®ister=Y');
});
});
MainJS.myPassportURL = '/AjaxLogonForm?MyAccount=Y&catalogId=17302&isPrimePassport=Y&langId=-1&storeId=21551';
hideHeaderImages();
$(document).ready(function(){
updateHeaderLinkUrlsWhenAuth0Enabled();
}); RememberMe.isRememberMeEnabled = true;
if( typeof RememberMe !="undefined" && ! RememberMe.isSilentAuthSuccessful) {
if(RememberMe.isRememberMeEnabled) {
RememberMe.contactIdCookieVal = getCookie("cont.id");
if(RememberMe.isRememberedUser()){
RememberMe.executeOnThisWindow = true;
}
}
}
window.urlVal = '/Logoff?catalogId=17302&langId=-1&origStoreId=21551&storeId=21551&remember=true';
window.facebookDisconnectURL = '/FDFaceBookDisconnect?catalogId=17302&langId=-1&storeId=21551&fbConnect=N'; if((typeof storeId==='undefined' || typeof storeId==='object') && typeof storeID!=='undefined'){var storeId=storeID;}if((typeof catalogId==='undefined' || typeof catalogId==='object') && typeof catalogID!=='undefined'){var catalogId=catalogID;}if(typeof orderId==='undefined'){var orderId='';}
var GHcreateAccount = "/webapp/wcs/stores/servlet/AjaxUserRegistrationForm?langId=-1&storeId="+storeId+"&catalogId="+catalogId+"&new=Y";
var GHtrackOrder = "/webapp/wcs/stores/servlet/OrderTrackingSearch?userAction=OrderTrackingByEmail&catalogId="+catalogId+"&langId=-1&storeId="+storeId+"";
function containsDoubleByte2(target) {
// summary:Checks whether a string contains a double byte character
// target = the string to be checked
//
// Return true if target contains a double byte char; false otherwise
var str = new String(target);
var oneByteMax = 0x007F;
for (var i=0; i < str.length; i++){
chr = str.charCodeAt(i);
if (chr > oneByteMax) {return true;}
}
return false;
}
function isValidEmail2(strEmail){
//summary: A simple function to validate an email address
// It does not allow double byte characters
// strEmail = the email address string to be validated
//
// Return true if the email address is valid; false otherwise
if (containsDoubleByte2(strEmail)){
return false;
}
var re = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i
return strEmail.match(re);
}
function submitOptInForm2(){
var requesterEmail = document.getElementById('EmailOptInHomePage2').value;
if(requesterEmail == 'your@email.com'){
if(document.getElementById('EmailOptInHomePagePopUp') != null && document.getElementById('EmailOptInHomePagePopUp') != 'undefined'){
requesterEmail = document.getElementById('EmailOptInHomePagePopUp').value;
}
else if(document.forms['email'] != null && document.forms['email'] != 'undefined'){
if(document.forms['email'].EmailOptInHomePage2 != null && document.forms['email'].EmailOptInHomePage2 != 'undefined')
requesterEmail = document.forms['email'].EmailOptInHomePage2.value;
}
}
if(requesterEmail=='')
{
alert("Please enter your Email.");
return false;
}
else if(!isValidEmail2(requesterEmail))
{
alert("Please enter a valid Email.");
return false;
}
else if(requesterEmail=='your@email.com')
{
alert("Please enter your Email.");
return false;
}
$.ajax({
type: "POST",
url: "/webapp/wcs/stores/servlet/AjaxEmailOptIn?storeId=10202&catalogId=11102&langId=-1&verifyEmailAddress="+requesterEmail+"&emailAddress="+requesterEmail+"&firstName=&accountwithoutEmailSignUp=true&doEmailOptIn=Y",
cache: false,
async: false,
//error:jqAjaxError,
//timeout: 90000,
dataType: "json",
success: function(html){
document.getElementById("emailsent2").style.display="block";
document.getElementById("greeting2").style.display="none";
if(document.getElementById("survey-invitation") != null && document.getElementById("survey-invitation") != 'undefined')
document.getElementById("survey-invitation").style.display="none";
},
error: function (request, status, error){
}
});
} var fsDomain = "CCO";
if (typeof updateTopNavESpot === "function") {
updateTopNavESpot();
}
// US
function getCookiePop(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
function setCookiePop(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
var expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
var gdpr_v = "US";
// Test country code
var gdpr_v_test = gdpr_v.replace(/[^\w\s]/gi, '').toLowerCase();
if (gdpr_v !== "US" && gdpr_v_test !== "country_code") {
// Test if cookie exists
if (getCookiePop("gdpr_closed") !== "Y") {
var fadeElem = document.getElementById('gdpr_notification');
setTimeout(function () { fadeElem.className += ' fade'; }, 100)
var click_dismiss = document.querySelector('.gdpr--dismiss')
click_dismiss.addEventListener("click", function () {
fadeElem.className = '';
// Set cookie when closed
setCookiePop("gdpr_closed", "Y", "3650")
})
}
}
window.espotBrand = "CCO_";
var freeTrailPassURL = '/JoinFreeTrialPassportRegisterPageView?catalogId=17302&langId=-1&storeId=21551';
//setFreeTrailPassURL();
displayBannerForPartnerCookie("//cdn1.1800flowers.com/wcsstore/Flowers/images/banners/"); window.partnerEspotView = '/PartnerEspotView?catalogId=17302&langId=-1&storeId=21551';
partnerEspotViewCall('fhbc_browse_banner_partner','fhbc_browse_banner','categoryId=3200000022','CCO');
cookieonLoad();
authZeroDataJSON = new Object();
authZeroDataJSON.authClientID = 'n1mUYlundYYGkDDbTnsLCzYq1oCOcAww';
authZeroDataJSON.authDomainName = 'login.celebrations.com';
authZeroDataJSON.signOn = '/SignOn?catalogId=17302&langId=-1&storeId=21551';
authZeroDataJSON.authLogin = '/AuthLogin?catalogId=17302&langId=-1&storeId=21551';
authZeroDataJSON.authZeroAudience = 'https://celebrations-prod.auth0.com/api/v2/'; window.partnerEspotView = '/PartnerEspotView?catalogId=17302&langId=-1&storeId=21551';
var urlParams = "categoryId=3200000022";
cookieLoadForPrime('passRegularBP','passPartnerBP');
if('' == 'Y' && getUserType()=="G"){//hide passport banners
$("#"+'passRegularBP'+"_Div").removeClass("display-block");
$("#"+'passPartnerBP'+"_Div").removeClass("display-block");
$("#"+'passRegularBP'+"_Div").addClass("display-none");
$("#"+'passPartnerBP'+"_Div").addClass("display-none");
}
var gnModalContainer = $('#GN-modal-container').attr('class');
if (gnModalContainer.indexOf('gplaces_gnav') !== -1) {
$('#fdGnavModal div#TB_window').css('cssText', 'width: 800px !important');
$('body.bd-category.bd-responsive.bd-18f div#TB_window').css('cssText', 'margin-left: -450px;');
$('#TB_window').css('cssText', 'width: 800px !important; margin-left: -460px !important;');
} else {
// $('.GN-modal-locfield label').css('cssText', 'display: initial !important');
}
var facetArray = new Array();
var facetBrandArray = new Array();
function filterSelectAll()
{
submit = false;
var categoryPageFilter = document.getElementById("categoryPageFilter")!=null ? document.getElementById("categoryPageFilter").value : '';
var searchPageFilter = document.getElementById("searchPageFilter")!=null ? document.getElementById("searchPageFilter").value : '';
var facetId = '';
try
{
if (facetArray && facetArray.length <= parseInt(facetCount))
{
$('input:checkbox[id^="facet"]').each(function(){
addHidden(document.submitFacet, "facet", $(this).val());
addHidden(document.submitFacet, "facetBrand", $(this).attr('data-brandid'));
});
submit = true;
}
if (submit)
{
if((null != categoryPageFilter && categoryPageFilter == 'Y') || (null != searchPageFilter && searchPageFilter == 'Y'))
{
ajaxFacetSubmit(facetId);
}
else
{
document.submitFacet.submit();
}
}
}
catch(e)
{
; //window.console && console.log(e);
}
}
function filterByFacet(isChecked, value, submit, facetBrand , facetId)
{
var categoryPageFilter = document.getElementById("categoryPageFilter")!=null ? document.getElementById("categoryPageFilter").value : '';
var searchPageFilter = document.getElementById("searchPageFilter")!=null ? document.getElementById("searchPageFilter").value : '';
if (isChecked)
{
facetArray.push(value);
facetBrandArray.push(facetBrand);
var element =document.getElementById(facetId);
if(element != null)
element.classList.add("focusfacet");
}
else
{
// Find and remove item from an array
var i = facetArray.indexOf(value);
if(i != -1)
{
facetArray.splice(i, 1);
facetBrandArray.splice(i, 1);
}
if((null != categoryPageFilter && categoryPageFilter == 'Y') || (null != searchPageFilter && searchPageFilter == 'Y'))
{
var filterValue = $("label[for='"+facetId+"']").html().trim();
if( null != filterValue && filterValue.indexOf("&") != -1){
filterValue = filterValue.replace(/&/g, '&');
}
if( null != filterValue && filterValue.indexOf("'") != -1){
filterValue = filterValue.replace("'", '');
}
if(document.getElementById("activefilters") != null && document.getElementById("activefilters") != undefined && typeof document.getElementById("selectedFilters_"+filterValue) != "undefined"){
setTimeout(function() {
document.getElementById("activefilters").innerHTML = activefilters;
$("div#activefilters [id='selectedFilters_"+filterValue+"']").remove();
activefilters = document.getElementById("activefilters").innerHTML;
}, 1000);
}
$("input[type='hidden'][value='"+value+"']").remove();
var element =document.getElementById(facetId);
if(element != null)
element.classList.remove("focusfacet");
if(document.getElementById("unCheckedFilter") != null && document.getElementById("unCheckedFilter") != undefined){
document.getElementById("unCheckedFilter").value = 'Y';
}
}
}
if (submit)
{
facetSubmit(facetArray, facetBrandArray, facetId);
}
}
function facetSubmit(facets, facetBrands, facetId)
{
var categoryPageFilter = document.getElementById("categoryPageFilter")!=null ? document.getElementById("categoryPageFilter").value : '';
var searchPageFilter = document.getElementById("searchPageFilter")!=null ? document.getElementById("searchPageFilter").value : '';
if (facets)
{
if (facets.length > 0)
{
for (var index = 0; index < facets.length; index++)
{
addHidden(document.submitFacet, "facet", facets[index]);
addHidden(document.submitFacet, "facetBrand", facetBrands[index]);
}
}
else
{
addHidden(document.submitFacet, "selectAll", "true");
}
if((null != categoryPageFilter && categoryPageFilter == 'Y') || (null != searchPageFilter && searchPageFilter == 'Y'))
{
document.getElementById("ajax-loader").style.display = "block";
ajaxFacetSubmit(facetId);
if(document.getElementById("clear_all_filter") != null && document.getElementById("clear_all_filter") != undefined){
document.getElementById("clear_all_filter").style.display = "block";
}
document.getElementById("ajax-loader").style.display = "none";
}
else
{
document.submitFacet.submit();
}
}
}
function addFacetToGNav(facet, facetBrand)
{
try
{
addHidden(document.guidedCollectionForm_1, "facet", facet);
addHidden(document.guidedCollectionForm_1, "facetBrand", facetBrand);
addHidden(document.guidedCollectionForm_2, "facet", facet);
addHidden(document.guidedCollectionForm_2, "facetBrand", facetBrand);
}
catch(e)
{
}
}
$(document).ready(function(){
if(document.getElementById("activefilters")!=null && typeof selectedFacetsList!=null && typeof selectedFacetsList!=undefined && selectedFacetsList!=''){
document.getElementById("activefilters").innerHTML+= selectedFacetsList;
activefilters = document.getElementById("activefilters").innerHTML;
}
function expandSelectedFacets(id){
try {
var selectedFacets= [];
$(".facetContainer #productsFacets").find("input:checked").each(function (i, ob) {
var facetId = $(this).attr("id");
if(selectedFacets.indexOf(facetId) == -1){
selectedFacets.push(facetId);
}
});
if(selectedFacets.length > 0){
selectedFacets.forEach(expandFacet, this);
}
} catch (ex) {
console.warn("FacetNavigation_UI :: expandSelectedFacets : exception occured ==> " + ex.message);
}
}
function expandFacet(id){
try {
$('.facetContainer #productsFacets #'+id).click();
} catch (ex) {
console.warn("FacetNavigation_UI : expandFacet : exception occured ==> " + ex.message);
}
}
});
setRegWidgetSignUpElements('/cookie-gift-baskets','/ProductDisplay?storeId=21551&productId=&urlRequestType=Base&langId=-1&catalogId=17302');
setRegWidgetSignInElements('/cookie-gift-baskets','/ProductDisplay?storeId=21551&productId=&urlRequestType=Base&langId=-1&catalogId=17302','OrderItemMove?langId=-1&storeId=21551&catalogId=17302');
$("div#showRegWidgetSignIn").find("input#logonId").val('');
var processing = new Image();
processing.src = "//cdn3.1800flowers.com/wcsstore/Flowers/images/widget_processing.gif";
var processingError = new Image();
processingError.src = "//cdn3.1800flowers.com/wcsstore/Flowers/images/btn_submit.gif";
var forgotPasswordURL = location.protocol+"//"+window.location.hostname+"/webapp/wcs/stores/servlet/"+ "ResetPasswordForm?langId=-1&storeId=21551&catalogId=17302";
$('#forgotPasswordLink').attr('href', forgotPasswordURL);
removeErrorMessageInSignUpWidget();
showRegwidgetBanner('');
document.getElementById('recentProd').className = document.getElementById('recentProd').className + ' recentProdustDiv';
$(function(){
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}
var promoName, promoVal;
var referral = getCookie('ReferralURL');
if(referral.indexOf('promo=') >= 0){
promoName = referral.split('promo=')[1].split('&')[0];
promoVal = referral.split('pcode=')[1].split('&')[0];
var promoMessage, promoBanner = $('.imoc-promo');
if(promoBanner.length > 0){
var promoText = promoBanner.text().toLowerCase();
if(promoText.indexOf(promoName.toLowerCase())>=0){
console.log(promoName, promoVal);
$('.Products .Product').each(function(){
var finalPrice,discount;
var thisPrice = $(this).find('span[itemprop="price"]').text().trim();
if(thisPrice.indexOf('SALE') < 0){
if(promoVal.indexOf('p') > 0){
discount = parseInt(promoVal.replace('p', ''));
finalPrice = getDiscountedPriceByPercent(thisPrice, discount);
promoMessage = finalPrice + ' with code ' + promoName.toUpperCase();
}else if(promoVal.indexOf('d') > 0){
discount = parseInt(promoVal.replace('d', ''));
finalPrice = getDiscountedPriceByDollars(thisPrice, discount);
promoMessage = finalPrice + ' with code ' + promoName.toUpperCase();
}else if(promoVal == 's'){
promoMessage = 'Use Promo Code : ' + promoName.toUpperCase();
}
$(this).find('.Product__desc').append('' + promoMessage + ' ');
}
});
}
}
}
if($('.imoc-generic').attr('data-promocode') != undefined && $('.imoc-generic').attr('data-promo') != undefined){
promoName = $('.imoc-generic').attr('data-promocode');
promoVal = $('.imoc-generic').attr('data-promo');
$('.Products .Product').each(function(){
var finalPrice,discount;
var thisPrice = $(this).find('span[itemprop="price"]').text().replace('SALE', '').trim();
if(promoVal.indexOf('p') > 0){
discount = parseInt(promoVal.replace('p', ''));
finalPrice = getDiscountedPriceByPercent(thisPrice, discount);
}else if(promoVal.indexOf('d') > 0){
discount = parseInt(promoVal.replace('d', ''));
finalPrice = getDiscountedPriceByDollars(thisPrice, discount);
}
$(this).find('.Product__desc').append('' + finalPrice + ' with code ' + promoName + ' ');
});
}
function getDiscountedPriceByPercent(thisPrice, discount){
var finalPrice;
var discountVal = (100 - discount)/100;
if(thisPrice.indexOf('-') >= 0){
thisPrice = thisPrice.split('-');
priceLeft = discountVal * parseFloat(thisPrice[0].replace('$', ''));
priceRight = discountVal * parseFloat(thisPrice[1].replace('$', ''));
finalPrice = '$'+priceLeft.toFixed(2)+' - $' + priceRight.toFixed(2);
return finalPrice;
}else{
finalPrice = '$'+(discountVal * parseFloat(thisPrice.replace('$', ''))).toFixed(2);
return finalPrice;
}
}
function getDiscountedPriceByDollars(thisPrice, discount){
var finalPrice;
if(thisPrice.indexOf('-') >= 0){
thisPrice = thisPrice.split('-');
priceLeft = parseFloat(thisPrice[0].replace('$', '')) - discount;
priceRight = parseFloat(thisPrice[1].replace('$', '')) - discount;
finalPrice = '$'+priceLeft.toFixed(2)+' - $' + priceRight.toFixed(2);
return finalPrice;
}else{
finalPrice = '$'+(parseFloat(thisPrice.replace('$', '')) - discount).toFixed(2);
return finalPrice;
}
}
});
function replaceTabURLs(params){
try{
var str_array = params.tabURLs.split(',');
var brandTab = '';
var brandTabValue = '';
for(var i = 0; i < str_array.length; i++) {
brandTab = str_array[i].split('=');
if(brandTab[0] !='18F'){
brandTabValue = brandTab[1];
document.getElementById(brandTab[0]).href = '/'+brandTabValue;
if(document.getElementById(brandTab[0]+'_GlobalLogoEspot') != null){
document.getElementById(brandTab[0]+'_GlobalLogoEspot').getElementsByTagName('a')[0].href = '/'+brandTabValue;
}
}else{
document.getElementById(brandTab[0]).href = params.homeURL;
if(document.getElementById(brandTab[0]+'_GlobalLogoEspot') != null){
document.getElementById(brandTab[0]+'_GlobalLogoEspot').getElementsByTagName('a')[0].href = params.homeURL;
}
}
}
}catch (e){
console.warn("Unable to replace Tab URLs.", e);
}
}
$(function() {
$(".scopy").before(" "); $(".scopy").after(" ");
});
var category_data_layer = {
"category_canonical_url": "/cookie-gift-baskets",
"category_id": "3200000022",
"category_identifier": "MBP-CCO-Categories~GiftBaskets",
"category_name": "Cookie Gift Baskets",
"category_sympathy_flag": "",
"product_baseCodes": [
"HDY20_212571",
"HDY20_212581",
"HDY20_212591",
"HDY20_212631",
"HDY20_212641",
"HDY20_212651",
"HDY20_212671",
"HDY20_212681",
"HDY20_212691",
"HDY20_212701",
"HDY20_213461",
"HDY20_213471",
"VDY18_188681",
"SPR18_191651",
"FDY17_180651",
"WS15_146031",
"FAL16_147941",
"FAL16_147901",
"FAL16_147921"
],
"product_brands": [
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012"
],
"product_categories": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"product_ids": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_imp_brands": [
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012",
"1012"
],
"product_imp_categories": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"product_imp_ids": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_imp_list_names": [
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets"
],
"product_imp_list_positions": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"product_imp_names": [
"Buttercream Frosted Flavors Cookie Gift Basket - Medium",
"Buttercream Frosted Flavors Cookie Gift Basket - Large",
"Buttercream Frosted Flavors Cookie Gift Basket - Grand",
"Entertainment Gift Basket - Large",
"Entertainment Gift Basket - Grand",
"Entertainment Gift Basket - Premier",
"Holiday Dessert Gift Basket",
"Holiday Classic Gift Basket",
"Holiday Grand Gift Basket",
"Holiday Premier Gift Basket",
"Happy Hanukkah Bakery Gift Basket",
"Grand Hanukkah Gift Basket",
"Thank You Dessert Baskets",
"Cheryls Classic Cookie Gift Basket",
"Fabulous Day Snack Basket Large",
"Alex's Lemonade Stand Gift Basket",
"Mrs. Beasley's® Elite Basket",
"Mrs. Beasley's® Medium Basket",
"Mrs. Beasley's® Grand Basket"
],
"product_imp_prices": [
"49.99",
"69.99",
"89.99",
"99.99",
"159.99",
"199.99",
"49.99",
"89.99",
"129.99",
"199.99",
"49.99",
"69.99",
"44.99-64.99",
"44.99-64.99",
"59.99",
"49.99",
"199.99",
"49.99",
"89.99"
],
"product_imp_skus": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_imp_variants": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_list_names": [
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets",
"Cookie Gift Baskets"
],
"product_list_positions": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19
],
"product_names": [
"Buttercream Frosted Flavors Cookie Gift Basket - Medium",
"Buttercream Frosted Flavors Cookie Gift Basket - Large",
"Buttercream Frosted Flavors Cookie Gift Basket - Grand",
"Entertainment Gift Basket - Large",
"Entertainment Gift Basket - Grand",
"Entertainment Gift Basket - Premier",
"Holiday Dessert Gift Basket",
"Holiday Classic Gift Basket",
"Holiday Grand Gift Basket",
"Holiday Premier Gift Basket",
"Happy Hanukkah Bakery Gift Basket",
"Grand Hanukkah Gift Basket",
"Thank You Dessert Baskets",
"Cheryls Classic Cookie Gift Basket",
"Fabulous Day Snack Basket Large",
"Alex's Lemonade Stand Gift Basket",
"Mrs. Beasley's® Elite Basket",
"Mrs. Beasley's® Medium Basket",
"Mrs. Beasley's® Grand Basket"
],
"product_prices": [
"49.99",
"69.99",
"89.99",
"99.99",
"159.99",
"199.99",
"49.99",
"89.99",
"129.99",
"199.99",
"49.99",
"69.99",
"44.99-64.99",
"44.99-64.99",
"59.99",
"49.99",
"199.99",
"49.99",
"89.99"
],
"product_sku_ids": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_skus": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
],
"product_variants": [
"cco_HDY20_212571",
"cco_HDY20_212581",
"cco_HDY20_212591",
"cco_HDY20_212631",
"cco_HDY20_212641",
"cco_HDY20_212651",
"cco_HDY20_212671",
"cco_HDY20_212681",
"cco_HDY20_212691",
"cco_HDY20_212701",
"cco_HDY20_213461",
"cco_HDY20_213471",
"cco_VDY18_188681",
"cco_SPR18_191651",
"cco_FDY17_180651",
"cco_WS15_146031",
"cco_FAL16_147941",
"cco_FAL16_147901",
"cco_FAL16_147921"
]
};
$(function(){
//Get year and populate the copyright date
var d = new Date();
var currentYear = d.getFullYear();
$('.copyrightInfo span').html(currentYear);
});
jQuery('#footer_carousel').jcarousel();
$(".subproductimg").click(function() {
window.location = $(this).find("a").first().attr("href");
})
function submitOptInFormNew(){
var requesterEmail = document.getElementById('EmailOptInHomePageNew').value;
if(requesterEmail == 'your@email.com'){
if(document.getElementById('EmailOptInHomePagePopUpNew') != null && document.getElementById('EmailOptInHomePagePopUpNew') != 'undefined'){
requesterEmail = document.getElementById('EmailOptInHomePagePopUpNew').value;
}
else if(document.forms['email'] != null && document.forms['email'] != 'undefined'){
if(document.forms['email'].EmailOptInHomePageNew != null && document.forms['email'].EmailOptInHomePageNew != 'undefined')
requesterEmail = document.forms['email'].EmailOptInHomePageNew.value;
}
}
if(requesterEmail=='')
{
alert("Please enter your Email.");
return false;
}
else if(!isValidEmail(requesterEmail))
{
alert("Please enter a valid Email.");
return false;
}
else if(requesterEmail=='your@email.com')
{
alert("Please enter your Email.");
return false;
}
$.ajax({
type: "POST",
url: "/webapp/wcs/stores/servlet/AjaxEmailOptIn?storeId=10202&catalogId=11102&langId=-1&verifyEmailAddress="+requesterEmail+"&emailAddress="+requesterEmail+"&firstName=&accountwithoutEmailSignUp=true&doEmailOptIn=Y",
cache: false,
async: false,
//error:jqAjaxError,
//timeout: 90000,
dataType: "json",
success: function(html){
$('#d17_img').hide();
$('#d17_input').hide();
$('#d17-survey-succcess').show();
document.getElementById("emailsentNew").style.display="block";
document.getElementById("greetingNew").style.display="none";
if(document.getElementById("survey-invitation") != null && document.getElementById("survey-invitation") != 'undefined')
document.getElementById("survey-invitation").style.display="none";
try {
if(analyticsInitialized() && typeof FD4.analytics.trackEmailSignUp !== "undefined") {
FD4.analytics.trackEmailSignUp();
}
}
catch(ex) {
console.error("Analytics: Failed to track email sign up.", ex);
}
},
error: function (request, status, error){
}
});
}
$(document).ready(function() {
var bannerIndex = 1;
jQuery('.section_9a .section_9a_box_2').each(function(i, j) {
$(j).attr('data-ga-action', 'Bottom Banner ' + bannerIndex + ' Click');
var gaAction = jQuery(j).attr('data-ga-action');
var altLabel= jQuery(j).find('a').attr('title');
var achnor= jQuery(j).find('a');
$(achnor).on('click', function(e) {
if (typeof ga == 'function') {
ga('fd_mbp.send', 'event', 'CCO Homepage', gaAction, altLabel);
}
});
bannerIndex++;
});
jQuery('.footer_social_section .social_icons_link').each(function(i, j) {
$(j).attr('data-ga-action', 'Social icons - Click');
var gaAction = jQuery(j).attr('data-ga-action');
var altLabel= jQuery(j).find('img').attr('alt');
var achnor= jQuery(j).find('a');
$(achnor).on('click', function(e) {
if (typeof ga == 'function') {
ga('fd_mbp.send', 'event', 'CCO Homepage', gaAction, altLabel);
}
});
});
jQuery('.nh-footer .col-info').each(function(i, j) {
$('.footer_main_section').attr('data-ga-action', 'Footer Menu - Click');
var gaAction = $('.footer_main_section').attr('data-ga-action');
var title= jQuery(j).find('a').attr('title');
var achnor= jQuery(j).find('a');
$(achnor).on('click', function(e) {
if (typeof ga == 'function') {
ga('fd_mbp.send', 'event', 'CCO Homepage', gaAction, title);
}
});
});
var signupLabel = $('#EmailOptInHomePageNew').attr('title');
$('#EmailOptInHomePageNew').attr('data-ga-action', 'Sign Up');
var signupAction = $('#EmailOptInHomePageNew').attr('data-ga-action');
$('.footer_signup_form .emailSignup .btn').on('click', function(e) {
if (typeof ga == 'function') {
ga('fd_mbp.send', 'event', 'CCO Homepage', signupAction, signupLabel);
}
});
});
$(document).ready(function () {
$('.skip').click(function (event) {
var skipTo = '#' + this.href.split('#')[1];
$(skipTo).attr('tabindex', -1).on('blur focusout', function () {
$(this).removeAttr('tabindex');
}).focus();
});
$('img:not([alt])').attr('alt', '');
});
checkAndHidePassport(100);
initFlowersService('category');
$(document).ready(function() {
displayFAGFDate();
var catDescName = "Cookie Gift Baskets";
var showGNavModel = getCookie("showGNavModel");
var cellId=getCookie("cellid");cellId=cellId==undefined||cellId==null?"":cellId;
var cmFlag = document.getElementById("cmFlag").value;
if(cmFlag =='' || cmFlag =='Y'){
if($( "div#TB_window" ).length && showGNavModel !=null && undefined != showGNavModel && showGNavModel=='Y'){
cmCreatePageviewTag('CCO : COLLECTION-GNAV : '+catDescName+' (MBP-CCO-Categories~GiftBaskets)', 'CCO : MBP-CCO-Categories~GiftBaskets', null, null, '21551', ' -_- -_- -_- -_- -_- -_-'+cellId);
}else{
var gnavFlag='';gnavFlag=gnavFlag==''?' ':gnavFlag;
var gnavInteraction='';gnavInteraction=gnavInteraction==''?' ':gnavInteraction;
cmCreatePageviewTag('CCO : COLLECTION : '+catDescName+' (MBP-CCO-Categories~GiftBaskets)', 'CCO : MBP-CCO-Categories~GiftBaskets', '', null, '21551', gnavFlag+'-_-'+gnavInteraction+'-_- -_- -_- -_- -_-'+cellId);
}
}
});
setcm_sp('');
if(getCookie("FuneralHomeBannerContext")=='true'){
displayBanner();
}
setUpNaturalSearchCookie(); loadJSAsync('//cdn2.wolfermans.com/wcsstore/RAPIDStorefrontAssetStore/ww51/AJAXUserInterface/javascript/Lazy.js');