PageSourceSearch

https://kidspoint.com.au/wp-content/themes/themify-shoppe/js/themify.script.js?ver=5.1.3

js kidspoint.com.au collected 2026-10-07 16:44:30 UTC 11,277 bytes, 245 lines download raw bytes

1/* Themify Theme Scripts - https://themify.me/ */
2;
3(function ($,Themify,window,document,themify_vars,themifyScript) {
4    'use strict';
5    const ThemifyTheme = {
6        bodyCl:Themify.body[0].classList,
7        v:themify_vars.theme_v,
8        headerType:themifyScript.headerType,
9        url:themify_vars.theme_url+'/',
10        init:function(){
11            Themify.megaMenu(document.getElementById('main-nav'));
12            this.headerRender();
13            this.clickableItems();
14            this.headerVideo();
15            this.fixedHeader();
16            this.wc();
17            setTimeout(this.loadFilterCss.bind(this),800);
18            setTimeout(this.searchForm.bind(this),1000);
19            setTimeout(this.backToTop.bind(this),2000);
20            this.resize();
21            if (this.bodyCl.contains('woocommerce') && this.bodyCl.contains('archive')) {
22                this.doInfinite($('#content ul.products'));
23            } else {
24                this.doInfinite($('#loops-wrapper'));
25            }   
26            setTimeout(this.commentAnimation,3500);
27            this.builderActive();
28			if(document.getElementById('mc_embed_signup')){
29				Themify.LoadCss(this.url + 'styles/modules/mail_chimp.css', this.v);
30			}
31			this.revealingFooter();
32        },
33        builderActive(){
34                if(Themify.is_builder_active===true){
35                        Themify.LoadAsync(this.url + 'js/modules/builderActive.js',null, this.v);
36                }
37        },
38        fixedHeader(){
39            if(Themify.is_builder_active===false && this.bodyCl.contains('fixed-header-enabled') && this.headerType!=='header-bottom' && this.headerType!=='header-leftpane'&& this.headerType!=='header-minbar'&& this.headerType!=='header-rightpane' && this.headerType!=='header-slide-down' && this.headerType!=='header-none' && document.getElementById('headerwrap')!==null){
40                Themify.FixedHeader();
41            }
42        },
43        revealingFooter(){
44            if (this.bodyCl.contains('revealing-footer') && document.getElementById('footerwrap')!==null) {
45                Themify.LoadAsync(this.url + 'js/modules/revealingFooter.js',null, this.v);
46            }
47        },
48        doInfinite($container,wpf){
49            Themify.infinity($container, {
50                scrollToNewOnLoad: themifyScript.scrollToNewOnLoad,
51                scrollThreshold: !('auto' !== themifyScript.autoInfinite),
52                history: wpf || !themifyScript.infiniteURL ? false : 'replace'
53            });
54        },
55        searchForm(){
56            const search = document.getElementById('search-lightbox-wrap');
57            if(search){
58                const search_button=document.getElementsByClassName('search-button');
59                if(search_button[0]){
60                    const self=this,
61                        loaded={},
62                    _click=function(e){
63                        e.preventDefault();
64                        e.stopImmediatePropagation();
65                        const _this=this,
66						_check = function(){
67                            if(loaded['search'] && loaded['css_search']){
68                                Themify.trigger('themify_theme_search_init',$(search));
69                                _this.removeEventListener('click',_click);
70                                $(_this).click();
71                            }
72                        };
73						if(!loaded['css_search']){
74							Themify.LoadCss(self.url + 'styles/modules/search-form-overlay.css', self.v,null,null,function(){
75								loaded['css_search']=true;
76								_check();
77							});
78						}
79						if(!loaded['search']){
80							Themify.LoadAsync(self.url + 'js/modules/search.js',function(){
81								loaded['search']=true;
82								_check();
83							}, self.v);
84						}
85                    };
86					for(let i=search_button.length-1;i>-1;--i){
87						search_button[i].addEventListener('click',_click);
88					}
89                }
90            }
91        },
92        loadFilterCss(){
93            const filters = ['blur','grayscale','sepia','none'];
94            for(let i=filters.length-1;i>-1;--i){
95                    if(document.getElementsByClassName('filter-'+filters[i])[0]!==undefined || document.getElementsByClassName('filter-hover-'+filters[i])[0]!==undefined){
96                            Themify.LoadCss(this.url + 'styles/modules/filters/'+filters[i]+'.css',this.v);
97                    }
98            }
99			Themify.on('infiniteloaded.themify',this.loadFilterCss.bind(this),true);
100        },
101        headerVideo(){
102            const header = document.getElementById('headerwrap');
103            if(header){
104                const videos=Themify.selectWithParent('[data-fullwidthvideo]',header);
105                if(videos.length>0){
106                    Themify.LoadAsync(this.url + 'js/modules/headerVideo.js',function(){
107                            Themify.trigger('themify_theme_header_video_init',[videos]);
108                    }, this.v);
109                }
110            }
111        },
112        wc(){
113            if(window['woocommerce_params']!==undefined){
114                const self=this;
115                Themify.LoadAsync(self.url + 'js/modules/themify.shop.js',function(){
116                    Themify.trigger('themify_theme_shop_init',self);
117                }, self.v);
118            }
119        },
120        resize(){
121            if (this.headerType==='header-menu-split') {
122                Themify.on('tfsmartresize',function(e){
123                    if(e && e.w!==Themify.w){
124                        if ($('#menu-icon').is(':visible')) {
125                                if ($('.header-bar').find('#site-logo').length === 0) {
126                                        $('#site-logo').prependTo('.header-bar');
127                                }
128                        } else if ($('.themify-logo-menu-item').find('#site-logo').length === 0) {
129                                $('.themify-logo-menu-item').append($('.header-bar').find('#site-logo'));
130                        }
131                    }
132                });
133           }
134        },
135        clickableItems(){
136			const items = document.getElementsByClassName('toggle-sticky-sidebar');
137            for(let i=items.length-1;i>-1;--i){
138                items[i].addEventListener('click',function () {
139                        const sidebar = $('#sidebar');
140                        if ($(this).hasClass('open-toggle-sticky-sidebar')) {
141                                $(this).removeClass('open-toggle-sticky-sidebar').addClass('close-toggle-sticky-sidebar');
142                                sidebar.addClass('open-mobile-sticky-sidebar tf_scrollbar');
143                        } else {
144                                $(this).removeClass('close-toggle-sticky-sidebar').addClass('open-toggle-sticky-sidebar');
145                                sidebar.removeClass('open-mobile-sticky-sidebar tf_scrollbar');
146                        }
147                },{passive:true});
148            }
149            setTimeout(function(){
150				  Themify.body.on('click', '.post-content', function (e) {
151                    if(e.target.tagName!=='A' && e.target.tagName!=='BUTTON'){
152						const el = this.closest('.loops-wrapper');
153						if(el!==null){
154							const cl =el.classList;
155							if((cl.contains('grid6') || cl.contains('grid5')|| cl.contains('grid4') || cl.contains('grid3') || cl.contains('grid2')) && (cl.contains('polaroid') || cl.contains('overlay') || cl.contains('flip'))){
156								const $link = $(this).closest('.post').find('a[data-post-permalink]');
157								if ($link.attr('href') && !$link.hasClass('themify_lightbox')) {
158									window.location = $link.attr('href');
159								}
160							}
161						}
162					}
163                });
164            },1500);
165        },
166        headerRender(){
167			Themify.sideMenu(document.getElementById('menu-icon'),{
168				close: '#menu-icon-close',
169				side:this.headerType==='header-minbar-left' || this.headerType==='header-left-pane' || this.headerType==='header-slide-left'?'left':'right'
170			});
171            // Expand Mobile Menus
172            if(undefined != themify_vars.m_m_expand){
173                Themify.on('sidemenushow.themify', function(panel_id){
174                    if('#mobile-menu'===panel_id){
175                        const items = document.querySelectorAll('#main-nav>li.has-sub-menu');
176                        for(let i=items.length-1;i>-1;i--){
177                            items[i].className+=' toggle-on';
178                        }
179                    }
180                },true);
181            }
182        },
183        backToTop(){
184            if (this.headerType==='header-bottom') {
185                const footer_tab=document.getElementsByClassName('footer-tab')[0];
186                if(footer_tab!==undefined){
187                    footer_tab.addEventListener('click',function (e) {
188                        e.preventDefault();
189                        const cl=this.classList;
190                        if(cl.contains('tf_close')){
191                            cl.add('ti-angle-down');
192                            cl.remove('tf_close');
193                            $('#footerwrap').removeClass('expanded');
194                        }
195                        else{
196                            cl.remove('ti-angle-down');
197                            cl.add('tf_close');
198                            $('#footerwrap').addClass('expanded');
199                        }
200                    });
201                }
202            }
203            const back_top = document.getElementsByClassName('back-top')[0];
204            if (back_top!==undefined) {
205                if (back_top.classList.contains('back-top-float')) {
206                    var events =['scroll'],
207                        scroll=function(){
208                            if (window.scrollY < 10) {
209                                back_top.classList.add('back-top-hide');
210                            } else {
211                                back_top.classList.remove('back-top-hide');
212                            }
213                        };
214                        if(Themify.isTouch){
215                            events.push('touchstart');
216                            events.push('touchmove');
217                        }
218                        for(var i=events.length-1;i>-1;--i){
219                            window.addEventListener(events[i],scroll,{passive:true});
220                        }
221                }
222                back_top.addEventListener('click',function (e) {
223                    e.preventDefault();
224                    e.stopPropagation();
225                    Themify.scrollTo();
226                });
227            }
228        },
229        commentAnimation(){
230            if(document.getElementById('commentform')){
231                $('#commentform').on('focus','input, textarea',function () {
232                    $(this).one('blur',function(){
233                            if (this.value === '') {
234                                    $(this).removeClass('filled').closest('#commentform p').removeClass('focused');
235                            } else {
236                                    $(this).addClass('filled');
237                            }
238                    }).closest('#commentform p').addClass('focused');
239                });
240            }
241        }
242    };
243    ThemifyTheme.init();
244})(jQuery,Themify,window,document,themify_vars,themifyScript);
245

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.