PageSourceSearch

https://robust-themes.com/site/js/site.js?v=52

js robust-themes.com collected 2026-09-24 12:36:01 UTC 11,286 bytes, 385 lines download raw bytes

1
2
3var scrollTimeout;  
4ISVIDEOPIP = false
5document.addEventListener('scroll', function(e) {
6    if (scrollTimeout) {
7        clearTimeout(scrollTimeout);
8        scrollTimeout = null;
9    }
10    scrollHandler()
11    scrollTimeout = setTimeout(scrollHandler, 500);
12});
13
14scrollHandler = function () {
15    header_check_if_top();
16
17    if(WIN_WIDTH > 768 && VID_move){
18        moveVideoOnScroll()
19     }
20};
21
22
23HEADER_TOP = true;
24function header_check_if_top(){
25    if ( $('html').scrollTop() > 180 &&  HEADER_TOP){
26        HEADER_TOP = false;
27        $('.sticky_header').css('transform','translate(0px, 0px)')
28    }
29    if ( $('html').scrollTop() < 180 &&  !(HEADER_TOP)){
30        HEADER_TOP = true;
31        $('.sticky_header').css('transform','translate(0px, -70px)')
32    }
33}
34
35
36$('.hamburger-menu, .hamburger-menu-close').click(function(){
37    $(this).toggleClass('open');
38    $('.menu-links, body').toggleClass('open');
39    if(!$('.menu-links').hasClass('open')){
40        $('.hamburger-menu').removeClass('open');
41    }
42});
43
44
45
46WIN_WIDTH = $(window).width() 
47
48 jQuery(document).ready(function(){
49
50        $('.menu_has_child > a').click(function (e){
51            e.preventDefault()
52        })
53
54        product_swiper()
55        product_swiper_4()
56        testimonials_swiper()
57        AOS.init({disable: 'mobile'})
58        // pip()
59        videoPlayerIcon()
60        $("body").on("click", ".toggle-para", function(){
61            $(this).siblings(".feature-para-hidden").slideToggle(300)
62        })
63 })
64
65 function videoPlayerIcon(){
66    var run_once_video_section = true;
67    var run_once_video_section_fs = true;
68    $('body').on('click','.video-section .custom_play_button',function(){
69        let video_id =  $('.video-section').find('.wistia_embed').attr('id')
70        var video = Wistia.api(video_id);
71        let $this_section = $('.video-section')
72        if (!($this_section).hasClass('playing')){
73            video.play()
74            if ($(this).hasClass('video_triger_full_screen')){
75            video.requestFullscreen()
76            $this_section.find('.kjb-video-responsive').show()
77                if (run_once_video_section){
78                    run_once_video_section = false
79                    video.bind("cancelfullscreen", function() {
80                    $this_section.find('.kjb-video-responsive').hide()
81                    $('.video-section').addClass('paused').removeClass('playing')
82                    });
83                }
84            }
85
86            $this_section.addClass('playing').removeClass('paused')
87        }
88        if (run_once_video_section){
89            run_once_video_section = false
90            video.bind("pause", function() {
91                $('.video-section').addClass('paused').removeClass('playing')
92            });
93        }
94
95    })
96 }
97 function testimonials_swiper(){
98    var swiper = new Swiper(".testimonials", {
99        direction: "vertical",
100        slidesPerView: 1.8,
101        autoplay: true,
102        speed: 500,
103        spaceBetween: 20,
104        pagination: {
105          el: ".swiper-pagination",
106          clickable: true,
107        },
108      });
109 }
110 
111 function product_swiper(){
112    var swiper_products = new Swiper('.products-swiper-container', {
113        effect: 'slide' , 
114        speed: 500,
115        spaceBetween: 20,
116        centeredSlides: true,
117        pagination: {
118          el: '.products-swiper-pagination',
119          clickable: true
120        },
121            autoplay: {
122              delay: 20000, 
123            }, 
124            // autoplay: false,
125          loop: true, 
126          breakpoints: {
127              1: {
128                  slidesPerView: 1,
129                  spaceBetween: 0
130              },
131              1100: {
132                  slidesPerView: 3,
133                  spaceBetween: 20 
134              }
135          }
136      });
137
138
139 }
140 function product_swiper_4(){
141    var swiper_products = new Swiper('.no-active-swiper', {
142        effect: 'slide' , 
143        speed: 500,
144        spaceBetween: 20,
145        centeredSlides: true,
146        pagination: {
147          el: '.products-swiper-pagination',
148          clickable: true
149        },
150            autoplay: {
151              delay: 2000, 
152            }, 
153          loop: true, 
154          breakpoints: {
155              1: {
156                  slidesPerView: 1,
157                  spaceBetween: 0
158              },
159              1100: {
160                  slidesPerView: 4,
161                  spaceBetween: 20 
162              }
163          }
164      });
165
166
167 }
168
169
170 $('.swiper-button-next').click(function(e){
171    e.stopPropagation();
172    var mySwiper = this.closest('.swiper-container').swiper;
173    mySwiper.slideNext();
174});
175
176$('.swiper-button-prev').click(function(e){
177    e.stopPropagation();
178    var mySwiper = this.closest('.swiper-container').swiper;
179    mySwiper.slidePrev();
180}); 
181
182
183$('.bexten_truble_triger').click(function(e){
184    e.preventDefault()
185    $('.bexten_truble_box').show(300)
186}); 
187
188$('.install_h li').click(function(e){
189    $('.install_h li').removeClass('active')
190    $(this).addClass('active')
191
192    $('.install_type').hide()
193    $('.install_type[type="'+$(this).text()+'"]').show()
194}); 
195
196
197$('.tab-head').click(function(){
198    let video = Wistia.api($(this).attr('vid'))
199    video.time(0)
200    video.play()
201    $('.tab-head').removeClass('active')
202    $(this).addClass('active')
203    tab = $(this).attr('tab')
204    $('.tab-body').removeClass('active')
205    $('.tab-body[tab="'+tab+'"]').addClass('active')
206    pip()
207    
208}); 
209
210
211
212
213
214console.log('site.js')
215function validateEmail(email) {
216    const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
217    return re.test(String(email).toLowerCase());
218}
219
220
221$('.contact_submit_btn').click(function(){
222    $('.contact_invalid_name,.contact_invalid_email').hide();
223    if ($('.sup_name').val().length < 3){
224        $('.contact_invalid_name').show();
225        return;
226    }
227    if (!validateEmail($('.sup_email').val())){
228        $('.contact_invalid_email').show();
229        return;
230    }
231
232    data = {
233        action:'message',
234        name: $('.sup_name').val(),
235        email: $('.sup_email').val(),
236        phone: $('.sup_phone').val(),
237        message: $('.sup_message').val(),
238    }
239    $.post( "/API/email.php",data, function( res ) {});
240
241   $('.sup_name,.sup_email,.sup_phone,.sup_message').val('')
242   $('.contact_success').show();
243   setTimeout(()=>{
244    $('.contact_success').hide();
245   },3000)
246
247});
248
249
250
251function moveVideoOnScroll(){
252
253        if(($(window).scrollTop()) > $(".video-section").offset().top + 600){
254            $(".vid-pip").addClass("video-on-bottom").removeClass("video-on-position")
255        } else {
256            $(".vid-pip").removeClass("video-on-bottom").addClass("video-on-position")
257        }
258}
259
260
261if(typeof vid_intialized == 'undefined'){
262window._wq = window._wq || [];
263_wq.push({
264    id:FIRST_Video,
265    options:{
266        playerColor:"#3e73ea",
267        stillUrl:"/site/images/video-hero.webp",
268        autoPlay:false, controlsVisibleOnLoad:null, playbar:true, fullscreenButton:true, playbackRateControl:false, qualityControl:false, settingsControl:false,
269        smallPlayButton:false, endVideoBehavior:"default", playButton:false, resumable:true, muted:false, volume:0.5, volumeControl:true
270    },
271    onReady: function(video) {
272        CURRENT_VID = video    
273    }
274})
275}
276
277VID_OFFSET = 1220
278$(document).ready(function(){
279
280    VID_OFFSET = $(".video-section").offset().top  + 530
281
282    $('body').on('click',play_video_body_click)
283
284    $('.learn-more-product').click(function(){
285        click_learn_more('5ledu20v5v')
286        $('.learn-more-product').addClass('learn-more-border')
287    })
288    $('.learn-more-site').click(function(){
289        click_learn_more('gesipmwzh5')
290        $('.learn-more-site').addClass('learn-more-border')
291    })
292    function click_learn_more(video_id){
293        $('.learn-more-wrapper').removeClass('learn-more-border')
294        let current_video_id = $('.wistia_embed').attr('id').replace('wistia_','')
295        var video = Wistia.api(current_video_id)
296        video.replaceWith(video_id,{transition: "slide",playerColor:"#1a62ca",stillUrl:"/site/images/video-hero.webp",autoPlay:true,playButton:false, settingsControl:false});
297        $('.wistia_embed').attr('id','wistia_' + video_id)
298    }
299 })
300
301 function play_video_body_click(){
302    $('body').off('click',play_video_body_click)
303    play_video()
304 }
305
306function play_video(){
307    var video = Wistia.api(FIRST_Video)
308
309    video.bind("end", function(){
310       home_continue_to_product_video(FIRST_Video,SECOND_Video)
311    });
312
313    video.time(0)
314    video.unmute(0)
315    video.play()
316    $('.custom_play_button').hide()
317}
318
319function home_continue_to_product_video(this_id,next_id){
320    var video = Wistia.api(this_id)
321    //CURRENT_VID = video
322    video.replaceWith(next_id,{transition: "slide",playerColor:"#1a62ca",stillUrl:"/site/images/video-hero.webp",autoPlay:true,playButton:false, settingsControl:false});
323    $('.wistia_embed').attr('id','wistia_'+SECOND_Video)
324    $('.learn-more-product').addClass('learn-more-border')
325    setTimeout(function (){
326        var video = Wistia.api(next_id)
327        /*
328        video.bind("end", function(){
329            //then play the site video
330            video.replaceWith('gesipmwzh5',{transition: "slide",playerColor:"#1a62ca",stillUrl:"/site/images/video-hero.webp",autoPlay:true,playButton:false, settingsControl:false});
331            $('.wistia_embed').attr('id','wistia_gesipmwzh5')
332            $('.learn-more-wrapper').removeClass('learn-more-border')
333            $('.learn-more-site').addClass('learn-more-border')
334            //CURRENT_VID = video
335       });
336       */
337    },1000)
338    
339}
340
341
342$(document).ready(function(){
343
344
345    $('.site_video_close').click(function (e){
346        e.stopPropagation()
347        $('body').off('click',play_video_body_click)
348        hide_video()
349        CURRENT_VID.pause()
350    })
351
352
353    sbvo_flag = true
354    $('body').on('mousemove','.video-on-bottom',function(e){ 
355        if (e.offsetX > 100 & sbvo_flag){
356            sbvo_flag = false
357            $('.video-on-bottom').css('transform','scale(1.2)') 
358        }
359    })
360     $('body').on('mouseleave','.video-on-bottom',function(e){ 
361        sbvo_flag = true
362        $('.video-on-bottom').css('transform','scale(0.75)')
363    })
364
365    $('.banner-btn-product a,.product_watch_now').click(function (e){
366        e.preventDefault()
367        $('html, body').animate({
368            scrollTop: $("#homepage_vid").offset().top
369        }, 200);
370        play_video()
371    })
372    
373})
374
375VID_move = true
376function hide_video(){
377    VID_move = false
378    $('.custom_play_button').hide()
379    $('.video-on-bottom').addClass('video-hide-class')
380   // $('.video-on-bottom').css('transform','scale(0.65)')
381   setTimeout(function (){
382        $(".vid-pip").removeClass("video-on-bottom").addClass("video-on-position").removeClass('video-hide-class')
383   },400)
384}
385

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.