PageSourceSearch

https://www.microsoftrnd.co.il/js/site.js?v=LZOiFj7S_M6Qtyh9waX8KkLibbkOQQdCpB4meG1YXP8

js microsoftrnd.co.il collected 2026-10-02 02:44:07 UTC 22,766 bytes, 664 lines download raw bytes

1//////////////////////////////////////////////////
2/*
3Carousel
4*/
5$('#carousel-news').on('slide.bs.carousel', function (e) {
6    //debugger;
7    //alert("test");
8    var $e = $(e.relatedTarget);
9    var idx = $e.index();
10    var itemsPerSlide = 3;
11    var totalItems = $('.carousel-item').length;
12
13    if (idx >= totalItems - (itemsPerSlide - 1)) {
14        var it = itemsPerSlide - (totalItems - idx);
15        for (var i = 0; i < it; i++) {
16            // append slides to end
17            if (e.direction == "left") {
18                $('.carousel-item').eq(i).appendTo('.carousel-inner');
19            }
20            else {
21                $('.carousel-item').eq(0).appendTo('.carousel-inner');
22            }
23        }
24    }
25})
26
27
28
29///////////////////////////////////////////
30var navbarOrgOffset = 0;
31var imgIndexWho = 10;
32var videoIndex = 10;
33var currentLocation = '';
34var skrollrObj = null;
35var curator = null;
36var curatorLoaded = false;
37var EscPress = false;
38
39$(document).ready(function () {
40
41    document.onkeydown = function (evt) {
42        evt = evt || window.event;
43        if (evt.keyCode == 27) {
44            if (document.activeElement.className == 'nav-link dropdown-toggle' && document.activeElement.ariaExpanded == 'true')
45                $('#hambugerBtn').click();
46            //EscPress = true;
47        }
48    };
49
50    SetPageEffects();
51
52    SetHeader();
53
54    SetBodyElemetns();
55
56    SetFooter();
57
58    Accesibility();
59});
60
61function SetPageEffects() {
62    //Initiat WOW JS
63    if (!/webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
64        new WOW().init();
65    } else {
66        // since we dont have wow we need to return visibility to hidden elements
67        var style = document.createElement("style");
68        style.appendChild(document.createTextNode(".wow{visibility:visible !important;}"));
69        document.head.appendChild(style);
70    }
71
72    // init parallex effects
73    if ($(window).innerWidth() >= 1024) {
74        setTimeout(function () {
75            //skrollr.init().destroy();
76            skrollrObj = skrollr.init();
77        }, 150);
78    }
79
80    if ($(window).innerWidth() <= 1024) {
81        $('.wow').removeClass('wow').addClass('wow-removed');
82    };
83
84    AOS.init();
85
86
87    $('#loader').hide();
88}
89
90function SetHeader() {
91
92    // Full page video random Gif Index
93    // var video = new Array();
94    // video[0] = "video/red-head-900px-5sec.mp4";
95    // video[1] = "video/woman-wind-hair-900px-5sec.mp4";
96    // video[2] = "video/man-with-pen-900px-5sec.mp4";
97    // var size = video.length;
98    // var x = Math.floor(size * Math.random());
99    // $('#HPvideo').html('');
100    // $('#HPvideo').append('	<source src="' + baseAssetsFolder + "/" + video[x] + '" type="video/mp4" >');
101
102
103    $('.dropdown-item').focus(function () {
104       // $(this).addClass("active");
105    });
106    $('.dropdown-item').blur(function () {
107       // $(this).removeClass("active");
108    });
109
110    //mobile menu header
111    $('#hambugerBtn').click(function () {
112        $('.navbar-nav').removeClass('submenuOpened');
113        $(this).toggleClass('is-active');
114        $('.navbar-brand').toggle();
115        $('.navbar-search-icon-mobile').toggle();
116        $('.searchButton.open').removeClass('open');
117        if ($('.navbar-collapse').hasClass("show")) {
118            $('.navbar-collapse').removeClass("show");
119        }
120        else {
121            $('.navbar-collapse').addClass("show");
122        }
123    });
124
125
126    // init navigation
127    if ($(window).innerWidth() <= 767) {
128        $("ul.navbar-nav .nav-link").click(function () {
129            setTimeout(function () {
130                if ($('.nav-item.dropdown.show').length > 0  ) {
131                    $('.navbar-nav').addClass('submenuOpened');
132
133                } else
134                    $('.navbar-nav').removeClass('submenuOpened');
135               
136
137            }, 30);
138        });
139    } else {
140        var menubar = new Menubar(document.getElementById('navbar'));
141        menubar.init();
142
143        // enable videos if not mobile
144        if ($(".site-hero video").length > 0) {
145            var videoUrl = $(".site-hero video source").attr("data-src");
146            $(".site-hero video source").attr("src", videoUrl);
147            $(".site-hero video source").removeAttr("data-src");
148            $(".site-hero video")[0].load();
149        }
150
151        $("ul.navbar-nav .nav-link.dropdown-toggle").click(function () {
152            var href = $(this).attr('href');
153            location.href = href;
154        });
155    }
156    //attaching the event listener
157    $(window).on('hashchange', function () {
158        SetMenu();
159    });
160
161    // init slide down arrow
162    $("#SlideDownArrow").on("click keypress", function (e) {
163        if (e.type == "keypress" && e.keyCode != 13) return;
164
165        if (navbarOrgOffset === 0) {
166            // no navbar, this means homepage so focus on another element
167            $('html, body').animate({
168                scrollTop: $("#HomepageWhoWeAreSection").offset().top
169            }, 1000);
170        }
171        else {
172            $('html, body').animate({
173                scrollTop: navbarOrgOffset - 70
174            }, 1000);
175        }
176    });
177
178    // set tabs
179    $('.RDtabs .anchor-link').on("click keypress", function (e) {
180        if (e.type == "keypress" && e.keyCode != 13) return;
181
182        var anchor = $(this).attr('href');
183        window.location.hash = anchor;
184        var anchor = anchor.replace('#', '');
185        var selectedPanel = $('.tab-content [role="tabpanel"]#' + anchor);
186
187        // set selected buttons
188        $('.RDtabs .anchor-link').each(function () {
189            $(this).attr("aria-selected", false);
190            $(this).attr("style", "");
191            $(this).removeClass('active');
192            $(this).attr('tabindex', -1);
193           // $(this).attr('title', $(this)[0].innerText);
194        });
195        $(this).addClass("active");
196        $(this).attr("aria-selected", true);
197        $(this).attr("style", "text-decoration:underline");
198        $(this).attr('tabindex', 0);
199        //$(this).attr('title', $(this)[0].innerText + " selected");
200
201        // hide all panels
202        $('.tab-content [role="tabpanel"]').each(function () {
203            $(this).attr("hidden", true);
204            $(this).removeClass('active');
205            $(this).attr('tabindex', -1);
206        });
207
208        // display selected panel
209        selectedPanel.removeAttr("hidden");
210        selectedPanel.addClass('active');
211        selectedPanel.removeClass('fade');
212        //selectedPanel.attr("tabindex", 0);
213
214        // set selected for main menu
215        $('header .nav-item .dropdown-item').removeClass('active').attr("aria-selected", false);
216        $('header .nav-item .dropdown-item[href*="#' + anchor + '"]').addClass('active').attr("aria-selected", true);
217
218        // set selected for footer
219        $('footer .anchor-link').removeClass('active');
220        $('footer .anchor-link[anchor="' + anchor + '"]').addClass('active');
221
222        // init curator widget
223        if (anchor === "LifeILDC" && curatorLoaded === false) {
224            curatorLoaded = true;
225            window.setTimeout(function () {
226                curator = new Curator.Widgets.Waterfall({
227                    container: '#curator-feed',
228                    feedId: '420bbce5-0cc6-4122-9e13-e1cd2b978eaa',
229                    templatePost: "custom-post-template",
230                    postsPerPage: 50,
231                    maxHeight: 700,
232                    postClickAction: 'goto-source',
233                    postClickReadMoreAction: 'goto-source',
234                });
235            }, 500);
236        }
237
238        // scroll back to top
239        if ($(window).innerWidth() > 767) {
240            var wow = new WOW();
241            wow.init();
242            var target = navbarOrgOffset - 70;
243            var currentScroll = $(window).scrollTop();
244            var distance = Math.abs(target - currentScroll);
245            var animationTime = Math.min(distance, 1300);
246            $('html, body').animate({
247                scrollTop: target // calculate time for effect according to distance 
248            }, animationTime, function () {
249                setTimeout(function () {
250                    window.scrollBy(0, 1); // force wow animation to run after tab content is loaded
251                    if ($(window).innerWidth() >= 1024) {
252                        setTimeout(function () {
253                            skrollr.init().destroy();
254                            var s = skrollr.init();
255                        }, 100);
256                    }
257                }, 200);
258            });
259        }
260    });
261
262    $(document).click(function (event) {
263        if (!$(event.target).closest('nav.navbar ').length) {
264            $('ul.submenuOpened').removeClass('submenuOpened');
265        }
266    });
267
268    // set tabs
269    const tabs = document.querySelectorAll('[role="tab"]');
270    const tabList = document.querySelector('[role="tablist"]');
271    // Enable arrow navigation between tabs in the tab list
272    let tabFocus = 0;
273    if (tabList) {
274        tabList.addEventListener("keydown", e => {
275            // Move right
276            if (e.keyCode === 39 || e.keyCode === 37) {
277                tabs[tabFocus].setAttribute("tabindex", -1);
278                if (e.keyCode === 39) {
279                    tabFocus++;
280                    // If we're at the end, go to the start
281                    if (tabFocus >= tabs.length) {
282                        tabFocus = 0;
283                    }
284                    // Move left
285                } else if (e.keyCode === 37) {
286                    tabFocus--;
287                    // If we're at the start, move to the end
288                    if (tabFocus < 0) {
289                        tabFocus = tabs.length - 1;
290                    }
291                }
292
293                tabs[tabFocus].setAttribute("tabindex", 0);
294                tabs[tabFocus].focus();
295            }
296        });
297    }
298
299    // in order to calculate correctly element position we need to wait until images are loaded and dom is settled 
300    setTimeout(function () {
301        navbarOrgOffset = $("#sidebar").offset().top;
302    }, 200);
303
304    // wait before subscrbing to scroll in order to not intefere with auto scroll on page load
305    setTimeout(function () {
306        document.addEventListener("scroll", onScrollHandler);
307        document.addEventListener("touchmove", onScrollHandler);
308    }, 1000);
309
310    setTimeout(function () {
311        window.addEventListener("resize", onResizeHandler);
312    }, 100);
313}
314
315//manually tiggering it if we have hash part in URL	
316$(window).load(function () {
317    onResizeHandler();
318    if (window.location.hash) {
319        setTimeout(function () {
320            SetMenu();
321        }, 300);
322    } else {
323        $(".nav-tabs .nav-link:first").addClass("show active");
324        $(".tab-pane:first").addClass("show active");
325    }
326});
327
328// home video parallex
329$(window).on('load scroll', function () {
330    var scrolled = $(this).scrollTop();
331    //$('.containerText').css({
332    //    'transform': 'translate3d(0, ' + -(scrolled * 0.2) + 'px, 0)', // parallax (20% scroll rate)
333    //    'opacity': 1 - scrolled / 400 // fade out at 400px from top
334    //});
335    $('.parallax-container').css('transform', 'translate3d(0, ' + (scrolled * 0.5) + 'px, 0)'); // parallax (25% scroll rate)
336    //$('.containerText').css('transform', 'translate3d(0, ' + -(scrolled * 0.5) + 'px, 0)'); // parallax (25% scroll rate)
337
338    onResizeHandler();
339});
340
341function onResizeHandler() {
342    // homepage video parallax effect not currenty working
343    //if ($("#HPvideo").length === 0) return;
344    //$(".bgImage1").css("position", "fixed");
345    //var videoHeight = $("#HPvideo").height();
346    //$("#BannersHomepageSection").css("height", videoHeight);
347    if ($(window).outerWidth() > 767) {
348        var l = $("#ComePrepared .pinkTitleSign ").width() + 70;
349        $(".interview-col").css("margin-left", "calc(50% - " + l + "px)");
350    }
351    else {
352        $(".interview-col").css("margin-left", "auto");
353    }
354
355}
356
357function SetBodyElemetns() {
358    // init video player
359    $('.videoPlayer').parent().click(function () {
360        if ($(this).children(".videoPlayer").get(0).paused) {
361            $(this).children(".videoPlayer").get(0).play();
362            $(this).children("#play").fadeOut();
363        } else {
364            $(this).children(".videoPlayer").get(0).pause();
365            $(this).children("#play").fadeIn();
366        }
367    });
368
369    // 	TODO: need to animate somehow wow animation, currently they are removed
370    // $('.carousel').on('slid.bs.carousel', function () {
371    // 	console.log("slide!");
372    //  })
373
374    // Video fold buttons
375    $('.pageButton a').click(function () {
376        if ($(this).closest('#EventsVideosDynamic').length === 0 && $(this).closest('#LifeILDC_VideoSection').length === 0) {
377            var index = $(this).closest('.videoButtons').find('a').index($(this));
378
379            $(this).closest('section').find('.WhoVideos iframe').hide().removeClass('fadeIn wow animated');
380            $(this).closest('section').find('.WhoVideos iframe:eq(' + index + ')').show().addClass('fadeIn wow animated');
381
382
383            $(this).closest('.videoButtons').find('.pageButton').removeClass('active');
384            $(this).parent().addClass('active');
385
386            if ($('.WhoVideos iframe').length > 0) {
387                for (var i = 0; i <= $('.WhoVideos iframe').length; i++) {
388                    var iframe = $('.WhoVideos iframe')[i]; //.get(0);
389                    var player = new Vimeo.Player(iframe);
390                    player.pause();
391                }
392            }
393        }
394
395    });
396
397    $('.closeVideo').click(function () {
398        $(this).parent('.wow').removeClass('fadeIn').addClass('fadeOut');
399        setTimeout(function () {
400            $('.VideoContainer').hide();
401            $('.boxContainer').show();
402        }, 500);
403        $(this).closest('.ProductVideos').find('.VideoContainer iframe').remove();
404    });
405
406    $('.pageButton a').click(function () {
407        var index = $(this).closest('.videoButtons').find('a').index($(this));
408
409        $(this).closest('section').find('.WhoVideos .valiant').hide();
410        $(this).closest('section').find('.WhoVideos .valiant:eq(' + index + ')').show();
411        $(this).closest('.videoButtons').find('.pageButton').removeClass('active');
412        $(this).parent().addClass('active');
413
414    });
415
416
417}
418const mediaQuery = window.matchMedia('(max-width: 767px)');
419function SetFooter() {
420
421    //mobile footer
422    $('footer span[role=heading]').on("click keypress", function (e) {
423        if (e.type == "keypress" && e.keyCode != 13) return;
424        // Check if the media query is true
425        if (mediaQuery.matches) {
426            $(this).closest('.col').toggleClass('opened');
427            $(this).next('ul').slideToggle();
428        }
429
430    });
431    // set footer
432    $('footer .anchor-link').click(function () {
433        var href = $(this).attr('href').split('#')[1];
434        if (href !== '' && href !== undefined)
435            window.location.hash = '#' + href;
436
437        SetMenu();
438
439        if ($(window).innerWidth() >= 1024) {
440            setTimeout(function () {
441                skrollr.init().destroy();
442                var s = skrollr.init();
443            }, 50);
444        }
445    });
446}
447
448
449function SetMenu() {
450
451    var query = window.location.hash.replace('#', '');
452    if (query !== '' && query !== null) {
453
454        if ($('.RDtabs .anchor-link[href*="' + query + '"]').length > 0) {
455            $('.RDtabs .anchor-link[href*="' + query + '"]').click();
456        }
457
458        if ($("#hambugerBtn").hasClass("is-active")) {
459            $("#hambugerBtn").click();
460            $("#SlideDownArrow").click();
461        }
462    }
463}
464
465function onScrollHandler() {
466
467    var currentScroll = $(window).scrollTop();
468
469    // sticky menu
470    var $nav = $(".fixed-top");
471    $nav.toggleClass('scrolled', currentScroll > $nav.height());
472
473
474    if ($(".sectionTabs").length > 0) {
475        // sticky tabs
476        // no tabs in mobile
477        var $tabs = $("#sidebar");
478
479        if ($(window).innerWidth() < 768) {
480            // make sure we are not stuck with tabs on resize
481            $("#myTabContent").css("margin-top", "0px");
482            $tabs.removeClass("sticky");
483            return;
484        }
485
486        var tabsTopViewportSpace = $(".sectionTabs")[0].getBoundingClientRect().top;
487        var navbarHeight = $(".navbar").height();
488        if (tabsTopViewportSpace + 40 < navbarHeight) {
489            $tabs.addClass("sticky");
490            $("#myTabContent").css("margin-top", $tabs.height() + "px"); // restore missing height after tabs switched to fixed position
491
492        } else {
493            $tabs.removeClass("sticky");
494            $("#myTabContent").css("margin-top", "0px");
495        }
496    }
497}
498
499function addYoutubeVideo(that, src, event) {
500
501    return; //because of accessability review 12/2020  
502
503    //if ($(window).innerWidth() < 768) {
504    //    // in mobile we go directly to app or site by simply letting the browser handel the youtube link
505    //    return false;
506    //}
507
508    //$(that).closest('.boxContainer').hide();
509    //$(that).closest('.ProductVideos').find('.VideoContainer').show();
510    ////$(that).closest('.ProductVideos').find('.VideoContainer .wow').addClass('fadeIn').removeClass('fadeOut');
511    //$(that).closest('.ProductVideos').find('.VideoContainer .embed-responsive').append('<iframe class="embed-responsive-item" src="' + src + '" allowfullscreen></iframe>');
512    //event.preventDefault();
513}
514
515function addOficeseVideo(that, src) {
516    $(that).closest('#LifeILDC_VideoSection').find('.embed-responsive iframe').remove();
517    $(that).closest('#LifeILDC_VideoSection').find('.embed-responsive').append('<iframe class="embed-responsive-item" src="' + src + "?enablejsapi=1&amp;modestbranding=1&amp;rel=0&amp;showinfo=0" + '" allowfullscreen></iframe>');
518}
519
520function addVideo360(that, src) {
521    $(that).closest('#EventsVideosDynamic').find('.Video360Container iframe').remove();
522    $(that).closest('#EventsVideosDynamic').find('.Video360Container').append('<iframe class="embed-responsive-item" src="' + src + '" allowfullscreen></iframe>');
523}
524
525
526function getParameterByName() {
527    var sPageURL = window.location.href.substring(1);
528    var sURLVariables = sPageURL.split('#')[1];
529    return sURLVariables;
530}
531
532
533(function ($) {
534    'use strict';
535    // bootstrap dropdown hover
536    // Stellar
537
538    if ($(window).innerWidth() >= 1024) {
539        $(window).stellar({
540            horizontalScrolling: false
541        });
542    }
543
544    var contentWayPoint = function () {
545        var i = 0;
546        $('.element-animate').waypoint(function (direction) {
547
548            if (direction === 'down' && !$(this.element).hasClass('element-animated')) {
549
550                i++;
551
552                $(this.element).addClass('item-animate');
553                setTimeout(function () {
554
555                    $('body .element-animate.item-animate').each(function (k) {
556                        var el = $(this);
557                        setTimeout(function () {
558                            var effect = el.data('animate-effect');
559                            if (effect === 'fadeIn') {
560                                el.addClass('fadeIn element-animated');
561                            } else if (effect === 'fadeInLeft') {
562                                el.addClass('fadeInLeft element-animated');
563                            } else if (effect === 'fadeInRight') {
564                                el.addClass('fadeInRight element-animated');
565                            } else {
566                                el.addClass('fadeInUp element-animated');
567                            }
568                            el.removeClass('item-animate');
569                        }, k * 100);
570                    });
571
572                }, 100);
573
574            }
575
576        }, {
577            offset: '95%'
578        });
579    };
580    contentWayPoint();
581
582
583})(jQuery);
584
585//function MenuShowItem(menuLink) {
586//    $('.dropdown-menu').removeClass('show');
587//    var menuDropdown = $(menuLink).closest('.dropdown').find('.dropdown-menu');
588//    menuDropdown.addClass('show');
589//    $(menuLink).attr("aria-expanded", true);
590//}
591
592//function MenuHideItem(menuLink) {
593//    $('.dropdown-menu').removeClass('show');
594//    $('.nav-link.dropdown-toggle').attr("aria-expanded", false);
595//}
596
597function Accesibility() {
598    //var index = 1;
599    //$('a').each(function () {
600    //    $(this).attr('tab-index', index);
601    //    index++;
602    //});
603
604    if ($(window).innerWidth() > 767) {
605
606
607        //$(".navbar .dropdown a.dropdown-toggle")
608        //.on("mouseenter", function () {
609        //    MenuShowItem(this);
610        //})
611        //.on("mouseleave", function () {
612        //    MenuHideItem(this);
613        //});
614
615        //$('.navbar .dropdown a.dropdown-toggle').focus(function () {
616        //    MenuShowItem(this);
617        //});
618
619        //$('.navbar .dropdown a.dropdown-item').focusout(function () {
620        //    MenuHideItem(this);
621        //});
622
623        //$(document).click(function (event) {
624        //    if (!$(event.target).closest('.navbar').length) {
625        //        $('.dropdown-menu').removeClass('tabShow');
626        //    }
627        //});
628
629        var tabPress = 0;
630        $(document).bind('keydown', function (event) {
631            if (event.keyCode === 9) {
632                tabPress++;
633            }
634
635            if (tabPress === 1) {
636                $('.wow').addClass('wowRemovedAccesibility').removeClass('wow').removeClass('animated');
637            }
638
639        });
640    }
641
642    $(document).bind('keydown', function (event) {
643        if (event.keyCode === 27) {
644
645            if ($('.VideoContainer').is(':visible') === true) {
646                $('.closeVideo').parent('.wow').removeClass('fadeIn').addClass('fadeOut');
647                setTimeout(function () {
648                    $('.VideoContainer').hide();
649                    $('.boxContainer').show();
650                }, 500);
651                $('.closeVideo').closest('.ProductVideos').find('.VideoContainer iframe').remove();
652
653            }
654
655            if ($('.navbar-collapse').hasClass("show")) {
656                $('#hambugerBtn').click();
657            }
658        }
659    });
660}
661
662
663
664

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.