PageSourceSearch

https://www.achipont.it/wp-content/themes/construction/assets/js/theme.js?ver=5.5.22

js achipont.it collected 2026-09-27 05:43:17 UTC 7,527 bytes, 240 lines download raw bytes

1jQuery(document).ready(function() {
2    "use strict";
3    /**
4     * Skip link focus fix
5     */
6    ( function() {
7    	var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
8    	    is_opera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
9    	    is_ie     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
10
11    	if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
12    		window.addEventListener( 'hashchange', function() {
13    			var element = document.getElementById( location.hash.substring( 1 ) );
14
15    			if ( element ) {
16    				if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) )
17    					element.tabIndex = -1;
18
19    				element.focus();
20    			}
21    		}, false );
22    	}
23    })();
24
25    /**
26     * Initialise Menu Toggle
27     */
28    ( function() {
29        var header_h = jQuery('.site-header').height();
30        var header_widget_h = jQuery('.header-widget').height();
31
32        jQuery('.wpc-menu li.menu-item-has-children').each( function() {
33            jQuery(this).prepend('<div class="nav-toggle-subarrow"><i class="fa fa-angle-down"></i></div>');
34        });
35
36        jQuery('#nav-toggle').click(
37            function () {
38
39                jQuery('.main-navigation .wpc-menu').toggleClass("wpc-menu-mobile");
40                jQuery('.header-widget').toggleClass("header-widget-mobile");
41                jQuery('.header-widget-mobile').css('top', header_h);
42                jQuery('.wpc-menu-mobile').css('top', header_h + header_widget_h + 20);
43            }
44        );
45        jQuery('.nav-toggle-subarrow, .nav-toggle-subarrow .nav-toggle-subarrow').click(
46            function () {
47                jQuery(this).parent().toggleClass("nav-toggle-dropdown");
48            }
49        );
50
51    } )();
52
53    /**
54     * Initialise transparent header
55     */
56    ( function() {
57
58        var site_header_h = jQuery('.site-header').height();
59        var logo_h = jQuery('.site-branding img').height();
60        var nav_h = jQuery('.wpc-menu').height() - 30;
61        var page_header = jQuery('.page-header-wrap');
62        var page_header_pt = parseInt(page_header.css('padding-top'), 10);
63        //alert(page_header_pt);
64        //alert(nav_h);
65
66        // Vertical Align Logo
67        //jQuery('.site-branding').css('padding-top', (site_header_h - logo_h) / 2 + 'px');
68
69        // Single Page transparent header.
70        if ( jQuery('body').hasClass('header-transparent') && page_header.length ) {
71            page_header.css('padding-top', page_header_pt + site_header_h + 'px');
72        }
73
74    })();
75
76    /**
77     * Parallax Section
78     */
79    ( function() {
80        var isMobile = {
81            Android: function() {
82                return navigator.userAgent.match(/Android/i);
83            },
84            BlackBerry: function() {
85                return navigator.userAgent.match(/BlackBerry/i);
86            },
87            iOS: function() {
88                return navigator.userAgent.match(/iPhone|iPad|iPod/i);
89            },
90            Opera: function() {
91                return navigator.userAgent.match(/Opera Mini/i);
92            },
93            Windows: function() {
94                return navigator.userAgent.match(/IEMobile/i);
95            },
96            any: function() {
97                return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
98            }
99        };
100
101        var testMobile = isMobile.any();
102
103        jQuery('.wpc_row_parallax').each(function() {
104    		var $this = jQuery(this);
105    		var bg    = $this.find('.wpc_parallax_bg');
106
107            jQuery(bg).css('backgroundImage', 'url(' + $this.data('bg') + ')');
108
109            if (testMobile == null) {
110                jQuery(bg).addClass('not-mobile');
111                jQuery(bg).removeClass('is-mobile');
112                jQuery(bg).parallax('50%', 0.4);
113            }
114            else {
115                //jQuery(bg).css('backgroundAttachment', 'inherit');
116                jQuery(bg).removeClass('not-mobile');
117                jQuery(bg).addClass('is-mobile');
118
119            }
120
121        });
122
123    })();
124
125    /**
126     * Call magnificPopup when use
127     */
128    ( function() {
129
130        // WordPress gallery lightbox
131        jQuery('.gallery-lightbox').each(function () {
132            jQuery(this).magnificPopup({
133                delegate: '.gallery-item a',
134                type:'image',
135                gallery:{
136                    enabled: true
137                },
138                zoom: {
139                    enabled: true
140                }
141            });
142        });
143
144
145
146        jQuery('.popup-video').magnificPopup({
147            //disableOn: 700,
148            type: 'iframe',
149            mainClass: 'mfp-fade',
150            removalDelay: 160,
151            preloader: false,
152            fixedContentPos: false,
153            zoom: {
154                enabled:true
155            }
156        });
157
158    })();
159
160    /**
161     * Fix slider padding issue.
162     */
163    ( function() {
164        jQuery('.rev_slider_wrapper').parents('.vc_row').find('.vc_col-sm-12').css({"padding-left": "0px","padding-right": "0px"});
165    })();
166
167    /**
168     * Back To Top
169     */
170    ( function() {
171        jQuery('#btt').fadeOut();
172        jQuery(window).scroll(function() {
173            if(jQuery(this).scrollTop() != 0) {
174                jQuery('#btt').fadeIn();
175            } else {
176                jQuery('#btt').fadeOut();
177            }
178        });
179
180        jQuery('#btt').click(function() {
181            jQuery('body,html').animate({scrollTop:0},800);
182        });
183    })();
184
185    /**
186     * Fixed Header + Navigation.
187     */
188    ( function() {
189
190        if ( typeof header_fixed_setting !== 'undefined' && header_fixed_setting.fixed_header == '1' ) {
191            
192            var stickyNavTop = jQuery( '.fixed-on' );
193            if (!stickyNavTop.length) {
194                return;
195            }
196            var p_to_top = stickyNavTop.offset().top;
197
198
199            var stickyNav = function(){
200                var scrollTop = jQuery(window).scrollTop();
201
202                var topbar = jQuery( '#wpadminbar' ).height() || 0;
203                if (  topbar > 0 ) {
204                    var  topbar_pos = jQuery( '#wpadminbar').css( 'position' );
205                    if ( 'fixed' !== topbar_pos ) {
206                        topbar = 0;
207                    }
208                }
209                if ( scrollTop > p_to_top && scrollTop > 0 ) {
210                    stickyNavTop.addClass( 'header-fixed').css( 'top', topbar+'px' );
211                    stickyNavTop.stop().animate({},300);
212
213                    if ( jQuery("body").hasClass('header-transparent') ) {
214                        // No Thing
215                    } else {
216                    stickyNavTop.addClass( 'header-fixed').css( 'top', topbar+'px' );
217                        jQuery('.site-content').css('padding-top', stickyNavTop.height());
218                    }
219                   
220                } else {
221                    stickyNavTop.removeClass( 'header-fixed' ).css( 'top', 'auto' );
222                    stickyNavTop.stop().animate({},300);
223                    if (jQuery("body").hasClass('header-transparent') ) {
224                        // No Thing
225                    } else {
226                        jQuery('.site-content').css('padding-top', '0');
227                    }
228                }
229            };
230
231            stickyNav();
232            jQuery(window).scroll(function() {
233                stickyNav();
234            });
235
236        }
237
238    })();
239
240});

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.