/* Minification failed. Returning unminified contents. (173,27-28): run-time error JS1195: Expected expression: > (175,10-11): run-time error JS1195: Expected expression: ) (179,7-12): run-time error JS1006: Expected ')': catch (181,5-6): run-time error JS1002: Syntax error: } (184,31-32): run-time error JS1004: Expected ';': { */ (function () { 'use strict'; function trackConversion(value) { return function clickHandler() { BV.pixel.trackConversion({ type: 'WhereToBuy', label: 'BuyOnlinePage', value: value }); } } $(document).ready(function () { var isProductPage = $('.RBStarterKitProductPage').length > 0; var isBazaarVoiceEnabled = typeof BV !== 'undefined'; if (!isProductPage || !isBazaarVoiceEnabled) { return; } var productId = $('[itemprop=gtin14]').text(); var buyNowButton = $('.sk-buy-now-btn--locate'); buyNowButton.on('click', trackConversion(productId)) }); })(); (function () { 'use strict'; var utils = { mapObject: function mapObject(object, mapFn) { return Object.keys(object).reduce(function (result, key) { result[key] = mapFn(object[key]) return result }, {}) }, parseContent: function parseContent(content) { return typeof content === 'string' ? content.trim() : content; }, getOgUrlMetaTag: function getOgUrlMetaTag() { return $('meta').filter(function (id, metatag) { return $(metatag).attr('property') === 'og:url'; }); } } function getCategoryName(listItem) { var categoryName = $(listItem).text(); return { Name: utils.parseContent(categoryName) } } function getCategoryPath() { var $breadcrumbs = $('[itemprop=breadcrumb]'); if (!$breadcrumbs) { return; } return $breadcrumbs.find('li').toArray().map(getCategoryName); } function getProduct(brandName) { var id = $('[itemprop=gtin14]').text(); var pageUrl = utils.getOgUrlMetaTag().attr('content'); var imageUrl = $('[itemprop=image]').eq(0).attr('href'); return { brandName: brandName, productId: id, eans: [id], productName: $('.sk-product-header [itemprop=name]').text(), productDescription: $('[itemprop=description]').text(), productImageURL: encodeURI(imageUrl), productPageURL: encodeURI(pageUrl), categoryPath: getCategoryPath() }; } function getCatalogData(brandName) { try { var product = getProduct(brandName); return { catalogData: { locale: $('html').attr('lang').replace('-', '_'), catalogProducts: [ utils.mapObject(product, utils.parseContent) ] } } } catch (e) { console.error(e); } } $(document).ready(function () { var BRANDNAME = 'veet'; var isProductPage = $('.RBStarterKitProductPage').length > 0; var isBazaarVoiceEnabled = typeof BV !== 'undefined'; if (!isProductPage || !isBazaarVoiceEnabled) { return; } window.bvDCC = getCatalogData(BRANDNAME); window.bvCallback = function (BV) { BV.pixel.trackEvent('CatalogUpdate', { type: 'Product', locale: window.bvDCC.catalogData.locale, catalogProducts: window.bvDCC.catalogData.catalogProducts }); }; }); })(); (function () { function loadScript(url, onScriptLoad) { var scriptTag = document.createElement('script'); scriptTag.src = url; scriptTag.onload = onScriptLoad; var body = document.getElementsByTagName('body')[0]; body.appendChild(scriptTag); } function openReviewModal(options) { try { $BV.ui('rr', 'submit_generic', options); } catch (error) { console.error('bvapi.js script is not loaded'); } } function onBvScriptLoad() { $('.js-open-bv-review-modal').on('click', openReviewModal); } $(document).ready(function () { var isHomepage = $('.RBStarterKitHomePage').length; var isAustralianMarket = $('.sk-country-au').length; if (!isAustralianMarket || !isHomepage) { return; } var BVAPI_SCRIPT_URL = 'https://display.ugc.bazaarvoice.com/bvstaging/static/veet-au/main_site/en_AU/bvapi.js'; loadScript(BVAPI_SCRIPT_URL, onBvScriptLoad); }); })(); (function () { 'use strict'; $(document).ready(function () { var isProductPage = $('.RBStarterKitProductPage').length > 0; var isBazaarVoiceEnabled = typeof BV !== 'undefined'; if (!isProductPage || !isBazaarVoiceEnabled) { return; } try { var canonicalUrl = $('link[rel=canonical]').attr('href'); var schemaId = canonicalUrl || window.location.href; var productSchemaContainer = $('[itemtype="http://schema.org/Product"]'); var jsonLdScript = $('[type="application/ld+json"]'); var jsonLd = JSON.parse(jsonLdScript.html()); productSchemaContainer .removeAttr('itemscope itemtype') .find('[itemprop]') .each((id, item) => { $(item).removeAttr('itemprop'); }); jsonLd['@id'] = schemaId; jsonLdScript.html(JSON.stringify(jsonLd)); } catch (e) { console.log(e); } }); })(); function handleReviewsClick() { $('#BVRRSummaryContainer').on('click', function(e) { e.preventDefault(); $('#bazaar-voice').collapse('show'); }); } function moveSummaryContainer() { var $bvSummaryContainer = $('#BVRRSummaryContainer'); var $bvTargetSummaryContainer = $('.sk-product-enhanced-detail'); $bvTargetSummaryContainer.prepend($bvSummaryContainer); } $(document).ready(function () { moveSummaryContainer(); handleReviewsClick(); }); $(document).ready(function() { var d = $('div.checkbox').add($('div.form-group > div')), l = d.children('label'), c = $('input:checkbox'), a = $('label > a'); d.find(l).each(function() { $(this).children('input').prependTo($(this).parent(d)); }); d.find(c).each(function() { name = $(this).attr('name'); $(this).attr('id', name); $(this).next('label').attr('for', name); }); }); $(document).ready(function() { var pageTitle = $('head title').text().trim().replace(/'/g, ""); if($('body').hasClass('RBStarterKitProductPage')) { var productName = $('.sk-product-header h1').text().trim().replace(/'/g, ""); $('head').prepend(""); } else if($('body').hasClass('RBStarterKitProductListPage')) { var productList = []; var query = $('.sk-product-list-item-title'); query.each(function() { var product = $(this).text().trim().replace(/'/g, ""); product = "'" + product + "'"; productList.push(product); }); $('head').prepend(""); } else { $('head').prepend(""); } }); 'use strict'; var formDepilate = false; function checkImages() { var nonCrop = $('.no-crop-img img'); if (nonCrop.length > 0){ changeImgSrc(nonCrop); } setTimeout(checkImages, 500); } function changeImgSrc(images) { for (var i = 0; i < images.length; i += 1) { var img = images.eq(i); var imgSrc = img.attr('src'); if (imgSrc === undefined) { setTimeout(function() { changeImgSrc(images); }, 500); break; } else { img.attr('src', imgSrc.split('?')[0]); } } } function handleForm() { var form = $('#cdc-form'); form.on('submit', function() { hideSteps(); }); } function hideSteps() { var thankYou = $('.cdc-form-thank-you-group'); if (thankYou.hasClass('hidden')) { setTimeout(hideSteps, 100); } else { formDepilate.addClass('thank-you-hide'); } } function fileButtonStyling() { var form = $('.form-container'); var fieldContainers = form.find('.cdc-field-container'); var fileInputContainer = fieldContainers.eq(10); fileInputContainer.prepend(''); fileInputContainer.find('input').eq(0).attr('id', 'file_input'); fileInputContainer.find('.cdc-error').append('NingĂșn archivo seleccionado'); $('.cdc-image-upload').on('change', function() { var fileName = $(this).val(); $('.file-label').text('Archivo subido correctamente'); }); }; $(document).ready(function() { formDepilate = $('.sk-form-man-depilate'); if (formDepilate.length > 0) { fileButtonStyling(); checkImages(); handleForm(); } }); 'use strict'; (function () { var hpmVeet = $('.sk-hpm-form-veet-m' || '.sk-hpm-form-veet-w' || '.sk-hpm-veet-man-404' || '.sk-hpm-veet-woman-404' || '.sk-hpm-veet-man' || '.sk-hpm-veet-woman' || '.sk-hpm-veet-man-end' || '.sk-hpm-veet-woman-end'); var thnkPg = $(".thank-you"); if (hpmVeet) { $("head").append(""); $("body").removeClass("RBStarterKitContentGridPage"); $('link[href="/css/CmsPlugins/RB-StarterKit/themes/veetsk/styles-blessed1.css?bundleVirtualPath=%7e%2fcssbundles%2fveetsk-styles-blessed1.css%2f"]').remove(); }; $('.cdc-field-container-1').text('Por favor, rellena todos los campos').css({ 'font-family': 'HelveticaNeueLTStd-Roman', 'font-size': '15px', 'margin-top': '10%', 'color': '#fff', 'margin-bottom': '25px', 'text-align': 'center','width':'250px','margin-left':'5%' }); }()); $(document).ready(function(){ $(".sk-main-links .dropdown").hover( function(){ $(this).addClass("open"); }, function(){ $(this).removeClass("open"); } ); }); 'use strict'; (function(){ var nonCrop = $('.no-crop-img img'); if(nonCrop.length > 0){ $(nonCrop).attr('src', function(i,v){ if (v !== undefined ) { return v.split('?')[0]; } }); $(nonCrop).attr('data-src', function(i,v){ if (v !== undefined ) { return v.split('?')[0]; } }); }; }()); $(document).ready(function () { var isNewZealandMarket = $('.sk-country-nz').length; var hasBuyNowLinks = $('.buy-now').length; if (isNewZealandMarket && hasBuyNowLinks) { $(".sk-product-assets").append($(".buy-now")); } } ); $(document).ready(function () { var isNZMarket = $('.sk-country-nz').length; if (isNZMarket) { $('#sk-search').addClass('advanced'); try{ $.getScript($('#search-settings').attr("data-library-location"), function() { }); } catch(e){ $('#sk-search').removeClass('advanced'); } } } ); (function($) { $(document).ready(function() { if ($('body').hasClass('sk-veet-towie')) { $('.sk-segment-body').prepend(''); if ($('.sk-grid-richtext--homepage').length) { $('body').addClass('sk-veet-towie--homepage'); $('.sk-veet-towie .grid-section > .sk-grid-panel:last-child .sk-grid-richtext.sk-grid-richtext--homepage h1 a').removeAttr('title'); } else if ($('#cdc-form').length) { $('.g-recaptcha').appendTo('#cdc-form .col-md-6.column:last > div').wrap('
'); $('body').addClass('sk-veet-towie--form'); $('.cdc-submit.btn.btn-primary').val('SUBMIT').addClass('towie-btn-ready'); setTimeout(function() { $('.cdc-submit.btn.btn-primary').val('SUBMIT').addClass('towie-btn-ready'); }, 250); $('.sk-veet-towie.sk-veet-towie--form .sk-container-body > .sk-general-content > .row:first-child > .col-md-12 > .sk-grid-content > .umb-grid > .grid-section > .sk-grid-panel:last').append('
'); $('.sk-veet-towie.sk-veet-towie--form .sk-segment-body').append(''); $('.sk-veet-towie.sk-veet-towie--form #cdc-form .col-md-6:last-child .cdc-field-container:eq(1)').append(''); $('.sk-veet-towie-help, .sk-veet-towie-close-help, .sk-veet-towie-close-help-btn').on('click', function(e) { e.preventDefault(); $('body').toggleClass('sk-veet-towie--help-visible'); }); $('.sk-veet-towie #cdc-form .input-group.date > input').on('change', function() { $('body > .datepicker').remove(); }); var errorMsgs = [ 'Please read and accept Terms and Conditions', 'Please read and accept Privacy Policy' ]; var displayErrorIfNeeded = function($container, index) { $container.find('.help-block.cdc-error').remove(); if (!$container.find('input.cdc-checkbox')[0].checked) { $container.addClass('has-error'); $container.append('' + ' ' + ' ' + errorMsgs[index] + '' + ' ' + ''); } }; $('.sk-veet-towie #cdc-form').on('submit', function() { $('.sk-veet-towie #cdc-form .checkbox.advanced-cdc-checkbox').each(function(index) { var $container = $(this).parent(); displayErrorIfNeeded($container, index); }); }); $('.sk-veet-towie #cdc-form .checkbox.advanced-cdc-checkbox').each(function(index) { var $wrapper = $(this); var $container = $wrapper.parent(); $wrapper.find('> input').on('change', function() { displayErrorIfNeeded($container, index); }); }); } } }); })(jQuery); 'use strict'; (function () { if (".sk-hpm-form-veet-m") { $(".cdc-submit").val("ENVIAR"); } if (".sk-hpm-form-veet-w") { $(".cdc-submit").val("ENVIAR"); } }()); $(document).ready(function() { // Move social links from navbar to footer var socials = $('.sk-veet-men .sk-sub-nav .sk-social-sharing'); $('.sk-veet-men .sk-grid-panel.veet-men-footer .sk-grid-panel .sk-grid-social-media').prepend(socials); });