1"use strict"; 2function thegov_accordion_init(){ 3var item=jQuery('.wgl-accordion'); 4item.each(function(){ 5var header=jQuery(this).find('.wgl-accordion_header'); 6var content=jQuery(this).find('.wgl-accordion_content'); 7var acc_type=jQuery(this).data('type'); 8var speed=400; 9header.off("click"); 10header.each(function(){ 11if(jQuery(this).data('default')=='yes'){ 12jQuery(this).addClass('active'); 13jQuery(this).next().slideDown(speed); 14}}) 15header.on('click', function(e){ 16e.preventDefault(); 17var $this=jQuery(this); 18if(acc_type=='accordion'){ 19$this.toggleClass('active'); 20$this.next().slideToggle(speed); 21content.not($this.next()).slideUp(speed); 22header.not($this).removeClass('active'); 23}else if(acc_type=='toggle'){ 24$this.toggleClass('active'); 25$this.next().slideToggle(speed); 26}}) 27}) 28} 29function thegov_services_accordion_init(){ 30var item_module=jQuery('.wgl-accordion-services'); 31item_module.each(function(){ 32var item=jQuery(this).find('.wgl-services_item'); 33jQuery(this).find('.wgl-services_item:first-child').addClass('active'); 34item.on('mouseover', function(e){ 35jQuery(this).addClass('active').siblings().removeClass('active'); 36}) 37}) 38} 39(function ($){ 40jQuery(document).ready(function (){ 41thegov_ajax_load(); 42}); 43function thegov_ajax_load (){ 44var i, section; 45var sections=document.getElementsByClassName('wgl_cpt_section'); 46for(i=0; i < sections.length; i++){ 47section=sections[i]; 48thegov_ajax_init(section); 49}} 50var wait_load=false; 51var offset_items=0; 52var infinity_item; 53function thegov_ajax_query(grid,section, request_data){ 54if(wait_load) return; 55wait_load=true; 56request_data['offset_items']=offset_items; 57request_data['items_load']=request_data.items_load; 58if(request_data.query&&request_data.query.request){ 59delete request_data.query.request; 60} 61$.post(wgl_core.ajaxurl, { 62'action':'wgl_ajax', 63'data':request_data 64}, function(response, status){ 65var resp, new_items, load_more_hidden, count_products; 66resp=document.createElement("div"); 67resp.innerHTML=response; 68new_items=$(".item", resp); 69count_products=$(".woocommerce-result-count", resp); 70load_more_hidden=$(".hidden_load_more", resp); 71if(load_more_hidden.length){ 72jQuery(section).find('.load_more_wrapper').fadeOut(300, function(){ $(this).remove(); }); 73}else{ 74jQuery(section).find('.load_more_wrapper .load_more_item').removeClass('loading'); 75} 76jQuery(section).find('.woocommerce-result-count').html(jQuery(count_products).html()); 77if($(grid).hasClass('carousel')){ 78$(grid).find('.slick-track').append(new_items); 79$(grid).find('.slick-dots').remove(); 80$(grid).find('.wgl-carousel_slick').slick('reinit'); 81} 82else if($(grid).hasClass('grid')){ 83new_items=new_items.hide();
84$(grid).append(new_items); 85new_items.fadeIn('slow'); 86}else{ 87var items=jQuery(new_items); 88jQuery(grid).imagesLoaded().always(function(){ 89jQuery(grid).append(items).isotope('appended', items).isotope("reloadItems"); 90setTimeout(function(){ 91jQuery(grid).isotope('layout'); 92thegov_scroll_animation(); 93updateFilter(); 94}, 500); 95}); 96} 97if(typeof jQuery.fn.waypoint==="function"){ 98jQuery(grid).find(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").waypoint(function(){ 99jQuery(this).addClass("wpb_start_animation animated") 100}, { offset: "100%"}); 101} 102if(typeof jarallax==='function'){ 103thegov_parallax_video(); 104}else{ 105jQuery.getScript(wgl_core.JarallaxPluginVideo, function(){ 106jQuery.getScript(wgl_core.JarallaxPlugin, function(){}).always(function(s, Status){ 107jQuery(grid).find('.parallax-video').each(function(){ 108jQuery(this).jarallax({ 109loop: true, 110speed: 1, 111videoSrc: jQuery(this).data('video'), 112videoStartTime: jQuery(this).data('start'), 113videoEndTime: jQuery(this).data('end'), 114}); 115}); 116}); 117}); 118} 119if(jQuery(grid).find('.wgl-carousel_slick').size() > 0){ 120jQuery.getScript(wgl_core.slickSlider).always(function(s, Status){ 121jQuery(grid).find('.wgl-carousel_slick').each(function(){ 122destroyCarousel(jQuery(this)); 123slickCarousel(jQuery(this)); 124if(jQuery(grid).hasClass('blog_masonry')){ 125jQuery(grid).isotope('layout'); 126}}); 127}); 128} 129thegov_scroll_animation(); 130offset_items +=parseInt(request_data.items_load); 131wait_load=false; 132}); 133} 134function thegov_ajax_init(section){ 135var grid, form, data_field, data, request_data, load_more; 136if(section==undefined) return; 137grid=section.getElementsByClassName('container-grid'); 138if(!grid.length) return; 139grid=grid[0]; 140form=section.getElementsByClassName('posts_grid_ajax'); 141if(!form.length) return; 142form=form[0]; 143data_field=form.getElementsByClassName('ajax_data'); 144if(!data_field.length) return; 145data_field=data_field[0]; 146data=data_field.value; 147data=JSON.parse(data); 148request_data=data; 149offset_items +=request_data.post_count; 150infinity_item=section.getElementsByClassName('infinity_item'); 151if(infinity_item.length){ 152infinity_item=infinity_item[0]; 153if(jQuery(infinity_item).is_visible()){ 154thegov_ajax_query(grid, section, request_data); 155} 156var lastScrollTop=0; 157jQuery(window).on('resize scroll', function(){ 158if(jQuery(infinity_item).is_visible()){ 159var st=jQuery(this).scrollTop(); 160if(st > lastScrollTop){ 161thegov_ajax_query(grid, section, request_data); 162} 163lastScrollTop=st; 164}}); 165} 166load_more=section.getElementsByClassName('load_more_item'); 167if(load_more.length){ 168load_more=load_more[0]; 169load_more.addEventListener('click', function(e){ 170e.preventDefault(); 171jQuery(this).addClass('loading'); 172thegov_ajax_query(grid, section, request_data) 173}, false); 174}} 175function slickCarousel(grid){ 176jQuery(grid).slick({ 177draggable: true, 178fade: true, 179speed: 900, 180cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 181touchThreshold: 100 182}); 183} 184function destroyCarousel(grid){ 185if(jQuery(grid).hasClass('slick-initialized')){ 186jQuery(grid).slick('destroy'); 187}} 188function updateFilter(){ 189jQuery(".isotope-filter a").each(function(){ 190var data_filter=this.getAttribute("data-filter"); 191var num=jQuery(this).closest('.wgl-portfolio').find('.wgl-portfolio-list_item').filter(data_filter).length; 192jQuery(this).find('.number_filter').text(num); 193}); 194}}(jQuery)); 195function thegov_scroll_animation(){ 196var portfolio=jQuery('.wgl-portfolio_container'); 197var shop=jQuery('.wgl-products.appear-animation'); 198(function($){ 199var docElem=window.document.documentElement; 200function getViewportH(){ 201var client=docElem['clientHeight'], 202inner=window['innerHeight']; 203if(client < inner) 204return inner; 205else 206return client; 207} 208function scrollY(){ 209return window.pageYOffset||docElem.scrollTop; 210} 211function getOffset(el){ 212var offsetTop=0, offsetLeft=0; 213do { 214if(!isNaN(el.offsetTop) ){ 215offsetTop +=el.offsetTop; 216} 217if(!isNaN(el.offsetLeft) ){ 218offsetLeft +=el.offsetLeft; 219}} while(el=el.offsetParent) 220return { 221top:offsetTop, 222left:offsetLeft 223}} 224function inViewport(el, h){ 225var elH=el.offsetHeight, 226scrolled=scrollY(), 227viewed=scrolled + getViewportH(), 228elTop=getOffset(el).top, 229elBottom=elTop + elH, 230h=h||0; 231return (elTop + elH * h) <=viewed&&(elBottom - elH * h) >=scrolled; 232} 233function extend(a, b){ 234for(var key in b){ 235if(b.hasOwnProperty(key) ){ 236a[key]=b[key]; 237}} 238return a; 239} 240function AnimOnScroll(el, options){ 241this.el=el; 242this.options=extend(this.defaults, options); 243if(this.el.length){ 244this._init(); 245}} 246AnimOnScroll.prototype={ 247defaults:{ 248viewportFactor:0 249}, 250_init:function(){ 251this.items=Array.prototype.slice.call(jQuery(this.el).children()); 252this.itemsCount=this.items.length; 253this.itemsRenderedCount=0; 254this.didScroll=false; 255this.delay=100; 256var self=this; 257if(typeof imagesLoaded==='function'){ 258imagesLoaded(this.el, this._imgLoaded(self)); 259}else{ 260this._imgLoaded(self); 261}}, 262_imgLoaded:function(self){ 263var interval;
264self.items.forEach(function(el, i){ 265if(inViewport(el) ){ 266self._checkTotalRendered(); 267if(!jQuery(el).hasClass('show')&&!jQuery(el).hasClass('animate')&&inViewport(el, self.options.viewportFactor)){ 268self._item_class(jQuery(el), self.delay, interval); 269self.delay +=200; 270setTimeout(function(){ 271self.delay=100; 272}, 200); 273}} 274}); 275window.addEventListener('scroll', function(){ 276self._onScrollFn(); 277}, false); 278window.addEventListener('resize', function(){ 279self._resizeHandler(); 280}, false); 281}, 282_onScrollFn:function(){ 283var self=this; 284if(!this.didScroll){ 285this.didScroll=true; 286setTimeout(function(){ self._scrollPage(); }, 60); 287}}, 288_item_class:function(item_array, delay, interval){ 289interval=setTimeout(function(){ 290if(item_array.length){ 291jQuery(item_array).addClass('animate'); 292}else{ 293clearTimeout(interval); 294}}, delay); 295}, 296_scrollPage:function(){ 297var self=this; 298var interval; 299this.items.forEach(function(el, i){ 300if(!jQuery(el).hasClass('show')&&!jQuery(el).hasClass('animate')&&inViewport(el, self.options.viewportFactor) ){ 301setTimeout(function(){ 302var perspY=scrollY() + getViewportH() / 2; 303self._checkTotalRendered(); 304self._item_class(jQuery(el), self.delay, interval); 305self.delay +=200; 306setTimeout(function(){ 307self.delay=100; 308}, 200); 309}, 25); 310}}); 311this.didScroll=false; 312}, 313_resizeHandler:function(){ 314var self=this; 315function delayed(){ 316self._scrollPage(); 317self.resizeTimeout=null; 318} 319if(this.resizeTimeout){ 320clearTimeout(this.resizeTimeout); 321} 322this.resizeTimeout=setTimeout(delayed, 1000); 323}, 324_checkTotalRendered:function(){ 325++this.itemsRenderedCount; 326if(this.itemsRenderedCount===this.itemsCount){ 327window.removeEventListener('scroll', this._onScrollFn); 328}} 329} 330window.AnimOnScroll=AnimOnScroll; 331})(jQuery); 332new AnimOnScroll(portfolio, {}); 333new AnimOnScroll(shop, {}); 334} 335function thegov_scroll_up(){ 336(function($){ 337$.fn.goBack=function (options){ 338var defaults={ 339scrollTop: jQuery(window).height(), 340scrollSpeed: 600, 341fadeInSpeed: 1000, 342fadeOutSpeed: 500 343}; 344var options=$.extend(defaults, options); 345var $this=$(this); 346$(window).on('scroll', function (){ 347if($(window).scrollTop() > options.scrollTop){ 348$this.addClass('active'); 349}else{ 350$this.removeClass('active'); 351}}) 352$this.on('click', function (){ 353$('html,body').animate({ 354'scrollTop': 0 355}, options.scrollSpeed) 356}) 357}})(jQuery); 358jQuery('#scroll_up').goBack(); 359}; 360function thegov_blog_masonry_init (){ 361if(jQuery(".blog_masonry").length){ 362var blog_dom=jQuery(".blog_masonry").get(0); 363var $grid=imagesLoaded(blog_dom, function(){ 364setTimeout(function(){ 365jQuery(".blog_masonry").isotope({ 366layoutMode: 'masonry', 367masonry: { 368columnWidth: '.item', 369}, 370itemSelector: '.item', 371percentPosition: true 372}); 373jQuery(window).trigger('resize'); 374}, 250); 375}); 376}} 377function thegov_carousel_slick (){ 378var carousel=jQuery('.wgl-carousel_slick'); 379if(carousel.length!==0){ 380carousel.each(function(item, value){ 381if(jQuery(this).hasClass('slick-initialized')){ 382jQuery(this).slick('destroy'); 383} 384if(jQuery(this).hasClass('fade_slick')){ 385jQuery(this).slick({ 386draggable: true, 387fade: true, 388speed: 900, 389cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', 390touchThreshold: 100 391}); 392}else{ 393jQuery(this).slick({}); 394}}); 395jQuery('.carousel-filter a').on('click', function(e){ 396e.preventDefault(); 397var filterClass=jQuery(this).data('filter'); 398jQuery(this).parent().find('a').removeClass('active'); 399jQuery(this).addClass('active'); 400jQuery(this).closest('.wgl_cpt_section').find ('.wgl-carousel_slick').slick('slickUnfilter'); 401jQuery(this).closest('.wgl_cpt_section').find ('.wgl-carousel_slick').slick('slickFilter', jQuery(filterClass)); 402}); 403}} 404function thegov_circuit_services(){ 405if(jQuery('.thegov_module_circuit_services').length){ 406jQuery('.thegov_module_circuit_services').each(function(){ 407var $circle=jQuery(this).find('.services_item-icon'); 408var agle=360 / $circle.length; 409var agleCounter=-1; 410$circle.each(function(){ 411var $this=jQuery(this); 412jQuery(this).parents('.services_item-wrap:first-child').addClass('active'); 413$this.on('mouseover', function(){ 414jQuery(this).parents('.services_item-wrap').addClass('active').siblings().removeClass('active'); 415}) 416var percentWidth=(100 * parseFloat($this.css('width')) / parseFloat($this.parent().css('width'))); 417var curAgle=agleCounter * agle; 418var radAgle=curAgle * Math.PI / 180; 419var x=(50 + ((50 - (percentWidth / 2)) * Math.cos(radAgle))) - (percentWidth / 2); 420var y=(50 + ((50 - (percentWidth / 2)) * Math.sin(radAgle))) - (percentWidth / 2); 421$this.css({ 422left: x + '%', 423top: y + '%' 424}); 425agleCounter++; 426}); 427}); 428}} 429function thegov_circuit_services_resize (){ 430if(jQuery('.thegov_module_circuit_services').length){ 431setTimeout(function(){ 432jQuery('.thegov_module_circuit_services').each(function(){ 433var $this=jQuery(this); 434var wwidth=$this.width(); 435if(wwidth < 370){ 436$this.removeClass('tablet_resp').addClass('mobile_resp'); 437}else if(wwidth < 460){ 438$this.removeClass('mobile_resp').addClass('tablet_resp'); 439}else{ 440$this.removeClass('tablet_resp mobile_resp'); 441}}); 442}, 1); 443}} 444;(function (factory){ 445var registeredInModuleLoader; 446if(typeof define==='function'&&define.amd){ 447define(factory); 448registeredInModuleLoader=true; 449} 450if(typeof exports==='object'){ 451module.exports=factory(); 452registeredInModuleLoader=true; 453} 454if(!registeredInModuleLoader){ 455var OldCookies=window.Cookies; 456var api=window.Cookies=factory(); 457api.noConflict=function (){ 458window.Cookies=OldCookies; 459return api; 460};}}(function (){ 461function extend (){ 462var i=0; 463var result={}; 464for (; i < arguments.length; i++){ 465var attributes=arguments[ i ]; 466for (var key in attributes){ 467result[key]=attributes[key]; 468}} 469return result; 470} 471function decode (s){ 472return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 473} 474function init (converter){ 475function api(){}
476function set (key, value, attributes){ 477if(typeof document==='undefined'){ 478return; 479} 480attributes=extend({ 481path: '/' 482}, api.defaults, attributes); 483if(typeof attributes.expires==='number'){ 484attributes.expires=new Date(new Date() * 1 + attributes.expires * 864e+5); 485} 486attributes.expires=attributes.expires ? attributes.expires.toUTCString():''; 487try { 488var result=JSON.stringify(value); 489if(/^[\{\[]/.test(result)){ 490value=result; 491}} catch (e){} 492value=converter.write ? 493converter.write(value, key) : 494encodeURIComponent(String(value)) 495.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 496key=encodeURIComponent(String(key)) 497.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 498.replace(/[\(\)]/g, escape); 499var stringifiedAttributes=''; 500for (var attributeName in attributes){ 501if(!attributes[attributeName]){ 502continue; 503} 504stringifiedAttributes +='; ' + attributeName; 505if(attributes[attributeName]===true){ 506continue; 507} 508stringifiedAttributes +='=' + attributes[attributeName].split(';')[0]; 509} 510return (document.cookie=key + '=' + value + stringifiedAttributes); 511} 512function get (key, json){ 513if(typeof document==='undefined'){ 514return; 515} 516var jar={}; 517var cookies=document.cookie ? document.cookie.split('; '):[]; 518var i=0; 519for (; i < cookies.length; i++){ 520var parts=cookies[i].split('='); 521var cookie=parts.slice(1).join('='); 522if(!json&&cookie.charAt(0)==='"'){ 523cookie=cookie.slice(1, -1); 524} 525try { 526var name=decode(parts[0]); 527cookie=(converter.read||converter)(cookie, name) || 528decode(cookie); 529if(json){ 530try { 531cookie=JSON.parse(cookie); 532} catch (e){}} 533jar[name]=cookie; 534if(key===name){ 535break; 536}} catch (e){}} 537return key ? jar[key]:jar; 538} 539api.set=set; 540api.get=function (key){ 541return get(key, false ); 542}; 543api.getJSON=function (key){ 544return get(key, true ); 545}; 546api.remove=function (key, attributes){ 547set(key, '', extend(attributes, { 548expires: -1 549})); 550}; 551api.defaults={}; 552api.withConverter=init; 553return api; 554} 555return init(function (){}); 556})); 557function thegov_countdown_init (){ 558var countdown=jQuery('.wgl-countdown'); 559if(countdown.length!==0){ 560countdown.each(function (){ 561var data_atts=jQuery(this).data('atts'); 562var time=new Date(+data_atts.year, +data_atts.month-1, +data_atts.day, +data_atts.hours, +data_atts.minutes); 563jQuery(this).countdown({ 564until: time, 565padZeroes: true, 566format: data_atts.format ? data_atts.format:'yowdHMS', 567labels: [data_atts.labels[0],data_atts.labels[1],data_atts.labels[2],data_atts.labels[3],data_atts.labels[4],data_atts.labels[5], data_atts.labels[6], data_atts.labels[7]], 568labels1: [data_atts.labels[0],data_atts.labels[1],data_atts.labels[2], data_atts.labels[3], data_atts.labels[4], data_atts.labels[5], data_atts.labels[6], data_atts.labels[7]] 569}); 570}); 571}} 572function thegov_counter_init(){ 573var counters=jQuery('.wgl-counter'); 574if(counters.length){ 575counters.each(function(){ 576var counter=jQuery(this).find('.wgl-counter_value-wrap .wgl-counter_value.value-placeholder'); 577counter.appear(function(){ 578var max=jQuery(this).data('end-value'), 579from=jQuery(this).data('start-value'), 580speed=jQuery(this).data('speed'); 581counter.countTo({ 582from: from, 583to: max, 584speed: speed, 585refreshInterval: 10 586}); 587}); 588}); 589}} 590function thegov_dynamic_styles(){ 591var style=jQuery('#thegov-footer-inline-css'); 592(function($){ 593$.fn.wglAddDynamicStyles=function(){ 594if(this.length===0){ return this; } 595return this.each(function (){ 596var $style='', 597self=jQuery(this); 598var init=function(){ 599$style +=self.text(); 600self.remove(); 601appendStyle(); 602}, 603appendStyle=function(){ 604jQuery('head').append('<style type="text/css">'+$style+'</style>'); 605}; 606init(); 607}); 608};})(jQuery); 609style.wglAddDynamicStyles(); 610} 611function thegov_events_masonry_init (){ 612if(jQuery(".events_masonry").length){ 613var events_dom=jQuery(".events_masonry").get(0); 614var $grid=imagesLoaded(events_dom, function(){ 615jQuery(".events_masonry").isotope({ 616layoutMode: 'masonry', 617masonry: { 618columnWidth: '.item', 619}, 620itemSelector: '.item', 621percentPosition: true 622}); 623jQuery(window).trigger('resize'); 624}); 625}} 626function mobilecheck(){ 627var check=false; 628(function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true})(navigator.userAgent||navigator.vendor||window.opera); 629return check; 630} 631var click=mobilecheck() ? ('ontouchstart' in document.documentElement ? 'touchstart':'click'):'click'; 632function initClickEvent(){ 633click=mobilecheck() ? ('ontouchstart' in document.documentElement ? 'touchstart':'click'):'click'; 634} 635jQuery(window).on('resize', initClickEvent); 636(function($){ 637"use strict"; 638$.fn.countTo=function(options){ 639options=$.extend({}, $.fn.countTo.defaults, options||{}); 640var loops=Math.ceil(options.speed / options.refreshInterval), 641increment=(options.to - options.from) / loops; 642return $(this).each(function(){ 643var _this=this, 644loopCount=0, 645value=options.from, 646interval=setInterval(updateTimer, options.refreshInterval); 647function updateTimer(){ 648value +=increment; 649loopCount++; 650$(_this).html(value.toFixed(options.decimals)); 651if(typeof(options.onUpdate)==='function'){ 652options.onUpdate.call(_this, value); 653} 654if(loopCount >=loops){ 655clearInterval(interval); 656value=options.to; 657if(typeof(options.onComplete)==='function'){ 658options.onComplete.call(_this, value); 659}} 660}}); 661}; 662$.fn.countTo.defaults={ 663from: 0, 664to: 100, 665speed: 1000, 666refreshInterval: 100, 667decimals: 0, 668onUpdate: null, 669onComplete: null 670};})(jQuery); 671function thegov_slick_navigation_init (){ 672jQuery.fn.thegov_slick_navigation=function (){ 673jQuery(this).each(function (){ 674var el=jQuery(this); 675jQuery(this).find('span.left_slick_arrow').on("click", function(){ 676jQuery(this).closest('.wgl_cpt_section').find('.slick-prev').trigger('click'); 677}); 678jQuery(this).find('span.right_slick_arrow').on("click", function(){ 679jQuery(this).closest('.wgl_cpt_section').find('.slick-next').trigger('click'); 680}); 681}); 682}} 683function is_visible_init (){ 684jQuery.fn.is_visible=function (){ 685var elementTop=jQuery(this).offset().top; 686var elementBottom=elementTop + jQuery(this).outerHeight(); 687var viewportTop=jQuery(window).scrollTop(); 688var viewportBottom=viewportTop + jQuery(window).height(); 689return elementBottom > viewportTop&&elementTop < viewportBottom; 690}} 691jQuery(window).load(function(){ 692jQuery('#preloader-wrapper').fadeOut(); 693}); 694function thegov_image_comparison (){ 695var item=jQuery('.wgl-image_comparison.cocoen'); 696if(item.length!==0){ 697item.each(function(){ 698jQuery(this).cocoen(); 699}); 700}} 701function thegov_img_layers(){ 702jQuery('.wgl-image-layers').each(function(){ 703var container=jQuery(this); 704var initImageLayers=function(){
705container.appear(function(){ 706container.addClass('img-layer_animate'); 707},{done:true}) 708} 709initImageLayers(); 710}); 711} 712function thegov_isotope (){ 713if(jQuery(".isotope").length){ 714var portfolio_dom=jQuery(".isotope").get(0); 715var $grid=imagesLoaded(portfolio_dom, function(){ 716var mode=jQuery(".isotope").hasClass('fit_rows') ? 'fitRows':'masonry'; 717setTimeout(function(){ 718jQuery(".isotope").isotope({ 719layoutMode: mode, 720percentPosition: true, 721itemSelector: '.wgl-portfolio-list_item, .item', 722masonry: { 723columnWidth: '.wgl-portfolio-list_item-size, .wgl-portfolio-list_item, .item', 724}}).isotope('layout'); 725jQuery(window).trigger('resize'); 726}, 250); 727}); 728jQuery(".isotope-filter a").each(function(){ 729var data_filter=this.getAttribute("data-filter"); 730var num=jQuery(this).closest('.wgl-portfolio').find('.wgl-portfolio-list_item').filter(data_filter).length; 731jQuery(this).find('.number_filter').text(num); 732}); 733var $filter=jQuery(".isotope-filter a"); 734$filter.on("click", function (e){ 735e.preventDefault(); 736jQuery(this).addClass("active").siblings().removeClass("active"); 737var filterValue=jQuery(this).attr('data-filter'); 738jQuery(this).closest('.wgl_cpt_section').find('.isotope').isotope({ filter: filterValue }); 739}); 740}} 741function thegov_menu_lavalamp(){ 742var lavalamp=jQuery('.menu_line_enable > ul'); 743if(lavalamp.length!==0){ 744lavalamp.each(function(){ 745var $this=jQuery(this); 746$this.lavalamp({ 747easing: 'easeInOutCubic', 748duration: 600, 749}); 750}); 751}} 752(function($, window){ 753var Lavalamp=function(element, options){ 754this.element=$(element).data('lavalamp', this); 755this.options=$.extend({}, this.options, options); 756this.init(); 757}; 758Lavalamp.prototype={ 759options: { 760current: '.current-menu-ancestor,.current-menu-item,.current-category-ancestor,.current-page-ancestor,.current_page_parent', 761items: 'li', 762bubble: '<div class="lavalamp-object"></div>', 763animation: false, 764blur: $.noop, 765focus: $.noop, 766duration: 600, 767}, 768easing: 'ease', 769duration: 700, 770element: null, 771current: null, 772bubble: null, 773_focus: null, 774init: function(){ 775var resizeTimer, 776self=this, 777child=self.element.children('li'); 778this.onWindowResize=function(){ 779if(resizeTimer){ 780clearTimeout(resizeTimer); 781} 782resizeTimer=setTimeout(function(){ 783self.reload(); 784}, 100); 785}; 786$(window).bind('resize.lavalamp', this.onWindowResize); 787$(child).addClass('lavalamp-item'); 788this.element 789.on('mouseenter.lavalamp', '.lavalamp-item' , function(){ 790self.current.each(function(){ 791self.options.blur.call(this, self); 792}); 793self._move($(this)); 794}) 795.on('mouseleave.lavalamp', function(){ 796if(self.current.index(self._focus) < 0){ 797self._focus=null; 798self.current.each(function(){ 799self.options.focus.call(this, self); 800}); 801self._move(self.current); 802}}); 803this.bubble=$.isFunction(this.options.bubble) 804? this.options.bubble.call(this, this.element) 805: $(this.options.bubble).prependTo(this.element); 806self.element.addClass('lavalamp'); 807self.element.find('.lavalamp-object').addClass(self.options.easing); 808this.reload(); 809self.element.addClass("lavalamp_animate") 810}, 811reload: function(){ 812this.current=this.element.children(this.options.current); 813if(this.current.size()===0){ 814this.current=this.element.children().not('.lavalamp-object').eq(0); 815} 816this._move(this.current, false); 817}, 818destroy: function(){ 819if(this.bubble){ 820this.bubble.remove(); 821} 822this.element.unbind('.lavalamp'); 823$(window).unbind('resize.lavalamp', this.onWindowResize); 824}, 825_move: function(el, animate){ 826var pos=el.position(); 827pos.left=pos.left + parseInt(el.children('a').css('paddingLeft')) 828var properties={ 829transform: 'translate('+pos.left+'px,'+pos.top+'px)', 830width: '25px', 831}; 832this._focus=el; 833if(this.bubble.css('opacity')==="0"){ 834this.bubble.css({ 835WebkitTransitionProperty: "opacity", 836msTransitionProperty: "opacity", 837MozTransitionProperty: "opacity", 838OTransitionProperty: "opacity", 839transitionProperty: "opacity", 840WebkitTransitionDuration: '0s', 841msTransitionDuration: '0s', 842MozTransitionDuration: '0s', 843OTransitionDuration: '0s', 844transitionDuration: '0s', 845}); 846}else{ 847this.bubble.css({ 848WebkitTransitionProperty: "all", 849msTransitionProperty: "all", 850MozTransitionProperty: "all", 851OTransitionProperty: "all", 852transitionProperty: "all", 853WebkitTransitionDuration: this.options.duration / 1000 + 's', 854msTransitionDuration: this.options.duration / 1000 + 's', 855MozTransitionDuration: this.options.duration / 1000 + 's', 856OTransitionDuration: this.options.duration / 1000 + 's', 857transitionDuration: this.options.duration / 1000 + 's', 858}) 859} 860this.bubble.css(properties); 861}}; 862$.fn.lavalamp=function(options){ 863if(typeof options==='string'){ 864var instance=$(this).data('lavalamp'); 865return instance[options].apply(instance, Array.prototype.slice.call(arguments, 1)); 866}else{ 867return this.each(function(){ 868var instance=$(this).data('lavalamp'); 869if(instance){ 870$.extend(instance.options, options||{}); 871instance.reload(); 872}else{ 873new Lavalamp(this, options); 874}}); 875}};})(jQuery, window); 876(function($){ 877$(document).on('click', '.sl-button', function(){ 878var button=$(this); 879var post_id=button.attr('data-post-id'); 880var security=button.attr('data-nonce'); 881var iscomment=button.attr('data-iscomment'); 882var allbuttons; 883if(iscomment==='1'){ 884allbuttons=$('.sl-comment-button-'+post_id); 885}else{ 886allbuttons=$('.sl-button-'+post_id); 887} 888var loader=allbuttons.next('#sl-loader'); 889if(post_id!==''){ 890$.ajax({ 891type: 'POST', 892url: wgl_core.ajaxurl, 893data:{ 894action:'thegov_like', 895post_id:post_id, 896nonce:security, 897is_comment:iscomment, 898}, 899beforeSend:function(){ 900loader.html(' <div class="loader">Loading...</div>'); 901}, 902success: function(response){ 903var icon=response.icon; 904var count=response.count; 905allbuttons.html(icon+count); 906if(response.status==='unliked'){ 907var like_text=wgl_core.like; 908allbuttons.prop('title', like_text); 909allbuttons.removeClass('liked'); 910}else{ 911var unlike_text=wgl_core.unlike; 912allbuttons.prop('title', unlike_text); 913allbuttons.addClass('liked'); 914} 915loader.empty(); 916}}); 917} 918return false;
919}); 920})(jQuery); 921function thegov_link_scroll (){ 922jQuery('a.smooth-scroll, .smooth-scroll').on('click', function(event){ 923var href; 924if(this.tagName=='A'){ 925href=jQuery.attr(this, 'href'); 926}else{ 927var that=jQuery(this).find('a'); 928href=jQuery(that).attr('href'); 929} 930jQuery('html, body').animate({ 931scrollTop: jQuery(href).offset().top 932}, 500); 933event.preventDefault(); 934}); 935} 936(function ($){ 937jQuery(document).ready(function (){ 938thegov_ajax_mega_menu_init(); 939}); 940var megaMenuAjax=false; 941var node_str='<div class="mega_menu_wrapper_overlay">'; 942node_str +='<div class="preloader_type preloader_dot">'; 943node_str +='<div class="mega_menu_wrapper_preloader wgl_preloader dot">'; 944node_str +='<span></span>'; 945node_str +='<span></span>'; 946node_str +='<span></span>'; 947node_str +='</div>'; 948node_str +='</div>'; 949node_str +='</div>'; 950function thegov_ajax_mega_menu_init(){ 951var grid, mega_menu_item, mega_menu_item_parent; 952mega_menu_item=document.querySelectorAll('li.mega-menu ul.mega-menu.sub-menu.mega-cat-sub-categories li'); 953mega_menu_item_parent=document.querySelectorAll('li.mega-menu.mega-cat'); 954if(mega_menu_item.length){ 955for (var i=0; i < mega_menu_item.length; i++){ 956(function (i){ 957var grid=mega_menu_item[i].closest('.mega-menu-container').getElementsByClassName('mega-ajax-content'); 958thegov_ajax_mega_menu_event(mega_menu_item[i], grid); 959}(i)); 960}} 961if(mega_menu_item_parent.length){ 962for (var i=0; i < mega_menu_item_parent.length; i++){ 963(function (i){ 964var grid=mega_menu_item_parent[i].getElementsByClassName('mega-ajax-content'); 965thegov_ajax_mega_menu_event(mega_menu_item_parent[i], grid); 966}(i)); 967}} 968} 969function thegov_ajax_mega_menu_event(item, grid){ 970var request_data={}; 971item.addEventListener('mouseenter', function(e){ 972var not_uploaded=true; 973if(!this.classList.contains("mega-menu")){ 974if(this.classList.contains("is-active")&&this.classList.contains("is-uploaded")){ 975return; 976} 977var item_el=this.closest('ul.mega-menu').querySelectorAll('li.menu-item'); 978for (var i=0; i < item_el.length; i++){ 979item_el[i].classList.remove('is-active'); 980} 981this.classList.add("is-active"); 982$(grid).find('.ajax_menu').removeClass('fadeIn-menu').hide(); 983if(! $(grid).find('.loader-overlay').length){ 984$(grid).addClass('is-loading').append(node_str); 985} 986$(grid).find("[data-url='" + this.getAttribute('data-id') + "']").show(400, function(){ 987jQuery(this).addClass('fadeIn-menu'); 988if($(grid).hasClass('is-loading')){ 989$(grid).removeClass('is-loading').find('.mega_menu_wrapper_overlay').remove(); 990}}); 991}else{ 992var item_el=this.querySelectorAll('ul.mega-menu li.menu-item'); 993for (var i=0; i < item_el.length; i++){ 994if(item_el[i].classList.contains('is-active')){ 995$(grid).find("[data-url='" + item_el[i].getAttribute('data-id') + "']").show().addClass('fadeIn-menu'); 996if($(grid).find("[data-url='" + item_el[i].getAttribute('data-id') + "']").length==0){ 997not_uploaded=true; 998}else{ 999not_uploaded=false; 1000}} 1001}} 1002var item_menu=this; 1003if(!this.classList.contains("is-uploaded")&¬_uploaded){ 1004request_data.id=parseInt(this.getAttribute('data-id')); 1005request_data.posts_count=parseInt(this.getAttribute('data-posts-count')); 1006request_data.action='wgl_mega_menu_load_ajax'; 1007e.preventDefault(); 1008if(megaMenuAjax&&megaMenuAjax.readyState!=4){ 1009megaMenuAjax.abort(); 1010} 1011megaMenuAjax=$.ajax({ 1012url:wgl_core.ajaxurl, 1013type: 'post', 1014data: request_data, 1015beforeSend: function(response){ 1016if(! $(grid).find('.loader-overlay').length){ 1017$(grid).addClass('is-loading').append(node_str); 1018}}, 1019success: function(response, status){ 1020item_menu.classList.add('is-uploaded'); 1021var response_container, new_items, identifier, response_wrapper; 1022response_container=document.createElement("div"); 1023response_wrapper=document.createElement("div"); 1024response_wrapper.classList.add("ajax_menu"); 1025response_container.innerHTML=response; 1026identifier=$(".items_id", response_container); 1027response_wrapper.setAttribute('data-url', $(identifier).data('identifier')); 1028new_items=$(response_wrapper).append($('.item', response_container)); 1029$('.ajax_menu').removeClass('fadeIn-menu').hide(); 1030new_items=new_items.hide();
1031$(grid).append(new_items); 1032new_items.show().addClass('fadeIn-menu'); 1033if(typeof jarallax==='function'){ 1034thegov_parallax_video(); 1035}else{ 1036jQuery.getScript(wgl_core.JarallaxPluginVideo, function(){ 1037jQuery.getScript(wgl_core.JarallaxPlugin, function(){ 1038}).always(function(s, Status){ 1039jQuery(grid).find('.parallax-video').each(function(){ 1040jQuery(this).jarallax({ 1041loop: true, 1042speed: 1, 1043videoSrc: jQuery(this).data('video'), 1044videoStartTime: jQuery(this).data('start'), 1045videoEndTime: jQuery(this).data('end'), 1046}); 1047}); 1048}); 1049}); 1050}}, 1051error: function(response){ 1052item_menu.classList.remove('is-uploaded'); 1053}, 1054complete: function(response){ 1055$(grid).removeClass('is-loading').find('.mega_menu_wrapper_overlay').remove(); 1056}, 1057}); 1058}}, false); 1059}}(jQuery)); 1060function thegov_message_anim_init(){ 1061jQuery('body').on('click', '.message_close_button', function(e){ 1062jQuery(this).closest('.thegov_module_message_box.closable').slideUp(350); 1063}) 1064} 1065function thegov_mobile_header(){ 1066var menu=jQuery('.wgl-mobile-header .mobile_nav_wrapper'); 1067(function($){ 1068$.fn.wglMobileMenu=function(options){ 1069var defaults={ 1070"toggleID":".mobile-hamburger-toggle", 1071"switcher":".button_switcher", 1072"back":".back", 1073"overlay":".wgl-menu_overlay", 1074"anchor":".menu-item > a[href*=\\#]" 1075}; 1076if(this.length===0){ return this; } 1077return this.each(function (){ 1078var wglMenu={}, ds=$(this).find('.primary-nav > ul'); 1079var sub_menu=jQuery('.mobile_nav_wrapper .primary-nav > ul ul'); 1080var m_width=jQuery('.mobile_nav_wrapper').data("mobileWidth"); 1081var m_toggle=jQuery('.mobile-hamburger-toggle'); 1082var body=jQuery('body'); 1083var open="is-active", 1084openSubMenu="show_sub_menu", 1085mobile_on="mobile_switch_on", 1086mobile_switcher="button_switcher"; 1087var init=function(){ 1088wglMenu.settings=$.extend({}, defaults, options); 1089createButton(); 1090showMenu(); 1091addPerfectScroll(); 1092}, 1093showMenu=function(){ 1094if(jQuery(window).width() <=m_width){ 1095if(!$('body').hasClass(mobile_on)){ 1096create_nav_mobile_menu(); 1097}}else{ 1098reset_nav_mobile_menu(); 1099}}, 1100create_nav_mobile_menu=function(){ 1101sub_menu.removeClass(openSubMenu); 1102ds.hide().addClass(mobile_on); 1103body.removeClass(mobile_on); 1104}, 1105reset_nav_mobile_menu=function(){ 1106sub_menu.removeClass(openSubMenu); 1107body.removeClass(mobile_on); 1108ds.show().removeClass(mobile_on); 1109m_toggle.removeClass(open); 1110jQuery('.' + mobile_switcher) .removeClass('is-active'); 1111}, 1112createButton=function(){ 1113ds.find('.menu-item-has-children').each(function(){ 1114jQuery(this).find('> a').append('<span class="'+ mobile_switcher +'"></span>'); 1115}); 1116}, 1117addPerfectScroll=function(){ 1118new PerfectScrollbar('#wgl-perfect-container', { 1119wheelSpeed: 6, 1120suppressScrollX: true 1121}); 1122}, 1123toggleMobileMenu=function(e){ 1124ds.toggleClass(openSubMenu); 1125body.toggleClass(mobile_on); 1126}, 1127hideSubMenu=function(e){ 1128if(!jQuery('.button_switcher').is(e.target)){ 1129if(jQuery('body').hasClass(mobile_on)){ 1130jQuery('.mobile_nav_wrapper .menu-item-has-children').find('.sub-menu').stop(true).slideUp(450).removeClass(openSubMenu); 1131jQuery('.mobile_nav_wrapper .menu-item-has-children').find('.button_switcher').removeClass(open); 1132if(jQuery(e.target).closest('.wgl-mobile-header').length){ 1133toggleMobileMenu(); 1134}} 1135}}, 1136showSubMenu=function(e){ 1137e.preventDefault(); 1138var item=jQuery(this).parents('li'); 1139if(!jQuery(this).hasClass(open)){ 1140jQuery('.mobile_nav_wrapper .menu-item-has-children').not(item).find('.sub-menu').stop(true).slideUp(450).removeClass(openSubMenu); 1141jQuery('.mobile_nav_wrapper .menu-item-has-children').not(item).find('.button_switcher').removeClass(open); 1142jQuery('.mobile_nav_wrapper .menu-item-has-children').not(item).find('a[href*=\\#]').removeClass(open); 1143jQuery(this).parent().prev('.sub-menu').stop(true).slideDown(450).addClass(openSubMenu); 1144jQuery(this).parent().next('.sub-menu').stop(true).slideDown(450).addClass(openSubMenu); 1145}else{ 1146jQuery(this).parent().prev('.sub-menu').stop(true).slideUp(450).removeClass(openSubMenu); 1147jQuery(this).parent().next('.sub-menu').stop(true).slideUp(450).removeClass(openSubMenu); 1148} 1149jQuery(this).toggleClass(open); 1150}, 1151eventClose=function(e){ 1152var container=$("#wgl-perfect-container"); 1153if(!container.is(e.target)&&container.has(e.target).length===0){ 1154if($('body').hasClass(mobile_on)){ 1155toggleMobileMenu(); 1156}} 1157}, 1158goBack=function(e){ 1159e.preventDefault(); 1160jQuery(this).closest('.sub-menu').removeClass(openSubMenu); 1161jQuery(this).closest('.sub-menu').prev('a').removeClass(open); 1162jQuery(this).closest('.sub-menu').prev('a').find('.' + mobile_switcher).removeClass(open); 1163}; 1164init(); 1165jQuery(wglMenu.settings.toggleID).on(click, toggleMobileMenu); 1166jQuery(wglMenu.settings.overlay).on(click, eventClose); 1167jQuery(wglMenu.settings.switcher).on(click, showSubMenu); 1168jQuery(wglMenu.settings.anchor).on(click, hideSubMenu); 1169jQuery(wglMenu.settings.back).on(click, goBack); 1170jQuery(window).resize(function(){
1171showMenu(); 1172} 1173); 1174}); 1175};})(jQuery); 1176menu.wglMobileMenu(); 1177} 1178function thegov_page_title_parallax(){ 1179var page_title=jQuery('.page-header.page_title_parallax') 1180if(page_title.length!==0){ 1181page_title.paroller(); 1182}} 1183function thegov_extended_parallax(){ 1184var item=jQuery('.extended-parallax') 1185if(item.length!==0){ 1186item.each(function(){ 1187jQuery(this).paroller(); 1188}) 1189}} 1190function thegov_portfolio_parallax(){ 1191var portfolio=jQuery('.wgl-portfolio-item_bg.portfolio_parallax') 1192if(portfolio.length!==0){ 1193portfolio.paroller(); 1194}} 1195function thegov_parallax_video (){ 1196jQuery('.parallax-video').each(function(){ 1197jQuery(this).jarallax({ 1198loop: true, 1199speed: 1, 1200videoSrc: jQuery(this).data('video'), 1201videoStartTime: jQuery(this).data('start'), 1202videoEndTime: jQuery(this).data('end'), 1203}); 1204}); 1205} 1206function particles_custom (){ 1207jQuery('.particles-js').each(function (){ 1208var id=jQuery(this).attr('id'); 1209var type=jQuery(this).data('particles-type'); 1210var color_type=jQuery(this).data('particles-colors-type'); 1211var color=jQuery(this).data('particles-color'); 1212var color_line=jQuery(this).data('particles-color'); 1213var number=jQuery(this).data('particles-number'); 1214var lines=jQuery(this).data('particles-line'); 1215var size=jQuery(this).data('particles-size'); 1216var speed=jQuery(this).data('particles-speed'); 1217var hover=jQuery(this).data('particles-hover'); 1218var hover_mode=jQuery(this).data('particles-hover-mode'); 1219switch (type){ 1220case 'particles': 1221type='circle'; 1222break; 1223case 'hexagons': 1224type='polygon'; 1225break; 1226default: 1227type='circle'; 1228break; 1229} 1230if(color_type=='random_colors'){ 1231color=color.split(','); 1232color_line=color[0] 1233} 1234particlesJS( 1235id, { 1236"particles":{ 1237"number":{ 1238"value":number, 1239"density":{ 1240"enable":true, 1241"value_area":800 1242}}, 1243"color":{ 1244"value": color 1245}, 1246"shape":{ 1247"type":type, 1248"polygon":{ 1249"nb_sides":6 1250}, 1251}, 1252"opacity":{ 1253"value":1, 1254"random":true, 1255"anim":{ 1256"enable":false, 1257"speed":1, 1258"opacity_min":0.1, 1259"sync":false 1260}}, 1261"size":{ 1262"value":size, 1263"random":true, 1264"anim":{ 1265"enable":false, 1266"speed":30, 1267"size_min": 1, 1268"sync":false 1269}}, 1270"line_linked":{ 1271"enable":lines, 1272"distance":150, 1273"color":color_line, 1274"opacity":0.4, 1275"width":1 1276}, 1277"move":{ 1278"enable":true, 1279"speed":speed, 1280"direction":"none", 1281"random":false, 1282"straight":false, 1283"out_mode":"out", 1284"bounce":false, 1285"attract":{ 1286"enable":false, 1287"rotateX":600, 1288"rotateY":1200 1289}} 1290}, 1291"interactivity":{ 1292"detect_on":"canvas", 1293"events":{ 1294"onhover":{ 1295"enable":hover, 1296"mode":hover_mode 1297}, 1298"onclick":{ 1299"enable":true, 1300"mode":"push" 1301}, 1302"resize":true 1303}, 1304"modes":{ 1305"grab":{ 1306"distance":150, 1307"line_linked":{ 1308"opacity":1 1309}}, 1310"bubble":{ 1311"distance":200, 1312"size":size*1.6, 1313"duration":20, 1314"opacity":1, 1315"speed":30 1316}, 1317"repulse":{ 1318"distance":80, 1319"duration":0.4 1320}, 1321"push":{"particles_nb":4}, 1322"remove":{"particles_nb":2}} 1323}, 1324"retina_detect":true 1325}); 1326var update; 1327update=function(){ 1328requestAnimationFrame(update); 1329}; 1330requestAnimationFrame(update); 1331}) 1332} 1333function thegov_videobox_init (){ 1334var gallery=jQuery(".videobox, .swipebox, .gallery a[href$='.jpg'], .gallery a[href$='.jpeg'], .gallery a[href$='.JPEG'], .gallery a[href$='.gif'], .gallery a[href$='.png']"); 1335if(gallery.length!==0){ 1336gallery.each(function(){ 1337jQuery(this).attr('data-elementor-open-lightbox', 'yes'); 1338}); 1339}} 1340function thegov_progress_bars_init(e){ 1341var item=jQuery('.wgl-progress_bar'); 1342if(item.length){ 1343item.each(function(){ 1344var item=jQuery(this), 1345slidable_label=false, 1346item_label=item.find('.progress_label_wrap'), 1347bar=item.find('.progress_bar'), 1348data_width=bar.data('width'), 1349counter=item.find('.progress_value'), 1350duration=parseFloat(bar.css('transition-duration'))*1000, 1351interval=Math.floor(duration/data_width), 1352temp=0; 1353if(item.hasClass('dynamic-value')){ 1354slidable_label=true; 1355} 1356if(!e){ 1357item.appear(function(){ 1358bar.css('width',data_width+'%'); 1359if(slidable_label==true){ 1360item_label.css('width', data_width+'%'); 1361} 1362var recap=setInterval(function(){ 1363counter.text(temp); 1364temp++; 1365}, interval); 1366var stopCounter=setTimeout(function(){ 1367clearInterval(recap); 1368counter.text(data_width); 1369}, duration); 1370}); 1371}else{ 1372bar.css('width',data_width+'%'); 1373if(slidable_label){ 1374item_label.css('width', data_width+'%'); 1375} 1376var recap=setInterval(function(){ 1377counter.text(temp); 1378temp++; 1379}, interval); 1380var stopCounter=setTimeout(function(){ 1381clearInterval(recap); 1382counter.text(data_width); 1383}, duration); 1384}}); 1385}} 1386function thegov_search_init(){ 1387(function($){ 1388$.fn.wglSearch=function(options){ 1389var defaults={ 1390"toggleID":".header_search-button", 1391"closeID":".header_search-close", 1392"searchField":".header_search-field", 1393"body":"body > *:not(header)", 1394}; 1395if(this.length===0){ return this; } 1396return this.each(function (){ 1397var wglSearch={}, s=$(this); 1398var openClass='header_search-open', 1399searchClass='.header_search'; 1400var init=function(){ 1401wglSearch.settings=$.extend({}, defaults, options); 1402}, 1403open=function (){ 1404$(s).addClass(openClass); 1405setTimeout(function(){ 1406$(s).find('input.search-field').focus(); 1407}, 100); 1408return false;
1409}, 1410close=function (){ 1411jQuery(s).removeClass(openClass); 1412}, 1413toggleSearch=function(e){ 1414if(!$(s).closest(searchClass).hasClass(openClass)){ 1415open(); 1416}else{ 1417close(); 1418}}, 1419eventClose=function(e){ 1420var element=jQuery(searchClass); 1421if(!$(e.target).closest('.search-form').length){ 1422if($(element).hasClass(openClass)){ 1423close(); 1424}} 1425}; 1426init(); 1427if(jQuery(this).hasClass('search_standard')){ 1428jQuery(this).find(wglSearch.settings.toggleID).on(click, toggleSearch); 1429}else{ 1430jQuery(wglSearch.settings.toggleID).on(click, toggleSearch); 1431jQuery(wglSearch.settings.searchField).on(click, eventClose); 1432} 1433jQuery(wglSearch.settings.body).on(click, eventClose); 1434}); 1435};})(jQuery); 1436jQuery('.header_search').wglSearch(); 1437} 1438function thegov_select_wrap(){ 1439jQuery('select:not([multiple])').each(function (){ 1440jQuery(this).wrap("<div class='select__field'></div>"); 1441}); 1442} 1443function thegov_side_panel_init(){ 1444(function($){ 1445$.fn.wglSidePanel=function(options){ 1446var defaults={ 1447"toggleID":".side_panel-toggle", 1448"closeID":".side-panel_close", 1449"closeOverlay":".side-panel_overlay", 1450"body":"body > *:not(header)", 1451"sidePanel":"#side-panel .side-panel_sidebar" 1452}; 1453if(this.length===0){ return this; } 1454return this.each(function (){ 1455var wglSidePanel={}, s=$(this); 1456var openClass='side-panel_open', 1457wglScroll, 1458sidePanelClass='.side_panel'; 1459var init=function(){ 1460wglSidePanel.settings=$.extend({}, defaults, options); 1461}, 1462open=function (){ 1463if(!$('#side-panel').hasClass('side-panel_active')){ 1464$('#side-panel').addClass('side-panel_active'); 1465} 1466$('#side-panel').addClass(openClass); 1467$(s).addClass(openClass); 1468$('body').addClass('side-panel_active'); 1469var wglClassAnimated=$('#side-panel').find('section.elementor-element').data('settings'); 1470if(wglClassAnimated&&wglClassAnimated.animation){ 1471$('#side-panel').find('section.elementor-element').removeClass('elementor-invisible').addClass('animated').addClass(wglClassAnimated.animation); 1472}}, 1473close=function (){ 1474$(s).removeClass(openClass); 1475$('#side-panel').removeClass(openClass); 1476$('body').removeClass('side-panel_active'); 1477var wglClassAnimated=$('#side-panel').find('section.elementor-element').data('settings'); 1478if(wglClassAnimated&&wglClassAnimated.animation){ 1479$('#side-panel').find('section.elementor-element').removeClass(wglClassAnimated.animation); 1480}}, 1481togglePanel=function(e){ 1482e.preventDefault(); 1483wglScroll=$(window).scrollTop(); 1484if(!$(s).closest(sidePanelClass).hasClass(openClass)){ 1485open(); 1486jQuery(window).scroll(function(){ 1487if(450 < Math.abs(jQuery(this).scrollTop() - wglScroll)){ 1488close(); 1489}}); 1490}else{ 1491}}, 1492closePanel=function(e){ 1493e.preventDefault(); 1494if($(s).closest(sidePanelClass).hasClass(openClass)){ 1495close(); 1496}}, 1497eventClose=function(e){ 1498var element=$(sidePanelClass), 1499container=$("#side-panel"); 1500if(!container.is(e.target)&&container.has(e.target).length===0){ 1501if($(element).hasClass(openClass)){ 1502close(); 1503}} 1504}; 1505init(); 1506jQuery(wglSidePanel.settings.toggleID).on(click, togglePanel); 1507jQuery(wglSidePanel.settings.body).on(click, eventClose); 1508jQuery(wglSidePanel.settings.closeID).on(click, closePanel); 1509jQuery(wglSidePanel.settings.closeOverlay).on(click, closePanel); 1510new PerfectScrollbar('#side-panel', { 1511wheelSpeed: 6, 1512suppressScrollX: true 1513}); 1514}); 1515};})(jQuery); 1516jQuery('.side_panel').wglSidePanel(); 1517} 1518function thegov_skrollr_init(){ 1519var blog_scroll=jQuery('.blog_skrollr_init'); 1520if(blog_scroll.length){ 1521if(!(/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent||navigator.vendor||window.opera)){ 1522skrollr.init({ 1523smoothScrolling: false, 1524forceHeight: false 1525}); 1526}} 1527} 1528function thegov_split_slider(){ 1529var split_slider=jQuery('.thegov_module_split_slider'); 1530if(split_slider.length){ 1531split_slider.each(function(){ 1532jQuery(this).height(jQuery(window).height()).addClass('slider_initialized'); 1533jQuery(this).multiscroll({ 1534easing: 'easeInOutQuart', 1535navigation: true, 1536sectionSelector: '.thegov_split_slider-section', 1537leftSelector: '.thegov_split_slider-left', 1538rightSelector: '.thegov_split_slider-right', 1539afterRender: function (){ 1540var cloneLeft=jQuery(this).closest('.thegov_split_slider-left > .thegov_split_slider-section'); 1541var cloneRight=jQuery(this).closest('.thegov_split_slider-right > .thegov_split_slider-section'); 1542cloneRight=Array.prototype.reverse.apply(cloneRight); 1543var responsive=jQuery(this).closest('.thegov_module_split_slider-wrapper').find('.thegov_module_split_slider-responsive'); 1544for(var i=0; i < cloneLeft.length; i++){
1545jQuery(responsive).append(jQuery(cloneLeft[i]).clone(true)); 1546jQuery(responsive).append(jQuery(cloneRight[i]).clone(true)); 1547} 1548jQuery('body').addClass('ms-initialized'); 1549thegov_progress_bars_init(true); 1550}}); 1551}); 1552if(jQuery(window).width() <=1024){ 1553jQuery.fn.multiscroll.destroy(); 1554}else{ 1555jQuery.fn.multiscroll.build(); 1556} 1557jQuery(window).resize(function (){ 1558if(jQuery(window).width() <=1024){ 1559jQuery.fn.multiscroll.destroy(); 1560}else{ 1561jQuery.fn.multiscroll.build(); 1562}}); 1563}} 1564function thegov_sticky_init(){ 1565var section='.wgl-sticky-header'; 1566var top=jQuery(section).height(); 1567var data=jQuery(section).data('style'); 1568var previousScroll=0; 1569function init(element){ 1570if(!element){ 1571return; 1572} 1573var y=jQuery(window).scrollTop(); 1574if(data=='standard'){ 1575if(y >=top){ 1576jQuery(section).addClass('sticky_active'); 1577}else{ 1578jQuery(section).removeClass('sticky_active'); 1579}}else{ 1580if(y > top){ 1581if(y > previousScroll){ 1582jQuery(section).removeClass('sticky_active'); 1583}else{ 1584jQuery(section).addClass('sticky_active'); 1585}}else{ 1586jQuery(section).removeClass('sticky_active'); 1587} 1588previousScroll=y; 1589}}; 1590if(jQuery('.wgl-sticky-header').length!==0){ 1591jQuery(window).scroll(function(){ 1592init(jQuery(this)); 1593} 1594); 1595jQuery(window).resize(function(){ 1596init(jQuery(this)); 1597} 1598); 1599}} 1600function thegov_sticky_sidebar(){ 1601if(jQuery('.sticky-sidebar').length){ 1602jQuery('body').addClass('sticky-sidebar_init'); 1603jQuery('.sticky-sidebar').each(function(){ 1604jQuery(this).theiaStickySidebar({ 1605additionalMarginTop: 30, 1606additionalMarginBottom: 30 1607}); 1608}); 1609} 1610if(jQuery('.sticky_layout .info-wrapper').length){ 1611jQuery('.sticky_layout .info-wrapper').each(function(){ 1612jQuery(this).theiaStickySidebar({ 1613additionalMarginTop: 150, 1614additionalMarginBottom: 150 1615}); 1616}); 1617}} 1618function thegov_striped_services_init(){ 1619var item_wrap=jQuery('.wgl-striped-services'); 1620item_wrap.each(function(){ 1621var item=jQuery(this).find('.service-item'); 1622item.on('mouseenter', function(e){ 1623item_wrap.addClass('onhover'); 1624jQuery(this).addClass('active'); 1625}) 1626item.on('mouseleave', function(e){ 1627item_wrap.removeClass('onhover'); 1628jQuery(this).removeClass('active'); 1629}) 1630}) 1631} 1632function thegov_tabs_init(){ 1633if(jQuery('.wgl-tabs').length){ 1634jQuery('.wgl-tabs').each(function(){ 1635var $this=jQuery(this); 1636var tab=$this.find('.wgl-tabs_headings .wgl-tabs_header'); 1637var data=$this.find('.wgl-tabs_content-wrap .wgl-tabs_content'); 1638tab.filter(':first').addClass('active'); 1639data.filter(':not(:first)').hide(); 1640tab.each(function(){ 1641var currentTab=jQuery(this); 1642currentTab.on('click tap', function(){ 1643var id=currentTab.data('tab-id'); 1644currentTab.addClass('active').siblings().removeClass('active'); 1645jQuery('.wgl-tabs .wgl-tabs_content[data-tab-id='+id+']').slideDown().siblings().slideUp(); 1646}); 1647}); 1648}) 1649}} 1650function thegov_text_background(){ 1651var anim_text=jQuery('.wgl-animation-background-text'); 1652if(anim_text.length){ 1653anim_text.each(function(index){ 1654var paralax_text=jQuery('<div class="wgl-background-text"/>'); 1655jQuery(this).find(">div:eq(0)").before(paralax_text); 1656var text=window.getComputedStyle(this,':before').content; 1657text=text.slice(1, -1); 1658paralax_text.addClass('element-'+ index); 1659paralax_text.attr('data-info', index); 1660jQuery(this).find(paralax_text).html(text.replace(/([^\x00-\x80]|\w)/g, "<span class='letter'>$&</span>")); 1661var self=jQuery(this); 1662anim_text.appear(function(){ 1663if(typeof anime==='function'){ 1664var item_anime=jQuery(this).find('.wgl-background-text').data('info'); 1665if(item_anime===index){ 1666anime.timeline({loop: false}) 1667.add({ 1668targets: '.element-'+ index + ' .letter', 1669translateY: [100,0], 1670translateZ: 0, 1671opacity: [0,1], 1672easing: "easeOutExpo", 1673duration: 1400, 1674delay: function(el, i){ 1675return 0 + 350 * i; 1676}}); 1677}} 1678}); 1679}); 1680}} 1681function thegov_init_timeline_appear(){ 1682var item=jQuery('.wgl-timeline-vertical.appear_anim .time_line-item'); 1683if(item.length){ 1684item.each(function(){ 1685var item=jQuery(this); 1686item.appear(function(){ 1687item.addClass('item_show'); 1688}); 1689}); 1690}} 1691function thegov_woocommerce_helper(){ 1692jQuery('body').on('click', '.quantity.number-input span.minus', function(e){ 1693this.parentNode.querySelector('input[type=number]').stepDown(); 1694if(document.querySelector('.woocommerce-cart-form [name=update_cart]')){ 1695document.querySelector('.woocommerce-cart-form [name=update_cart]').disabled=false; 1696}}); 1697jQuery('body').on('click', '.quantity.number-input span.plus', function(e){ 1698this.parentNode.querySelector('input[type=number]').stepUp(); 1699if(document.querySelector('.woocommerce-cart-form [name=update_cart]')){ 1700document.querySelector('.woocommerce-cart-form [name=update_cart]').disabled=false; 1701}}); 1702jQuery('ul.wgl-products li a.add_to_cart_button.ajax_add_to_cart').on("click", function(){ 1703jQuery(this).closest('li').addClass('added_to_cart_item'); 1704}); 1705} 1706function thegov_woocommerce_login_in(){ 1707if(jQuery('header .login-in').length){ 1708var mc=jQuery('header .login-in'), 1709icon=mc.find('a.login-in_link'), 1710overlay=mc.find('div.overlay'); 1711icon.on('click tap', function(e){ 1712e.preventDefault(); 1713mc.toggleClass('open_login'); 1714}); 1715overlay.on('click tap', function(e){ 1716if(!jQuery(e.target).closest('.modal_content').length&&!jQuery(e.target).is('.modal_content')){ 1717mc.removeClass('open_login'); 1718}}); 1719};}; 1720function thegov_woocommerce_mini_cart(){ 1721if(jQuery('header .mini-cart').length){ 1722jQuery('header .mini-cart').prepend('<div class="mini_cart-overlay"></div>'); 1723var mc=jQuery('header .mini-cart'), 1724icon=mc.find('a.woo_icon'), 1725overlay=mc.find('div.mini_cart-overlay'); 1726icon.on('click tap', function(){ mc.toggleClass('open_cart'); }); 1727overlay.on('click tap', function(){ mc.removeClass('open_cart'); }); 1728jQuery('body').on('click', 'header a.close_mini_cart', function(){ 1729mc.removeClass('open_cart'); 1730}); 1731};};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.