Bridal Party Gifts


>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new t(“‘btoa’ failed: The string to be encoded contains characters outside of the Latin1 range.”);o=o>(-2*i&6)):0)a=e.indexOf(a);return d})}(); function simpleXHR( params, callback ) { ;(function(){ var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(){ if( xhr.readyState == 4 ){ var returnObj = { ‘error’: null, ‘result’: null } if (xhr.status === 200) { returnObj.result = xhr.responseText; callback( returnObj ); } else{ returnObj.error = true; callback( returnObj ) } } }; xhr.open( params.type, params.url); xhr.send(); })(); } ]]> 4000 ){ /* 4096 – buffer.. too much data, decide later what to do, probably wont ever happen */ } Cookies.set( visitorCookieName, visitorDataString, { ‘path’: ‘/’, ‘expires’: 30 } ); } /* COOKIE BALL IS WHEN YOU NEED TO SET COOKIE DATA ON ONE PAGE THEN ON THE NEXT PAGE LOAD YOU EXECUTE BASED ON THAT INFO */ var cookieBall = {}; cookieBall.set = function( params ){ syncData(); if( typeof visitorData.cookieEvents == ‘undefined’ ){ visitorData.cookieEvents = []; } visitorData.cookieEvents.push( params ); setCookie(); }; public.setCookieBall = cookieBall.set; cookieBall.play = function(){ syncData(); if( typeof visitorData.cookieEvents != ‘undefined’ && visitorData.cookieEvents.length != 0 ){ for( var x = 0; x < visitorData.cookieEvents.length; x++ ){ bcgaw.event( visitorData.cookieEvents[x] ); } visitorData.cookieEvents.length = 0; setCookie(); } } var bcgaw = {}; bcgaw.customVar = function( params ){ /* pass in an object with a form like the gap var */ // console.log('bcgaw.customVar', params); var gap = { 'slot': 1, /* slot in customvar, 1-5, custom vars conflict on the same slot */ 'name': 'GenericSplitTest', 'value': 'variant-generictest', 'cookieLevel': 1 /* 1-3, visitor-session-page, respectively */ } /* do we want parameter checking? dunno if( typeof params.slot != 'Number' || !Number.isInteger( params.slot ) ){ return { 'err': 'slot must be an integer', 'result': null }; } if( typeof params.cookieLevel != 'Number' || !Number.isInteger( params.cookieLevel ) ){ return { 'err': 'cookie level must be an integer', 'result': null }; } */ for( var x in gap ){ if( typeof params[x] != 'undefined' ){ gap[x] = params[x]; } } if( gap.name == 'GenericSplitTest' || gap.value == 'variant-generictest' ){ return { 'err': 'you should change the data', 'result': null } }; //_gaq.push(['_setCustomVar', gap.slot, gap.name, gap.value, gap.cookieLevel]); if(typeof ga !== 'undefined') { ga('gtm1.set', 'dimension3', gap.value); } //hard-coded to use dimension index 3 return { 'err': null, 'result': true }; } bcgaw.event = function( params ){ // console.log('bcgaw.event', params); var gap = { 'category': 'GenericEvent', 'action': 'DidTheThing', 'optionLabel': undefined, /* string, undefined if youre not interested at this level of data */ 'optionValue': undefined, /* int, undefined if youre not interested at this level of data */ 'eventAffectsBounceRate': false /* inverse is passed to trackevent.. wording the inverse is weird as a var name */ } for( var x in gap ){ if( typeof params[x] != 'undefined' ){ gap[x] = params[x]; } } if( gap.category == 'GenericEvent' || gap.action == 'DidTheThing' ){ return { 'err': 'you should change the data', 'result': null }; } //_gaq.push(['_trackEvent', gap.category, gap.action, gap.optionLabel, gap.optionValue, !gap.eventAffectsBounceRate]) if(typeof ga !== 'undefined') { ga('gtm1.send', 'event', gap.category, gap.action, gap.optionLabel, gap.optionValue, {'nonInteraction': (!gap.eventAffectsBounceRate ? 1 : 0)}); } return { 'err': null, 'result': true }; }; public.gaEvent = bcgaw.event; var splitHelpers = {}; splitHelpers.split = function( howManyWays ){ var bucketSize = 100000; var lotSize = howManyWays * bucketSize; if( typeof howManyWays == 'undefined' ){ howManyWays = 2; } var randomNumber = Math.floor(Math.random()*lotSize) + 1; /* 1 to 10000 */ var splitTestValue; for( var x = 0; x < howManyWays; x++ ){ if( randomNumber <= bucketSize * (x+1) ){ splitTestValue = x; break; } } if( typeof splitTestValue == 'undefined' ){ splitTestValue = howManyWays - 1; } return splitTestValue; }; public.split = splitHelpers.split; var bcgawTests = {}; bcgawTests.active = []; bcgawTests.keepAlive = function( name ){ var fire = true; for( var x = 0; x < bcgawTests.active.length; x++ ){ if( name == bcgawTests.active[x].name ){ fire = false; } } if( fire ){ bcgawTests.active.push( { 'name': name } ); } /* no value here */ }; public.gaKeepAlive = bcgawTests.keepAlive; /* register tests before the cleanup is fired */ /* returns true = control(A), false = variant(B) */ bcgawTests.register = function( params ){ var exampleParams = { "slot": 1, "name": "ProductFormTiles", "version": 1, /* appended to name in case we need to restart the test */ "valueA": "control-regular", "valueB": "variant-tiles", "cookieLevel": 1, "force": false /* set to true if you want to reset the AB split */ }; syncData(); if( typeof visitorData.tests == 'undefined' ){ visitorData.tests = []; } var newTest = true; var foundIndex = 0; var isActive = false; for( var x = 0; x < bcgawTests.active.length; x++ ){ if( bcgawTests.active[x].name == params.name ){ isActive = true; } } if( !isActive ){ bcgawTests.active.push( params ); } for( var x = 0; x < visitorData.tests.length; x++ ){ if( visitorData.tests[x].name == params.name ){ newTest = false; foundIndex = x; } } /* get AB value true or false */ var splitTestValue; if( newTest || params.force ){ if( Math.floor(Math.random()*2) ){ splitTestValue = true; } else{ splitTestValue = false; } } else{ splitTestValue = visitorData.tests[foundIndex].value; } /* register test in cookie object */ if( newTest ){ visitorData.tests.push({ 'name':params.name, 'value': splitTestValue }); } else { visitorData.tests[ foundIndex ] = { 'name':params.name, 'value': splitTestValue }; } /* set custom var */ if( splitTestValue ){ var gaValidation = bcgaw.customVar({ 'slot': params.slot, 'name': params.name + '_V' + params.version, 'value': params.valueA, 'cookieLevel': params.cookieLevel }); } else{ var gaValidation = bcgaw.customVar({ 'slot': params.slot, 'name': params.name + '_V' + params.version, 'value': params.valueB, 'cookieLevel': params.cookieLevel }); } /* console.log( gaValidation ); */ setCookie(); return splitTestValue; }; public.gaAB = bcgawTests.register; bcgawTests.getActive = function(){ syncData(); return bcgawTests.active; }; public.bcgawTests = bcgawTests.getActive; bcgawTests.modifyTest = function( name, value ){ syncData(); var dataChanged = false; if( typeof visitorData.tests == 'undefined' ){ return undefined; } for( var x = 0; x < visitorData.tests.length; x++ ){ if( visitorData.tests[x].name == name ){ visitorData.tests[x].value = value; dataChanged = true; break; } } if( dataChanged ){ setCookie(); } }; public.gaTestModify = bcgawTests.modifyTest; bcgawTests.getValue = function( name ){ syncData(); if( typeof visitorData.tests == 'undefined' ){ return undefined; } for( var x = 0; x < visitorData.tests.length; x++ ){ if( visitorData.tests[x].name == name ){ return visitorData.tests[x].value; } } return undefined; }; public.gaGetTestValue = bcgawTests.getValue; bcgawTests.cleanup = function(){ syncData(); if( typeof visitorData.tests == 'undefined' ){ return undefined; } var deleteIndexes = []; for( var y = 0; y < visitorData.tests.length; y++ ){ var found = false; for( var x = 0; x < bcgawTests.active.length; x++ ){ if( bcgawTests.active[x].name == visitorData.tests[y].name ){ found = true; break; } } if( !found ){ deleteIndexes.unshift( y ) } } for( var x = 0; x Bridal Party Gifts | Wedding Party Gifts | Unique Bridesmaids Gifts ‘; } window.universal_variable.sitewide_offer = { code: obj.json.promos[0].code, header: obj.json.header, offer: uv_offer } } /* process promo for display */ var promoJqs = $( obj.html ); var promoMobileJqs = promoJqs.clone(); promoJqs.addClass(‘hidden-xs’); promoMobileJqs.addClass(‘hidden-sm hidden-md hidden-lg’); $(promoMobileJqs).attr(‘id’, promoMobileJqs.attr(‘id’) + ‘_mobile’ ).css(‘line-height’, ’18px’); $(promoMobileJqs).find(‘.promo_header_main’).css({ ‘display’: ‘block’, ‘text-align’:’left’, ‘font-size’:’13px’ }); $(promoMobileJqs).find(‘.promo_header_sub’).css({ ‘float’: ‘left’, ‘font-weight’: ‘normal’, ‘font-size’:’13px’ }); $(promoMobileJqs).find(‘.promo_header_details’).hide(); $(promoMobileJqs).append(‘Get the Deal’); $(promoMobileJqs).append(‘]]>’); if(obj.displayCountryFlag) { $(promoMobileJqs).find(‘.promo_header_main’).append(‘ We Ship Worldwide ‘); } $(‘.bc-promo-popup’).children(‘.promo-bar’).append( promoJqs ); $(‘.bc-promo-popup’).children(‘.promo-bar’).append( promoMobileJqs ); /* Promo Gate Test Code Start */ var _TODOMOBILE = $(‘.bc-promo-popup’).find(‘#promo_header_mobile’).is(‘:visible’); // console.group(‘Promo Gate’); if(_TODOMOBILE) { var visitorData = visitorStorage.getData(); if( typeof visitorData.mpg != ‘undefined’ && visitorData.mpg ){ mobilePromoGateCleared = true; } if( mobilePromoGateCleared === false ){ $(‘.bc-promo-popup’).find(‘.promo_header_sub’).hide(); $(‘.bc-promo-popup’).find(‘.promo_header_button’).css(‘float’, ‘left’) } } else { if(document.cookie.indexOf(‘promoGateTest’) != -1) { // IF DESKTOP: cookie exists, so remove it since it’s no screen view // console.log(‘remove-cookie-non-mobile’); document.cookie = “promoGateTest=; expires=Thu, 01 Jan 1970 00:00:00 GMT”; if(ga) ga(‘gtm1.set’, ‘dimension4’, ‘promo-gate-test-removed’); if(ga) ga(‘gtm1.send’, ‘event’, ‘PromoGateTestV2’, ‘promo-gate-test-removed’, undefined, undefined, {‘nonInteraction’: 1}); } } // console.groupEnd(); /* Promo Gate Test Code End */ var override = $(‘#promo_header’).data(‘override’); if(override) { $(‘.bc-promo-popup’).attr(‘href’, override); } if(obj.displayCountryFlag) { $(‘.promo_header_flag’).html(‘‘); } /* Countdown Clock Start */ if(obj.endOfDay) { var ctCountdownDate = new Date(obj.endOfDay).getTime(); var ctNow = new Date().getTime(); var ctDistance = ctCountdownDate – ctNow; var ctDistanceHours = Math.floor((ctDistance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); if(ctDistanceHours 0) { timeString += hours + “h “; } if(minutes > 0) { if(hours > 0) { timeString += minutes + “m ” + seconds + “s”; } else { timeString += minutes + ” minutes, ” + seconds + ” seconds”; } } else { timeString += seconds + ” seconds”; } // Output the result in an element with id=”demo” if (distance > 0 && hours > 0) { $(“.promo_header_date”).html(‘Ends Tonight in ‘ + timeString); } else if (distance > 0 && hours 10) { clearInterval(ctFunctionX); $(“.promo_header_date”).html(‘Has Ended’); } }, 1000); } } /* Countdown Clock End */ }); $(‘a.bc-promo-popup’).click(function(e) { e.preventDefault(); var url = $(this).attr(‘href’); var currentDevice = ‘desktop’; if( $(this).find(‘#promo_header_mobile:visible’).length ){ currentDevice = ‘mobile’; } bc.loadingIcon.show(); var el = $(‘ $(‘.lazyload’).each( function(){ var sizes = $(this).attr(‘data-srcset’).split(‘,’); for( var x = 0; x 1 ){ var width = $.trim(urlAndWidth[1]); } if( width && parseInt( width.replace(‘w’, ”) ) >= parseInt( $(this).parent().width() ) ){ $(this).attr( ‘src’, url ); break; } else if( width == null ){ $(this).attr( ‘src’, url ); break; } } });
Source

Leave a Reply

Your email address will not be published. Required fields are marked *