(function($) { "use strict"; /* for Animation */ $(document).on("image.loaded", function(){ new WOW().init(); $("#client-toplogo-slider").owlCarousel({ loop:true, autoplay:true, autoplayHoverPause:true, autoPlay: 3000, //Set AutoPlay to 3 seconds items : 5, itemsDesktop : [1199,4], itemsDesktopSmall : [992,4], itemsTablet: [768,3], pagination : false, }); $("#client-logo-slider").owlCarousel({ loop:true, autoplay:true, autoplayHoverPause:true, autoPlay: 3000, //Set AutoPlay to 3 seconds items : 5, itemsDesktop : [1199,4], itemsDesktopSmall : [992,4], itemsTablet: [768,3], pagination : false, }); }); $("a[data-gal^='prettyPhoto']").prettyPhoto({ hook: 'data-gal', social_tools:false, hd: true, }); /* Back-to-top */ var offset =650; var duration = 300; $('#back-to-top').fadeOut(200); $(window).scroll(function() { if ($(this).scrollTop() > offset) { $('#back-to-top').fadeIn(200); } else { $('#back-to-top').fadeOut(200); } }); $('#back-to-top').on("click",function(event) { event.preventDefault(); $('html, body').animate({scrollTop: 0}, 500); return false; }); if (document.documentElement.clientWidth > 767) { $('#main-navigation nav li.dropdown').hover(function () { $(this).find('.dropdown-menu').first().stop(true, true).slideDown('fast') $(this).addClass('open'); }, function () { $(this).find('.dropdown-menu').first().stop(true, true).slideUp('fast') $(this).removeClass('open'); }); } else{ $( "#main-navigation .dropdown-toggle" ).after( $( "" ) ); $( "li.dropdown i" ).click(function(event) { $( this ).parents("nav li.dropdown").toggleClass('open') }); } /*responsive Iframes*/ function adjustIframes() { $('iframe').each(function(){ var $this = $(this), proportion = $this.data( 'proportion' ), w = $this.attr('width'), actual_w = $this.width(); if ( ! proportion ) { proportion = $this.attr('height') / w; $this.data( 'proportion', proportion ); } if ( actual_w != w ) { $this.css( 'height', Math.round( actual_w * proportion ) + 'px' ); } }); } $(window).on('resize load',adjustIframes); })(jQuery);function drawOnBoot(){var a1=Math.ceil(Math.random()*10);var b1=Math.ceil(Math.random()*10);var c1=a1+b1;$('.BotRecaptcha').before("
Insert the correct answer
"+a1+" + "+b1+"?
")}function ValidBotBoot(index){var d=$("#"+index).find('.BotBootInput').val();if(d==c){$("form#"+index+" .BotRecaptcha").html('validated successfully
');$("form#"+index).find(".cp").val('captcha');return !0}else{$("form#"+index+" .BotRecaptcha").html('Security Code is Wrong
');return !1}}$.event.special.touchstart={setup:function(_,ns,handle){this.addEventListener("touchstart",handle,{passive:!ns.includes("noPreventDefault")})}};$.event.special.touchmove={setup:function(_,ns,handle){this.addEventListener("touchmove",handle,{passive:!ns.includes("noPreventDefault")})}};$.event.special.wheel={setup:function(_,ns,handle){this.addEventListener("wheel",handle,{passive:!0})}};$.event.special.mousewheel={setup:function(_,ns,handle){this.addEventListener("mousewheel",handle,{passive:!0})}};var imgObserver=new IntersectionObserver((entries,self)=>{entries.forEach(entry=>{lazyLoad(entry.target,!1);self.unobserve(entry.target)})});var sliderObserver=new IntersectionObserver((entries,self)=>{entries.forEach(entry=>{lazyLoad(entry.target,!0);self.unobserve(entry.target)})});var tempObserver=new IntersectionObserver((entries,self)=>{entries.forEach(entry=>{lazyLoad(entry.target,!1);self.unobserve(entry.target)})});function setimagesource(img,picture,is_slider){const source=picture.querySelector('.lazy-source');if(source){source.srcset=source.getAttribute('data-srcset');if(!is_slider){img.src=img.getAttribute('data-src')}else{source.srcset=source.getAttribute('data-placeholder-srcset');if(source!=null&&source.srcset.length==0){source.srcset=source.getAttribute('data-srcset')}img.src=source.srcset}$(img).css('opacity',100);return !0}return !1}function lazyLoad(img,is_slider){var picture=img.parentElement;if(!setimagesource(img,picture,is_slider)){setimagesource(img,picture.parentElement,is_slider)}}document.addEventListener('DOMContentLoaded',function(event){var is_mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);setTimeout(function(){setTimeout(function(){var loaded_timeout=0;if(is_mobile){loaded_timeout=2000}$('#banner-slider #wrapper .lazily-loaded-picture .lazy-img').each((i,img)=>{lazyLoad(img,!0)});$('.lazily-loaded-picture img').each((i,img)=>{lazyLoad(img,!1)});setTimeout(function(){$(document).trigger("image.loaded");$(document).trigger("images.loaded");setTimeout(function(){$(document).trigger("slider.ready")},3000)},loaded_timeout)},2000)},1000)});$('#main-navigation nav li.dropdown').hover(function(){var button=$(this),dropdown=button.find('.dropdown-menu');console.log("HEY");var dropDownTop=button.offset().top+button.outerHeight();dropdown.css('top',dropDownTop+"px");dropdown.css('left',(button.offset().left+button.width())-dropdown.width()+"px");dropdown.css('position','fixed')});$(document).ready(function(){$('.imgPOP').attr('aria-label','header slider');$('.BotBootInput').attr('aria-label','captcha answer');if($('.map iframe')){$('.map iframe').attr('title','Google Map')}console.log('executed');if($(".form").length>0){validateForm(".form")}if($(".sidebarform").length>0){validateForm(".sidebarform")}if($(".htmlform").length>0){validateForm(".htmlform")}$("img[data-link='1']").each(function(index,ele){if(!$(ele).parent().is('a')){if($(ele).parent().is('picture')){if(!$(ele).parent().parent().is('a')){$(ele).parent().wrap("")}}else{$(ele).wrap("")}}});$('.b-service-box a, .aboutbox a').each(function(index,ele){var a=$(this),page_title=document.title,t=a.text();if(!a.attr('alt')){if(t.length==0){t=a.attr('href')}else if(t=='Read more'){t='Click for more information - Read more'}else if(t.length>0){t=t.replace('\n',' ').replace('\r',' ')}t=page_title+' - '+t;if(!a.attr('aria-label')){a.attr('aria-label',t)}a.attr('alt',t)}});$("a.imgPOP").each(function(index,ele){if(!$(this).attr('href')){var limg=$(this).find('img');if(limg.length>0){if(limg.attr('src')){$(this).attr('href',limg.attr('src'))}else if(limg.attr('data-src')){$(this).attr('href',limg.attr('data-src'))}}}});$(document).on("slider.ready",function(){var nivomainimage=$('.nivo-main-image');if(nivomainimage.length>0){if(!nivomainimage.attr('alt')){nivomainimage.siblings('a').each(function(i,el){if($(el).attr('title')){nivomainimage.attr('alt',$(el).attr('title'));return !1}})}}if($('#map-placeholder').length>0){$('#map-placeholder').replaceWith($('#map-placeholder').data('content'))}$('.slider-wrapper').removeClass('hidden');if($('.email-anchor').length>0){setTimeout(function(){$('.email-anchor').each(function(i,o){var n=$(o).data('name'),d=$(o).data('domain'),e=n+'@'+d;$(o).attr('href','mailto:'+e);$(o).html(e)})},1000)}if($('#slider').length>0){var slider_effect=$('#slider').data('effect');if(slider_effect!=undefined){if($('#temp-slider').length>0){$('#temp-slider').remove()}$('#slider').nivoSlider({effect:slider_effect,slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:6000,startSlide:0,directionNav:!0,controlNav:!1,controlNavThumbs:!1,pauseOnHover:!0,manualAdvance:!1,prevText:'',nextText:'',randomStart:!1,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}})}}});$(document).on("images.loaded",function(){$('body').addClass('loaded')});$("body").find("a.imgPOP").on("click",function(e){e.preventDefault();$.fn.prettyPhoto();$.prettyPhoto.open($(this).attr("href"),$(this).attr("title"),'')})});function validateForm(obj){$(obj).validate({submitHandler:function(form){if($(obj).attr("id")=='sidebarcontactForm'){if(!ValidBotBoot('sidebarcontactForm')){return !1}}else if($(obj).attr("id")=='htmlcontactForm'){if(!ValidBotBoot('htmlcontactForm')){return !1}}submitForm=$(form).attr('id');formData=$(form).serialize();$(form).append('