/* Minification failed. Returning unminified contents.
(190,27-28): run-time error JS1195: Expected expression: >
(192,10-11): run-time error JS1195: Expected expression: )
(196,7-12): run-time error JS1006: Expected ')': catch
(198,5-6): run-time error JS1002: Syntax error: }
(201,31-32): run-time error JS1004: Expected ';': {
 */
$(document).ready(function () {
    var isAustralianMarket = $('.sk-country-au').length;
    if (isAustralianMarket) {
        $('#sk-search').addClass('advanced');
        try{
            $.getScript($('#search-settings').attr("data-library-location"), function()
            {
            });
        } catch(e){
            $('#sk-search').removeClass('advanced');
        }
    }
}
);
(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 = 'scholl';
    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);
    $('a[href="#GenericReview"]').on('click', function(event){
      event.preventDefault();
      openReviewModal();
    });
  }

  $(document).ready(function () {
    var isAustralianMarket = $('.sk-country-au').length;

    if (!isAustralianMarket) {
      return;
    }

    var BVAPI_SCRIPT_URL = 'https://display.ugc.bazaarvoice.com/static/scholl-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();
});
'use strict';

(function(){

    var divMove1 = $('.sk-hpm-comodidad');
    var divMove2 = $('.sk-hpm-comodidad-form');
    var divMove3 = $('.sk-hpm-comodidad-esta');
    if(divMove1.length > 0 | divMove2.length > 0 | divMove3.length > 0){
        $('.hpm-footer-text').insertBefore('.sk-footer-nav');
    };

    var HPMForm = $('.sk-hpm-comodidad-form');
    if(HPMForm.length > 0){
        $('.hpm-text-in-form').insertBefore('.cdc-error-summary');
    };

}());
'use strict';

(function(){

if('.sk-hpm-mother-day'){
    $('.hpm-in-form-one').insertBefore('.hpm-first-row');
    $('.hpm-in-form-two').insertBefore('.hpm-second-row-top');
    $('.hpm-in-form-three').insertBefore('.hpm-three-row-top');
    $('.hpm-in-form-four').insertAfter('.hpm-first-row');
}

}());
'use strict';

(function(){
	function formDict(){
        var a = { // here you should add translate
            "en-en": {
                select: '-- choose --',
                title: 'Title',
                titleError: 'Field title is required',
                forname: 'First name',
                fornameError: 'First name field is required',
                surname: 'Surname',
                surnameError: 'Last name field is required',
                email: 'Email',
                emailError: 'Field Email is required',
                submit: 'Data sending'
            },
            "cl-de": {
                select: '-- wählen --',
                title: 'Anrede',
                titleError: 'Feld Anrede ist erforderlich',
                forname: 'Vorname',
                fornameError: 'Feld Vorname ist erforderlich',
                surname: 'Nachname',
                surnameError: 'Feld Nachname ist erforderlich',
                email: 'Email',
                emailError: 'Feld Email ist erforderlich',
                submit: 'Daten absenden'
            },
            "at-de": {
                select: '-- wählen --',
                title: 'Anrede',
                titleError: 'Feld Anrede ist erforderlich',
                forname: 'Vorname',
                fornameError: 'Feld Vorname ist erforderlich',
                surname: 'Nachname',
                surnameError: 'Feld Nachname ist erforderlich',
                email: 'Email',
                emailError: 'Feld Email ist erforderlich',
                submit: 'Daten absenden'
            },
            "de-de": {
                select: '-- wählen --',
                title: 'Anrede',
                titleError: 'Feld Anrede ist erforderlich',
                forname: 'Vorname',
                fornameError: 'Feld Vorname ist erforderlich',
                surname: 'Nachname',
                surnameError: 'Feld Nachname ist erforderlich',
                email: 'Email',
                emailError: 'Feld Email ist erforderlich',
                submit: 'Daten absenden'
            }
        };
		///1 - country , 2 language , example : 'ca-en' (canada - English )
        var type, labels;

        var country = [
            [".sk-country-en", ".sk-language-pl"],
            [".sk-country-at", ".sk-language-de"],
            [".sk-country-de", ".sk-language-de"]

        ];

		//You should add country and language to country =[] where will translation Form's . and to 'var a' add translate.
        for (var i = 0; i < country.length; i++) {

            if (document.querySelector((country[i][0]))) {
                type = country[i][0].slice(-2);
                for (var i = 0; i < country[i].length; i++) {

                    if (document.querySelector((country[i][1]))) {
                        type += "-" + country[i][1].slice(-2);
                    }
                }
            }

        }

        if (type == "" || type == undefined) {
            type = "en-en";

        }
         if (a[type] && a[type]!== undefined) {
            labels = a[type];

						if(type == "de-de" || type =="at-de" || type == "cl-de"){
							$('select option:contains("Miss")').text('Frau');
							$('select option:contains("Mrs")').text('Herr');
							$('select option:contains("Mr")').remove();
							$('select option:contains("Rev")').remove();
							$('select option:contains("Dr")').remove();
							$('select option:contains("Master")').remove();
							$('select option:contains("Ms")').remove();
						}
        } else {
            labels = a["en-en"];
        }
		var title = document.querySelector('label[for="Title"]');
//		var titleError = document.querySelector('.field-validation-error span[for="Title"]');
		var forname = document.querySelector('label[for="GivenNames"]');
//		var fornameError = document.querySelector('.field-validation-error span[for="GivenNames"]');
		var surname = document.querySelector('label[for="FamilyNames"]');
//		var surnameError = document.querySelector('.field-validation-error span[for="FamilyNames"]');
		var email  = document.querySelector('label[for="EmailAddress"]');
//		var emailError  = document.querySelector('#EmailAddress');
		var submit  = document.querySelector('input.cdc-submit');
		var selectOption0 = document.querySelector('select#Title option');

		if($("#cdc-form")[0]) {
		  title.textContent = labels.title;
		//		titleError.textContent = labels.titleError;
		  forname.textContent = labels.forname;
		//		fornameError.textContent = labels.fornameError;
		  surname.textContent = labels.surname;
		//		surnameError.textContent = labels.surnameError;
		  email.textContent = labels.email;
		//		emailError.setAttribute('data-val-required', labels.emailError);
		  submit.value = labels.submit;
		  selectOption0.text = labels.select;
		}

	}
	function ready(fn) {
		if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
			fn();
		} else {
			document.addEventListener('DOMContentLoaded', fn);
		}
	}

    var check_n = 0;
    $(".cdc-form-group--submit input").click(function() {

        if($('#cdc-form').find('.field-validation-error').length == 0 && check_n >= 1 ){
            $('.thank-you-conteiner').css('display', 'block');
            $('.bottom-area').css('display', 'none');

        }else{
            check_n = 1;
        }

});
$('.thank-you-conteiner button').click(function() {
    location.reload();
});

	ready(formDict);

    var nonCrop = $('.no-crop-img img');

    if(nonCrop.length > 0){
        $(nonCrop).attr('src', function(i,v){
        return v.split('?')[0];
        })
    };

	if($('.sk-hpm-mother-day') > 0 ){
		$('.sk-container-body:first').removeClass();
	};


}());
$(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');
        }
    }
}
);
$(document).ready(function() {
  if($('body').hasClass('sk-country-jp')) {
    var images = $('.promo-list img');
    setTimeout(function(){
      if(images.length > 0){
        $(images).attr('src', function(i,v){
          return v.split('?')[0];
        });
      };
    }, 2000);
  }
});
'use strict';

function styleForm() {
  // hide certain labels based on their text
  var labelsToHide = $('.sk-hello-sommer .form-container .control-label');
  var submitForm = $('.sk-hello-sommer .cdc-submit');

  if (labelsToHide.length > 0 && submitForm) {
    labelsToHide.each(function(index) {
      var label = $(this);

      if (label.text() === '(hide)') {
        label.css('display', 'none');
      }
    });

    $('.sk-hello-sommer .form-container label.cdc-checkbox-label-required input').on('click', function() {
      var input = $(this);

      input.is(":checked") ? input.val("true") : input.val("false");
    });

    $('.answer-question-text').hide();
    $('.info-section').hide()

    submitForm.val('Jetzt mitmachen');
    $('.sk-hello-sommer .form-container input[name="PostedFormUrl"]').val(window.location.href);

    $('.sk-hello-sommer #cdc-form').on('submit', function() {
      $('.kv-sign').hide();
      $('.info-section').hide();
      $('.sk-grid-panel.single-text').hide();
      $('.win-prize-title').hide();
      $('.answer-question-text').hide();
      $('.win-section').hide();
      $('.camera-image__container').hide();
      $(window).scrollTop();

      $('.background-section').css('background','#6d5aa6');
      $('.background-section').css('min-height','85vh');
      $('section.sk-grid-content > .umb-grid > .grid-section').css('height','100vh');
      $('.footer-banner-logos').css('position','absolute');
      $('.footer-banner-logos').css('bottom','0');
      $('.footer-banner-logos').css('width','100%');
    });

    $('.cdc-checkbox.customcheckbox.cdc-checkbox-required').each(function () {
      $(this).attr("required", true);
    })

    $('.cdc-checkbox.customcheckbox.cdc-checkbox-required').each(function () {
      $('<div></div>').insertAfter($(this));
    });

    $('.cdc-textbox.form-control.forms-custom-validation').each(function () {
      var maxlength = $(this).data('val-length-max');
      $(this).attr('maxlength', maxlength);
    });


    $('.cdc-textbox.form-control.forms-custom-validation').last().attr("pattern", "[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$");
  } else {
    setTimeout(styleForm, 200);
  }
}

$(document).ready(function() {
  var submitQuiz = $('.sk-hello-sommer #FinishQuiz');

  if (submitQuiz) {
    submitQuiz.text('Jetzt mitmachen');


    submitQuiz.on('click', function() {
      $('.sk-hello-sommer #QuestionId').each(function (i) {
        var questionClass = '.question-validation-' + $(this).val();
        $(questionClass).text('Bitte wählen Sie Ihre Antwort.');
      });
      styleForm();
    });
  }
});
$(window).load(function(){
    $( ".tooltip-container label" ).attr( "data-original-title" ,  $( ".tooltip-container label .cdc-tooltip" ).attr('data-original-title'));
    $( ".tooltip-container label" ).attr( "data-toggle" , 'tooltip');  
    $('[data-toggle="tooltip"]').tooltip();  
});
'use strict';

(function(){

if('.sk-hpm-mother-day'){
    $('.cdc-submit').val('Absenden');
}

}());