(function($){ var marker=[], infowindow=[], map; function addMarker(location,name,contentstr,mark_img){ marker[name]=new google.maps.Marker({ position: location, map: map, icon: mark_img }); marker[name].setMap(map); if(contentstr.length){ infowindow[name]=new google.maps.InfoWindow({ content:contentstr }); }; google.maps.event.addListener(marker[name], 'click', function(){ infowindow[name].open(map,marker[name]); }); } function initialize(){ var lat=$('#map-canvas').attr("data-lat"); var lng=$('#map-canvas').attr("data-lng"); var myLatlng=new google.maps.LatLng(lat,lng); var setZoom=parseInt($('#map-canvas').attr("data-zoom")); var styles=[{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"administrative.country","elementType":"geometry.fill","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text.fill","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.text.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.country","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative.province","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"administrative.province","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.business","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.highway","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"transit.station","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#485b77"},{"visibility":"on"}]}]; var styledMap=new google.maps.StyledMapType(styles,{name: "Styled Map"}); var mapOptions={ zoom: setZoom, panControl: false, panControlOptions: { position: google.maps.ControlPosition.LEFT_BOTTOM }, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE, position: google.maps.ControlPosition.LEFT_BOTTOM }, streetViewControl: true, streetViewControlOptions: { position: google.maps.ControlPosition.LEFT_BOTTOM }, center: myLatlng, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style'] }}; map=new google.maps.Map(document.getElementById("map-canvas"), mapOptions); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); $('.addresses-block a').each(function(){ var mark_lat=$(this).attr('data-lat'); var mark_lng=$(this).attr('data-lng'); var mark_img=$(this).attr('data-marker'); var this_index=$('.addresses-block a').index(this); var mark_name='template_marker_'+this_index; var mark_locat=new google.maps.LatLng(mark_lat, mark_lng); var mark_str=$(this).attr('data-string'); addMarker(mark_locat,mark_name,mark_str,mark_img); }); } $(window).load(function(){ if($('#map-canvas').length){ setTimeout(function(){initialize();}, 500); }}); })(jQuery); (function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(a):void 0},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); (function($){ "use strict"; var swipers=[], winW, winH, winScroll, _isresponsive, xsPoint=767, smPoint=991, mdPoint=1199; function pageCalculations(){ winW=$(window).width(); winH=$(window).height(); if($('.open-icon').is(':visible')) _isresponsive=true; else _isresponsive=false; if($('.main-banner-height').length) $('.main-banner-height').css({'height':winH - $('header').height() - $('.container-above-header').height() - $('.banner-tabs').height()}); } $('[data-toggle="popover"]').popover(); $('.center-image').each(function(){ var bgSrc=$(this).attr('src'); $(this).parent().addClass('background-block').css({'background-image':'url('+bgSrc+')'}); $(this).hide(); }); $(window).load(function(){ $('body, html').animate({'scrollTop':'0'}, 2); $('body').addClass('loaded'); pageCalculations(); initSwiper(); $('#loader-wrapper').fadeOut(500); }); function resizeCall(){ pageCalculations(); $('.swiper-container.initialized').each(function(){ swipers['swiper-'+$(this).attr('id')].reInit(); }); } $(window).resize(function(){ resizeCall(); }); window.addEventListener("orientationchange", function(){ resizeCall(); }, false); var _buffer=null, subHeaderHeight=($('.subheader').length)?$('.subheader').height():0; $(window).scroll(function(){ winScroll=$(window).scrollTop(); if($('body').hasClass('header-moved')&&!_isresponsive){ var adminBar=$('#wpadminbar').outerHeight(true), top=$('.container-above-header').outerHeight(true); if(winScroll >=top){ $('body > header').css('top', ''); $('body > header').addClass('fixed-top'); }else{ $('body > header').removeClass('fixed-top'); $('body > header').css('top', top+adminBar); }} if(winScroll>300&&!$('.header-floated').length) $('header').addClass('reduced'); else $('header').removeClass('reduced'); if($('.subheader').length){ if(winScroll>500) $('.subheader').addClass('active'); else $('.subheader').removeClass('active'); if(!_buffer){ _buffer=setTimeout(function (){ $('.scroll-to-block').each(function(index, element){ if($(element).offset().top<=winScroll+subHeaderHeight&&$(element).offset().top+$(element).height()>winScroll+subHeaderHeight){ $('.scroll-to-link.active').removeClass('active'); $('.scroll-to-link').eq(index).addClass('active'); }}); _buffer=null; }, 500); }} }); function initSwiper(){ var initIterator=0; $('.swiper-container').each(function(){ var $t=$(this); var index='swiper-unique-id-'+initIterator; $t.addClass('swiper-'+index + ' initialized').attr('id', index); $t.find('.pagination').addClass('pagination-'+index); var autoPlayVar=parseInt($t.attr('data-autoplay')); var centerVar=parseInt($t.attr('data-center')); var simVar=($t.closest('.circle-description-slide-box').length)?false:true; var slidesPerViewVar=$t.attr('data-slides-per-view'); var xsValue, smValue, mdValue, lgValue; if(slidesPerViewVar=='responsive'){ slidesPerViewVar=1; xsValue=$t.attr('data-xs-slides'); smValue=$t.attr('data-sm-slides'); mdValue=$t.attr('data-md-slides'); lgValue=$t.attr('data-lg-slides'); } else if(slidesPerViewVar!='auto'){ slidesPerViewVar=parseInt(slidesPerViewVar); } var loopVar=parseInt($t.attr('data-loop')); var speedVar=parseInt($t.attr('data-speed')); swipers['swiper-'+index]=new Swiper('.swiper-'+index,{ speed: speedVar, pagination: '.pagination-'+index, loop: loopVar, paginationClickable: true, autoplay: autoPlayVar, slidesPerView: slidesPerViewVar, keyboardControl: true, calculateHeight: true, simulateTouch: simVar, centeredSlides: centerVar, onInit: function(swiper){ if($t.attr('data-slides-per-view')=='responsive') updateSlidesPerView(xsValue, smValue, mdValue, lgValue, swiper); if($t.find('.swiper-slide').length>swiper.params.slidesPerView) $t.removeClass('hide-pagination'); else $t.addClass('hide-pagination'); }, onSlideChangeStart: function(swiper){ var activeIndex=(loopVar===true)?swiper.activeIndex:swiper.activeLoopIndex; if($t.closest('.testimonials-container').length){ $t.closest('.testimonials-wrapper').find('.testimonials-icons .entry div.active').removeClass('active'); $t.closest('.testimonials-wrapper').find('.testimonials-icons .entry div').eq(activeIndex).addClass('active'); } if($t.closest('.block.type-10').length){ $t.closest('.block.type-10').find('.tab-entry.active').removeClass('active'); $t.closest('.block.type-10').find('.tab-entry').eq(activeIndex).addClass('active'); }}, onSlideClick: function(swiper){ if($t.closest('.circle-slide-box').length) swiper.swipeTo(swiper.clickedSlideIndex); }}); swipers['swiper-'+index].reInit(); if($t.find('.default-active').length) swipers['swiper-'+index].swipeTo($t.find('.swiper-slide').index($t.find('.default-active')), 0); initIterator++; }); $('.swiper-container.connected-to-bottom-swiper').each(function(){ var $t=$(this); if($t.closest('.block').find('.connected-to-top-swiper').length){ swipers['swiper-'+$t.attr('id')].addCallback('SlideChangeStart', function(swiper){ swipers['swiper-'+$t.closest('.block').find('.connected-to-top-swiper').attr('id')].swipeTo(swiper.activeIndex); }); }}); } function updateSlidesPerView(xsValue, smValue, mdValue, lgValue, swiper){ if(winW>mdPoint) swiper.params.slidesPerView=lgValue; else if(winW>smPoint) swiper.params.slidesPerView=mdValue; else if(winW>xsPoint) swiper.params.slidesPerView=smValue; else swiper.params.slidesPerView=xsValue; } $('.swiper-arrow.left').click(function(){ swipers['swiper-'+$(this).parent().attr('id')].swipePrev(); }); $('.swiper-arrow.right').click(function(){ swipers['swiper-'+$(this).parent().attr('id')].swipeNext(); }); $('.testimonials-arrow.left').click(function(){ swipers['swiper-'+$(this).closest('.testimonials-wrapper').find('.testimonials-container .swiper-container').attr('id')].swipePrev(); }); $('.testimonials-arrow.right').click(function(){ swipers['swiper-'+$(this).closest('.testimonials-wrapper').find('.testimonials-container .swiper-container').attr('id')].swipeNext(); }); $('.submenu-icon').click(function(){ $(this).closest('.menu-item').toggleClass('opened'); }); $('.open-icon, .close-icon').click(function(){ $('header').toggleClass('active'); }); $('.accordeon-entry .title').click(function(){ $(this).parent().toggleClass('active'); $(this).next().slideToggle(300); }); $('.testimonials-icons .entry div').click(function(){ if($(this).hasClass('active')) return false; var val=$(this).parent().parent().find('.entry').index($(this).parent()); swipers['swiper-'+$(this).closest('.testimonials-wrapper').find('.testimonials-container .swiper-container').attr('id')].swipeTo(val); var parentSwiper=$(this).closest('.testimonials-wrapper').find('.testimonials-icons').parent(); if(parentSwiper.hasClass('swiper-container')) swipers['swiper-'+parentSwiper.attr('id')].swipeTo(val); $(this).parent().parent().find('div.active').removeClass('active'); $(this).addClass('active'); }); $('.circle-entry').hover(function(){ $(this).closest('.circle-wrapper').find('.big-circle-entry[data-rel="'+$(this).attr('data-rel')+'"]').addClass('visible'); }, function(){ $('.big-circle-entry.visible').removeClass('visible'); }); $('.tab-entry').click(function(){ if($(this).hasClass('active')) return false; var val=$(this).parent().find('.tab-entry').index(this); swipers['swiper-'+$(this).closest('.block').find('.swiper-container').attr('id')].swipeTo(val); $(this).parent().find('.tab-entry.active').removeClass('active'); $(this).addClass('active'); }); $('.prefix .selected-text').click(function(){ $(this).parent().find('.prefix-drop-down').toggle(); }); $('.prefix-drop-down div').click(function(){ $(this).parent().find('.active').removeClass('active'); $(this).addClass('active'); $(this).closest('.prefix').find('.selected-text').text($(this).text()); $(this).parent().hide(); }); $('.prefix').mouseleave(function(){ $('.prefix-drop-down').hide(); }); $('.tabs-desktop div').click(function(){ var $t=$(this); var curVal=$t.parent().find('div').index(this); $t.closest('.tabs-wrapper').find('.tabs-container:visible').fadeOut(300, function(){ $t.closest('.tabs-wrapper').find('.tabs-container').eq(curVal).fadeIn(300); }); $t.parent().find('.active').removeClass('active'); $t.addClass('active'); $t.parent().parent().find('.tabs-select-text .text').text($t.text()); }); $('.tabs-switch-box select').change(function(){ var curValue=$(this).val(); $(this).parent().find('.tabs-desktop div').filter(function (){return $(this).text()==curValue;}).click(); }); $('.faq-switcher .side-menu-item').click(function(){ if($(this).hasClass('active')) return false; var $t=$(this); var curVal=$t.parent().find('.side-menu-item').index(this); $(this).closest('.row').find('.switch-container:visible').fadeOut(300, function(){ $t.closest('.row').find('.switch-container').eq(curVal).fadeIn(300); }); $t.parent().find('.active').removeClass('active'); $t.addClass('active'); }); $(document).on('click', '.video-open', function(){ $('.video-player').addClass('active'); var videoSource=$(this).attr('data-src'); setTimeout(function(){$('.video-player iframe').attr('src', videoSource);}, 1000); }); $('.video-player .close-iframe').click(function(){ $('.video-player iframe').attr('src', ''); setTimeout(function(){$('.video-player').removeClass('active');}, 1000); }); $('.scroll-to-link').click(function(){ var index=$('.scroll-to-link').index(this); $('body, html').animate({'scrollTop':$('.scroll-to-block').eq(index).offset().top - subHeaderHeight}, 500); }); $('.theme-config .open').click(function(){ $('.theme-config').toggleClass('active'); }); $('.theme-config .colours-wrapper .entry').click(function(){ var newColour=$(this).attr('data-colour'); if($(this).hasClass('active')) return false; $(this).parent().find('.active').removeClass('active'); $(this).addClass('active'); $('body').removeClass('colour-1 colour-2 colour-3').addClass(newColour); $('#logo img').attr('src', 'img/logo'+newColour+'.png'); }); $('.checkbox-entry.checkbox label').click(function(){ $(this).parent().toggleClass('active'); $(this).parent().find('input').click(); }); $('.checkbox-entry.radio label').click(function(){ $(this).parent().find('input').click(); if(!$(this).parent().hasClass('active')){ var nameVar=$(this).parent().find('input').attr('name'); $('.checkbox-entry.radio input[name="'+nameVar+'"]').parent().removeClass('active'); $(this).parent().addClass('active'); }}); var wow=new WOW( { boxClass: 'wow', animateClass: 'animated', offset: 100, mobile: true, live: true, callback: function(box){ }} ); wow.init(); $(document).ready(function(){ $("a.scrollto").click(function(event){ var offtop=$('div#wpadminbar:visible').outerHeight(true) + $('.subheader:visible').outerHeight(true) + $('body > header:visible').outerHeight(true); var target=$(this).attr("href"); $(window).scrollTo(target, 750, {offset: {top: -offtop}}); event.preventDefault(); }); if($('body').hasClass('header-moved')){ var top=$('#wpadminbar').outerHeight(true) + $('.container-above-header').outerHeight(true); $('body > header').css('top', top); }}); if($('#bridge')){ $('#content-wrapper').addClass('fullrow'); }})(jQuery); window.addComment=function(u){var p,v,f,y=u.document,I={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=u.MutationObserver||u.WebKitMutationObserver||u.MozMutationObserver,o="querySelector"in y&&"addEventListener"in u,n=!!y.documentElement.dataset;function t(){r(),e&&new e(d).observe(y.body,{childList:!0,subTree:!0})}function r(e){if(o&&(p=h(I.cancelReplyId),v=h(I.commentFormId),p)){p.addEventListener("touchstart",i),p.addEventListener("click",i);for(var t,n=function(e){var t=I.commentReplyClass;e&&e.childNodes||(e=y);t=y.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),r=0,d=n.length;r 0){ action='wdc_recaptcha'; var recaptcha_response=eval('grecaptcha.getResponse(wdcs.' + z + ');'); if(recaptcha_response==false){ jQuery("div[id='results']",form).html(unescape('
Please verify that you are not a robot.
')); return false; }}else if(enable==0){ action='wdc_recaptcha_dis'; recaptcha_response=0; } var recaptcha_data={ 'action': action, 'response': recaptcha_response, 'security':wdc_ajax.wdc_nonce }; jQuery("div[id='results']",form).css('display','none'); jQuery("div[id='loading']",form).css('display','inline'); jQuery.ajax({ type: "POST", url: wdc_ajax.ajaxurl, action: action, data: recaptcha_data, success: function(response_y){ var y=JSON.parse(response_y); if(y.success==false&&y["error-codes"]==''){ jQuery("div[id='loading']",form).css('display','none'); jQuery("div[id='results']",form).html(unescape('
Please verify that you are not a robot.
')); eval('grecaptcha.reset(wdcs.' + z + ');'); return false; }else if(y.success==false&&y["error-codes"]=='missing-input-secret'){ jQuery("div[id='loading']",form).css('display','none'); jQuery("div[id='results']",form).html(unescape('

The secret parameter is missing.

')); eval('grecaptcha.reset(wdcs.' + z + ');'); return false; }else if(y.success==false&&y["error-codes"]=='invalid-input-secret'){ jQuery("div[id='loading']",form).css('display','none'); jQuery("div[id='results']",form).html(unescape('

The secret parameter is invalid or malformed.

')); eval('grecaptcha.reset(wdcs.' + z + ');'); return false; }else if(y.success==false&&y["error-codes"]=='missing-input-response'){ jQuery("div[id='loading']",form).css('display','none'); jQuery("div[id='results']",form).html(unescape('

The response parameter is missing.

')); eval('grecaptcha.reset(wdcs.' + z + ');'); return false; }else if(y.success==false&&y["error-codes"]=='invalid-input-response'){ jQuery("div[id='loading']",form).css('display','none'); jQuery("div[id='results']",form).html(unescape('

The response parameter is invalid or malformed.

')); eval('grecaptcha.reset(wdcs.' + z + ');'); return false; } if(enable > 0){ eval('grecaptcha.reset(wdcs.' + z + ');'); } var domain=jQuery("input[name='domain']",form).val(); var item_id=jQuery("input[name='item_id']",form).val(); var tld=jQuery("input[name='tld']",form).val(); jQuery("div[id='results']",form).css('display','none'); jQuery("div[id='results']",form).html(''); jQuery("div[id='loading']",form).css('display','inline'); jQuery("#Submit",form).prop("disabled", true); var data={ 'action': 'wdc_display', 'domain': domain, 'item_id': item_id, 'tld': tld, 'security':wdc_ajax.wdc_nonce }; jQuery.post(wdc_ajax.ajaxurl, data, function(response){ jQuery("div[id='results']",form).css('display','block'); jQuery("div[id='loading']",form).css('display','none'); jQuery("#Submit",form).removeAttr('disabled'); jQuery("div[id='results']",form).html(unescape(response)); }); return false; }}); return false; }); }); jQuery('#Search').keypress(function (e){ if(e.keyCode===8){ return true; } var regex=new RegExp("^[a-zA-Z0-9\-\.]+$"); var str=String.fromCharCode(!e.charCode ? e.which:e.charCode); if(regex.test(str)){ return true; } if(e.which==13){ jQuery(this).submit(); return false; } e.preventDefault(); return false; }); !function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;o/g,">").replace(/"/g,""").replace(/'/g,"'")}r.instances={},r.getInstance=function(t){return r.instances[t]},r._buttonsInit=function(t){var c=this;function e(t){var e,n,o=c.instances[t],a=(o.canvas,o.name),i=o.settings,s="",l={},u="";for(n in i.buttons&&(u=","+i.buttons+","),edButtons)edButtons[n]&&(e=edButtons[n].id,u&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+e+",")&&-1===u.indexOf(","+e+",")||edButtons[n].instance&&edButtons[n].instance!==t||(l[e]=edButtons[n],edButtons[n].html&&(s+=edButtons[n].html(a+"_"))));u&&-1!==u.indexOf(",dfw,")&&(l.dfw=new r.DFWButton,s+=l.dfw.html(a+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(l.textdirection=new r.TextDirectionButton,s+=l.textdirection.html(a+"_")),o.toolbar.innerHTML=s,o.theButtons=l,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[o])}if(t)e(t);else for(t in c.instances)e(t);c.buttonsInitDone=!0},r.addButton=function(t,e,n,o,a,i,s,l,u){var c;if(t&&e){if(s=s||0,o=o||"",u=u||{},"function"==typeof n)(c=new r.Button(t,e,a,i,l,u)).callback=n;else{if("string"!=typeof n)return;c=new r.TagButton(t,e,n,o,a,i,l,u)}if(-1===s)return c;if(0":"dfw"===this.id?(e=t&&t.isActive()?"":' disabled="disabled"','"):'"},r.Button.prototype.callback=function(){},r.TagButton=function(t,e,n,o,a,i,s,l){r.Button.call(this,t,e,a,i,s,l),this.tagStart=n,this.tagEnd=o},r.TagButton.prototype=new r.Button,r.TagButton.prototype.openTag=function(t,e){e.openTags||(e.openTags=[]),this.tagEnd&&(e.openTags.push(this.id),t.value="/"+t.value,this.attr.ariaLabelClose&&t.setAttribute("aria-label",this.attr.ariaLabelClose))},r.TagButton.prototype.closeTag=function(t,e){var n=this.isOpen(e);!1!==n&&e.openTags.splice(n,1),t.value=this.display,this.attr.ariaLabel&&t.setAttribute("aria-label",this.attr.ariaLabel)},r.TagButton.prototype.isOpen=function(t){var e=0,n=!1;if(t.openTags)for(;!1===n&&e","","","",t)},r.LinkButton.prototype=new r.TagButton,r.LinkButton.prototype.callback=function(t,e,n,o){"undefined"==typeof wpLink?(o=o||"http://",!1===this.isOpen(n)?(o=prompt(quicktagsL10n.enterURL,o))&&(this.tagStart='',r.TagButton.prototype.callback.call(this,t,e,n)):r.TagButton.prototype.callback.call(this,t,e,n)):wpLink.open(n.id)},r.ImgButton=function(){var t={ariaLabel:quicktagsL10n.image};r.TagButton.call(this,"img","img","","","","","",t)},r.ImgButton.prototype=new r.TagButton,r.ImgButton.prototype.callback=function(t,e,n,o){o=o||"http://";var a=prompt(quicktagsL10n.enterImageURL,o);a&&(o=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart=''+o+'',r.TagButton.prototype.callback.call(this,t,e,n))},r.DFWButton=function(){r.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},r.DFWButton.prototype=new r.Button,r.DFWButton.prototype.callback=function(){var t;(t=window.wp)&&t.editor&&t.editor.dfw&&window.wp.editor.dfw.toggle()},r.TextDirectionButton=function(){r.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},r.TextDirectionButton.prototype=new r.Button,r.TextDirectionButton.prototype.callback=function(t,e){var n="rtl"===document.getElementsByTagName("html")[0].dir,o=e.style.direction;e.style.direction="rtl"===(o=o||(n?"rtl":"ltr"))?"ltr":"rtl",e.focus()},edButtons[10]=new r.TagButton("strong","b","","","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new r.TagButton("em","i","","","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new r.LinkButton,edButtons[40]=new r.TagButton("block","b-quote","\n\n
","
\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new r.TagButton("del","del",'',"","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new r.TagButton("ins","ins",'',"","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new r.ImgButton,edButtons[80]=new r.TagButton("ul","ul","
    \n","
\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new r.TagButton("ol","ol","
    \n","
\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new r.TagButton("li","li","\t
  • ","
  • \n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new r.TagButton("code","code","","","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new r.TagButton("more","more","\x3c!--more--\x3e\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new r.CloseButton}(),window.quicktags=function(t){return new window.QTags(t)},window.edInsertContent=function(t,e){return window.QTags.insertContent(e)},window.edButton=function(t,e,n,o,a){return window.QTags.addButton(t,e,n,o,a,"",-1)}; !function(r,l,o){var c,e,t,n,i,h=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i,u=/^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i,p={},a={},s="ontouchend"in document;function d(){return c?c.$('a[data-wplink-edit="true"]'):null}window.wpLink={timeToTriggerRiver:150,minRiverAJAXDuration:200,riverBottomThreshold:5,keySensitivity:100,lastSearch:"",textarea:"",modalOpen:!1,init:function(){p.wrap=r("#wp-link-wrap"),p.dialog=r("#wp-link"),p.backdrop=r("#wp-link-backdrop"),p.submit=r("#wp-link-submit"),p.close=r("#wp-link-close"),p.text=r("#wp-link-text"),p.url=r("#wp-link-url"),p.nonce=r("#_ajax_linking_nonce"),p.openInNewTab=r("#wp-link-target"),p.search=r("#wp-link-search"),a.search=new t(r("#search-results")),a.recent=new t(r("#most-recent-results")),a.elements=p.dialog.find(".query-results"),p.queryNotice=r("#query-notice-message"),p.queryNoticeTextDefault=p.queryNotice.find(".query-notice-default"),p.queryNoticeTextHint=p.queryNotice.find(".query-notice-hint"),p.dialog.keydown(wpLink.keydown),p.dialog.keyup(wpLink.keyup),p.submit.click(function(e){e.preventDefault(),wpLink.update()}),p.close.add(p.backdrop).add("#wp-link-cancel button").click(function(e){e.preventDefault(),wpLink.close()}),a.elements.on("river-select",wpLink.updateFields),p.search.on("focus.wplink",function(){p.queryNoticeTextDefault.hide(),p.queryNoticeTextHint.removeClass("screen-reader-text").show()}).on("blur.wplink",function(){p.queryNoticeTextDefault.show(),p.queryNoticeTextHint.addClass("screen-reader-text").hide()}),p.search.on("keyup input",function(){window.clearTimeout(e),e=window.setTimeout(function(){wpLink.searchInternalLinks()},500)}),p.url.on("paste",function(){setTimeout(wpLink.correctURL,0)}),p.url.on("blur",wpLink.correctURL)},correctURL:function(){var e=r.trim(p.url.val());e&&i!==e&&!/^(?:[a-z]+:|#|\?|\.|\/)/.test(e)&&(p.url.val("http://"+e),i=e)},open:function(e,t,n){var i=r(document.body);i.addClass("modal-open"),wpLink.modalOpen=!0,wpLink.range=null,e&&(window.wpActiveEditor=e),window.wpActiveEditor&&(this.textarea=r("#"+window.wpActiveEditor).get(0),void 0!==window.tinymce&&(i.append(p.backdrop,p.wrap),i=window.tinymce.get(window.wpActiveEditor),c=i&&!i.isHidden()?i:null),!wpLink.isMCE()&&document.selection&&(this.textarea.focus(),this.range=document.selection.createRange()),p.wrap.show(),p.backdrop.show(),wpLink.refresh(t,n),r(document).trigger("wplink-open",p.wrap))},isMCE:function(){return c&&!c.isHidden()},refresh:function(e,t){a.search.refresh(),a.recent.refresh(),wpLink.isMCE()?wpLink.mceRefresh(e,t):(p.wrap.hasClass("has-text-field")||p.wrap.addClass("has-text-field"),document.selection?document.selection.createRange().text:void 0!==this.textarea.selectionStart&&this.textarea.selectionStart!==this.textarea.selectionEnd&&(t=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd)||t||""),p.text.val(t),wpLink.setDefaultValues()),s?p.url.focus().blur():window.setTimeout(function(){p.url[0].select(),p.url.focus()}),a.recent.ul.children().length||a.recent.ajax(),i=p.url.val().replace(/^http:\/\//,"")},hasSelectedText:function(e){var t,n,i,a=c.selection.getContent();if(/]+>[^<]+<\/a>$/.test(a)||-1===a.indexOf("href=")))return!1;if(e.length){if(!(n=e[0].childNodes)||!n.length)return!1;for(i=n.length-1;0<=i;i--)if(3!=(t=n[i]).nodeType&&!window.tinymce.dom.BookmarkManager.isBookmarkNode(t))return!1}return!0},mceRefresh:function(e,t){var n,i,a=d(),s=this.hasSelectedText(a);a.length?(n=a.text(),i=a.attr("href"),r.trim(n)||(n=t||""),"_wp_link_placeholder"!==(i=e&&(u.test(e)||h.test(e))?e:i)?(p.url.val(i),p.openInNewTab.prop("checked","_blank"===a.attr("target")),p.submit.val(l.update)):this.setDefaultValues(n),e&&e!==i?p.search.val(e):p.search.val(""),window.setTimeout(function(){wpLink.searchInternalLinks()})):(n=c.selection.getContent({format:"text"})||t||"",this.setDefaultValues(n)),s?(p.text.val(n),p.wrap.addClass("has-text-field")):(p.text.val(""),p.wrap.removeClass("has-text-field"))},close:function(e){r(document.body).removeClass("modal-open"),wpLink.modalOpen=!1,"noReset"!==e&&(wpLink.isMCE()?(c.plugins.wplink&&c.plugins.wplink.close(),c.focus()):(wpLink.textarea.focus(),wpLink.range&&(wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select()))),p.backdrop.hide(),p.wrap.hide(),i=!1,r(document).trigger("wplink-close",p.wrap)},getAttrs:function(){return wpLink.correctURL(),{href:r.trim(p.url.val()),target:p.openInNewTab.prop("checked")?"_blank":null}},buildHtml:function(e){var t='
    "},update:function(){wpLink.isMCE()?wpLink.mceUpdate():wpLink.htmlUpdate()},htmlUpdate:function(){var e,t,n,i,a,s=wpLink.textarea;s&&(n=wpLink.getAttrs(),i=p.text.val(),(a=document.createElement("a")).href=n.href,"javascript:"!==a.protocol&&"data:"!==a.protocol||(n.href=""),n.href&&(e=wpLink.buildHtml(n),document.selection&&wpLink.range?(s.focus(),wpLink.range.text=e+(i||wpLink.range.text)+"",wpLink.range.moveToBookmark(wpLink.range.getBookmark()),wpLink.range.select(),wpLink.range=null):void 0!==s.selectionStart&&(t=s.selectionStart,a=s.selectionEnd,i=t+(e=e+(n=i||s.value.substring(t,a))+"").length,t!==a||n||(i-=4),s.value=s.value.substring(0,t)+e+s.value.substring(a,s.value.length),s.selectionStart=s.selectionEnd=i),wpLink.close(),s.focus(),r(s).trigger("change"),o.a11y.speak(l.linkInserted)))},mceUpdate:function(){var e,t,n,i=wpLink.getAttrs(),a=document.createElement("a");if(a.href=i.href,"javascript:"!==a.protocol&&"data:"!==a.protocol||(i.href=""),!i.href)return c.execCommand ("unlink"),void wpLink.close();e=d(),c.undoManager.transact(function(){e.length||(c.execCommand ("mceInsertLink",!1,{href:"_wp_link_placeholder","data-wp-temp-link":1}),e=c.$('a[data-wp-temp-link="1"]').removeAttr("data-wp-temp-link"),n=r.trim(e.text())),e.length?(p.wrap.hasClass("has-text-field")&&((t=p.text.val())?e.text(t):n||e.text(i.href)),i["data-wplink-edit"]=null,i["data-mce-href"]=i.href,e.attr(i)):c.execCommand ("unlink")}),wpLink.close("noReset"),c.focus(),e.length&&(c.selection.select(e[0]),c.plugins.wplink&&c.plugins.wplink.checkLink(e[0])),c.nodeChanged(),o.a11y.speak(l.linkInserted)},updateFields:function(e,t){p.url.val(t.children(".item-permalink").val()),p.wrap.hasClass("has-text-field")&&!p.text.val()&&p.text.val(t.children(".item-title").text())},getUrlFromSelection:function(e){return e||(this.isMCE()?e=c.selection.getContent({format:"text"}):document.selection&&wpLink.range?e=wpLink.range.text:void 0!==this.textarea.selectionStart&&(e=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd))),(e=r.trim(e))&&h.test(e)?"mailto:"+e:e&&u.test(e)?e.replace(/&|�?38;/gi,"&"):""},setDefaultValues:function(e){p.url.val(this.getUrlFromSelection(e)),p.search.val(""),wpLink.searchInternalLinks(),p.submit.val(l.save)},searchInternalLinks:function(){var e,t=p.search.val()||"";2':"
  • ",i+='',i+='',i+=this.title||l.noTitle,i+=''+this.info+"
  • ",a=!a}):t&&(i+='
  • '+l.noMatchesFound+"
  • "),this.ul[t?"html":"append"](i)},maybeLoad:function(){var n=this,i=this.element,e=i.scrollTop()+i.height();!this.query.ready()||e