/*! * Globalization Partners JS v1.0 */ $(function(){$('.lazy').Lazy({effect:'fadeIn',})});$('.search-box, #close-search').on('click tap',function(e){$("html").toggleClass("form_focus")});$(window).scroll(function(event){var scroll=$(window).scrollTop();if(scroll>0){$('header.navbar').addClass('header-sticky')}else{$('header.navbar').removeClass('header-sticky')}});$(function(){if(document.querySelector('.open-positions')!==null){var offset=145;var top;$('a[href*="#"]').on('click tap',function(e){$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top-offset,},300,'linear')})}else{var offset=145;var top;$('a[href*="#"]').on('click tap',function(e){$('html, body').animate({scrollTop:$($(this).attr('href')).offset().top-offset,},300,'linear')});if(window.location.hash){var hash=window.location.hash;$('html, body').animate({scrollTop:$(hash).offset().top-offset,},300,'swing')}}});$(function(){var t;var start=$('#carouselVideos').find('.active').attr('data-interval');t=setTimeout("$('#carouselVideos').carousel({interval: 14000});",start-14000);$('#carouselVideos').on('slid.bs.carousel',function(){clearTimeout(t);var duration=$(this).find('.active').attr('data-interval');$('#carouselVideos').carousel('pause');t=setTimeout("$('#carouselVideos').carousel();",duration-14000)});$('.carousel-control-next').on('click',function(){clearTimeout(t)});$('.carousel-control-prev').on('click',function(){clearTimeout(t)});$('.carousel-countries').slick({lazyLoad:'ondemand',centerMode:!0,centerPadding:'20px',slidesToShow:3,slidesToScroll:1,dots:!0,infinite:!0,adaptiveHeight:!0,accessibility:!0,prevArrow:'',nextArrow:'',responsive:[{breakpoint:960,settings:{arrows:!0,centerMode:!0,centerPadding:'0px',slidesToShow:3,slidesToScroll:1,},},{breakpoint:768,settings:{arrows:!0,centerMode:!0,centerPadding:'40px',slidesToShow:1,},},{breakpoint:600,settings:{arrows:!1,centerMode:!0,centerPadding:'20px',slidesToShow:1,},},],});$('.slick').slick({lazyLoad:'ondemand',arrows:!0,centerMode:!1,centerPadding:'20px',slidesToShow:3,slidesToScroll:1,dots:!0,infinite:!0,adaptiveHeight:!0,accessibility:!0,prevArrow:'',nextArrow:'',responsive:[{breakpoint:960,settings:{arrows:!0,centerMode:!0,centerPadding:'0px',slidesToShow:3,slidesToScroll:1,},},{breakpoint:768,settings:{arrows:!0,centerMode:!0,centerPadding:'40px',slidesToShow:1,},},{breakpoint:600,settings:{arrows:!1,centerMode:!0,centerPadding:'20px',slidesToShow:1,},},],});$('.one-slider').slick({lazyLoad:'progressive',arrows:!0,centerMode:!1,centerPadding:'26px',slidesToShow:1,slidesToScroll:1,dots:!1,infinite:!0,adaptiveHeight:!1,accessibility:!0,autoplay:!0,autoplaySpeed:5000,pauseOnFocus:!0,pauseOnHover:!0,prevArrow:'',nextArrow:'',responsive:[{breakpoint:960,settings:{arrows:!0,centerMode:!1,centerPadding:'26px',slidesToShow:1,slidesToScroll:1,},},{breakpoint:768,settings:{arrows:!0,centerMode:!1,centerPadding:'26px',slidesToShow:1,},},{breakpoint:600,settings:{arrows:!1,centerMode:!0,centerPadding:'0px',slidesToShow:1,},},],});$('#awards-news').slick({lazyLoad:'ondemand',arrows:!0,centerMode:!1,centerPadding:'0px',slidesToShow:4,slidesToScroll:1,dots:!1,infinite:!0,adaptiveHeight:!0,accessibility:!0,prevArrow:'',nextArrow:'',responsive:[{breakpoint:1200,settings:{arrows:!0,centerMode:!0,centerPadding:'0px',slidesToShow:3,slidesToScroll:1,},},{breakpoint:768,settings:{arrows:!0,centerMode:!0,centerPadding:'40px',slidesToShow:1,},},{breakpoint:600,settings:{arrows:!1,centerMode:!0,centerPadding:'20px',slidesToShow:1,},},],});let carouselCountriesObject=document.getElementsByClassName("carousel-countries-splide");if(carouselCountriesObject.length>0){for(var i=0;i0){for(var i=0;i0){for(var i=0;i0){for(var i=0;i0){for(var i=0;i=$('.content').offset().top){if(scrollwin<=$('.content').offset().top+articleheight){$('.bar-long').css('width',((scrollwin-$('.content').offset().top)/articleheight)*100+'%')}else{$('.bar-long').css('width','100%')}}else{$('.bar-long').css('width','0px')}});$('.share.sticky, .table-sticky').stickySidebar({containerSelector:'.content',resizeSensor:!0,stickyClass:'is-sticky',topSpacing:86,});$('.sticky-follow').stickySidebar({containerSelector:'.sticky-follow-container',resizeSensor:!0,stickyClass:'is-sticky',topSpacing:86,bottomSpacing:86,})} jQuery.event.special.touchstart={setup:function(_,ns,handle){this.addEventListener('touchstart',handle,{passive:!ns.includes('noPreventDefault'),})},};jQuery.event.special.touchmove={setup:function(_,ns,handle){this.addEventListener('touchmove',handle,{passive:!ns.includes('noPreventDefault'),})},};$(document).ready(function(){$('#pdfdownload, #pdfdownloadBelow').on('click',function(){hbspt.forms.create({portalId:'3341196',formId:'13552995-d074-420a-b437-388635e27e86',target:'#formPDF',onFormSubmit:function($form){ga('send','event','Globalpedia','Download','Content',{NonInteraction:1,})},onFormReady:function(){changeDataForms()},});$('.download-pdf-ready').removeClass('show');readCountry()});$(document).on('click','.hs-button',function(event){$(document).on('DOMNodeInserted',function(e){if($(e.target).hasClass('submitted-message')){$('.download-pdf-ready').addClass('show');$('.dkpdf-button').trigger('click')}})})});$(document).ready(function(){$('#pdfblogdownload, #pdfblogdownloadBelow').on('click',function(){hbspt.forms.create({portalId:'3341196',formId:'c6629807-641c-4e7a-ab87-ea49238a6baf',target:'#formPDF',onFormSubmit:function($form){ga('send','event','Blog','Download','Content',{NonInteraction:1,})},onFormReady:function(){changeDataForms()},});$('.download-pdf-ready').removeClass('show');readCountry()});$(document).on('click','.hs-button',function(event){$(document).on('DOMNodeInserted',function(e){if($(e.target).hasClass('submitted-message')){$('.download-pdf-ready').addClass('show');$('.dkpdf-button').trigger('click')}})})});var doc=$(document),win=$(window),pageType=document.getElementsByClassName('container.landing'),pageTitle=document.getElementsByTagName('title')[0].innerHTML;function onDocumentReady(){if(pageType){$('.textarea').attr('rows',2);doc.one('focus.textarea','textarea.textarea',function(){var savedValue=this.value;this.value='';this.baseScrollHeight=this.scrollHeight;this.value=savedValue}).on('input.textarea','textarea.textarea',function(){var minRows=this.getAttribute('data-min-rows')|0,rows;this.rows=minRows;rows=Math.ceil((this.scrollHeight-this.baseScrollHeight)/17);this.rows=minRows+rows})} var url=window.location.href,keysToFind=['utm_source','utm_campaign'];keysToFind.forEach(function(key){if(url.indexOf(key+'=')>-1){var valueFound=url.substr(url.indexOf(key+'=')+key.length+1).split('&')[0];sessionStorage.setItem(key,valueFound)}});function checkForInput(element){var value=$(element).val(),source=sessionStorage.getItem('utm_source'),campaign=sessionStorage.getItem('utm_campaign');if(source&&value==='website'){$(element).val(source)} if(campaign&&value==='none'){$(element).val(campaign)}} $('input.gform_hidden').each(function(){checkForInput(this)});$(window).on('load',function(){var source=sessionStorage.getItem('utm_source'),campaign=sessionStorage.getItem('utm_campaign');$('.hbspt-form select').parent().addClass('ginput_container_select');$('.hbspt-form .field:hidden').closest('fieldset').hide();if(campaign){$('.hbspt-form .hs_campaign_source input').val(campaign)} if(source){$('.hbspt-form .hs_leadsource input').val(source)} $('.hs-form-checkbox input, .hs-form-booleancheckbox input').on('change',hbsptCheckboxStyles);$('.hs-form-radio input').on('change',hbsptRadioStyles);if($('.hs-form-booleancheckbox input').is(':checked')){$('.hs-form-booleancheckbox input').parent('label').toggleClass('checked')} if($('.job-application').length){var career=pageTitle.substring(0,pageTitle.indexOf(' | '));$('.hbspt-form .hs_career_name input').val(career)}});function hbsptCheckboxStyles(){$(this).parent('label').toggleClass('checked')} function hbsptRadioStyles(){$('.hs-form-radio input').parent('label').removeClass('checked');$(this).parent('label').addClass('checked')}} onDocumentReady();function OneLink(sHostname){document.location.href=document.location.protocol+'//'+sHostname+document.location.pathname+document.location.search} $(document).ready(function(){function toggleNavbarMethod(){if($(window).width()>960){$('#languageSelector .dropdown').on('mouseover',function(){$('.dropdown-toggle',this).trigger('click')}).on('mouseout',function(){$('.dropdown-toggle',this).trigger('click').blur()})}else{$('.languageSelector .dropdown-toggle').on('click tap',function(e){$('.dropdown-toggle',this).trigger('click tap').blur();if($('.languageSelector .dropdown-toggle').hasClass('no-show')){$('.languageSelector .dropdown-toggle').removeClass('no-show').toggleClass('show',!0)}else{$('.languageSelector .dropdown-toggle').removeClass('show').toggleClass('no-show',!0)} e.preventDefault()})}} toggleNavbarMethod();$(window).resize(toggleNavbarMethod);if(ajaxurl){ajaxurl='https://www.globalization-partners.com/wp-admin/admin-ajax.php'}});$(window).scroll(function(){if($(window).width()<960){if($('#view-open-positions').length===0){return} let scroll=$(this).scrollTop();let heroSize=$('main').outerHeight()+$('main').position()['top'];let viewPositions=$('#view-open-positions').position()['top']-300;let startPoint=heroSize+50;let endPoint=viewPositions-50;if(scroll>heroSize&&scrollstartPoint&&scroll{addAttribute()};window.onload=load;$(document).ready(function(){$(document).on('click','.hs-button',function(event){$(document).on('DOMNodeInserted',function(e){if($(e.target).hasClass('submitted-message')){$('.submitted-message').children('p').addClass('h4 text-quaternary mb-5');$('.pdf-modal').addClass('modal-submitted');$('#main-title').text('Thank you!');$('.pdf-modal p.lead').text('Your content is now ready to enjoy!')}})});$('#blogpdf, #globalpediapdf').on('hidden.bs.modal',function(){$('.submitted-message').children('p').removeClass('h4 text-quaternary mb-5');$('.pdf-modal').removeClass('modal-submitted');$('#main-title').text('Save it for later');$('.pdf-modal p.lead').text('Fill out this form to download the content in a PDF format.')})});function rafAsync(){return new Promise(resolve=>{requestAnimationFrame(resolve)})} function checkElement(selector){if(document.querySelector(selector)===null){return rafAsync().then(()=>checkElement(selector))}else{return Promise.resolve(!0)}} function hideShowElements(){let containers=document.querySelectorAll('#featured-positions .container');containers.forEach(container=>{fadeOut(document.querySelector('#featured-positions .lds-ring'));fadeIn(container)})} function fadeOut(el){el.style.opacity=1;(function fade(){if((el.style.opacity-=0.1)<0){el.style.display='none'}else{requestAnimationFrame(fade)}})()} function fadeIn(el,display){el.style.opacity=0;el.style.display=display||'block';(function fade(){var val=parseFloat(el.style.opacity);if(!((val+=0.1)>1)){el.style.opacity=val;requestAnimationFrame(fade)}})()} checkElement('.cat-title').then(element=>{hideShowElements(element)});function sortSelect(selElem){var tmpAry=new Array();var disabled=new Array();for(var i=0;i=0;i--){if(tmpAry[i][1]=="disabled"){let item=tmpAry[i];tmpAry.splice(i,1);tmpAry.unshift(item)}} while(selElem.options.length>0){selElem.options[0]=null} for(var i=0;i{var selectors=document.querySelectorAll('select[name="country_select"]');for(var i=0,element;element=selectors[i];i++){sortSelect(selectors[i])}});checkElement('select[name="state_select"]').then(element=>{var selectors=document.querySelectorAll('select[name="state_select"]');for(var i=0,element;(element=selectors[i]);i++){sortSelect(selectors[i])}});checkElement('select[name="province_select"]').then(element=>{var selectors=document.querySelectorAll('select[name="province_select"]');for(var i=0,element;(element=selectors[i]);i++){sortSelect(selectors[i])}});if(window.location.href.indexOf("globalpedia")>-1){checkElement('#request-quote select[name="country_select"]').then((element)=>{var selectors=document.querySelectorAll('select[name="country_select"]');for(var i=0,element;element=selectors[i];i++){sortSelect(selectors[i])}});checkElement('select[name="state_select"]').then(element=>{var selectors=document.querySelectorAll('select[name="state_select"]');for(var i=0,element;(element=selectors[i]);i++){sortSelect(selectors[i])}});checkElement('select[name="province_select"]').then(element=>{var selectors=document.querySelectorAll('select[name="province_select"]');for(var i=0,element;(element=selectors[i]);i++){sortSelect(selectors[i])}})}});function getLanguagesSelector(){var global_countries=[] var childDivs=document.querySelectorAll("#languageSelector .dropdown-menu a") for(i=0;i0){suggest(res.data)}else{var suggestvar=["Search "+s+" in all website content"];suggest(suggestvar)}},error:function(request,status,error){$('#navbar_search_loader').addClass("disabled")}})},select:function(event,ui){if($("#search").attr("data-results")>0){}else{search=$("#search").val() select_autocomplete(search) return!1}},open:function(){$(" .search-top .default_options").css("display","none") suggestList=$("
  • ") suggestList.prepend('Internal');suggestList.prepend('Internationalization');suggestList.prepend('International Recruit');suggestList.prepend('International Hiring');$('#nav_autocomplete_ui_front ul.ui-autocomplete').prepend('
  • Quick Results:
  • ');$('#nav_autocomplete_ui_front ul.ui-autocomplete').prepend(suggestList);$('#nav_autocomplete_ui_front ul.ui-autocomplete').prepend('
  • Suggestions:
  • ');$('#nav_autocomplete_ui_front ul.ui-autocomplete').append('');$('.ui-autocomplete .suggestion').click(function(e){text=e.target.innerHTML $("#search").val(text);$("#navbar_search_form").submit()})},appendTo:$("#nav_autocomplete_ui_front")}).focus(function(){$(this).autocomplete("search")}).autocomplete("instance")._renderItem=function(ul,item){var searchMask=this.element.val();var regEx=new RegExp(searchMask,"ig");var replaceMask="$&";var category="";var html=item.label.replace(regEx,replaceMask);search=$("#search").val() if(item.category){category=item.category.toUpperCase() if(category=="POST"){category="BLOG"}}else{category=""} search=$("#search").val() if(item.url){var linkItem=$("")}else{var linkItem=$("")} var rowItem=$("
    ");var containerSearch=$("
    ").html(""+html+"") if(item.text){var containerText=$("

    ").html(item.text) containerSearch.append(containerText)} var containercat=$("
    ").html(category) rowItem.append(containerSearch).append(containercat) linkItem.append(rowItem) return $("
  • ").addClass("ui-menu-item").data("item.autocomplete",item).append(linkItem).appendTo(ul)}} var searchRequest;$('#nav_search_type').change(function(){$('#search').autocomplete("search")});$('#search').keyup(function(){if($(this).val()==""){$('#nav_autocomplete_ui_front ul').attr('style','display: none!important');$(" .search-top .default_options").css("display","flex")}})}else{if(document.querySelector("#default-options")){document.querySelector("#default-options").classList.add("show")}} $("#navbar_search_form").submit(function(event){event.preventDefault();search=$("#search").val() if(search==""){search="+"} select_autocomplete(search)});$('.ui-autocomplete .suggestion').click(function(e){text=e.target.innerHTML $("#search").val(text);$("#navbar_search_form").submit()});function select_autocomplete(search){var countryurl="" if(window.location.pathname!="/"){var country=window.location.pathname.split("/",2)[1];var countries=getLanguagesSelector() if(countries.includes(country)){countryurl="/"+country}} var filter=$("#nav_search_type").val() search=encodeURIComponent(search) search=search.replace(/%2B/g,'+') search=search.replace(/%2F/g,'') search=search.replace(/%20/g,'+') window.location.href='https://'+window.location.hostname+countryurl+'/search/'+search+"/?content="+filter} $(document).ready(function(){let played=!1;let animElems=$('.counter-animation');if(animElems){animElems.each(function(){$(this).prop('Counter',0).animate({Counter:$(this).text(),},{duration:1500,easing:'swing',step:function(now){$(this).text(Math.ceil(now))},queue:'counting',})})} if($('.highlightsfacts').length){let highlightPositions=$('.highlightsfacts').position()['top']-$(window).height();$(window).scroll(function(){let scroll=$(this).scrollTop();if(!played&&scroll>highlightPositions){animElems.each(function(){$(this).dequeue('counting')})}})}});function changeCurrency(value){let price=0;let priceSpan=document.querySelector('.price-change-currency');let countries=document.querySelectorAll(".currency-homepage button span");for(let i=0;i