PageSourceSearch

https://kol-barama.co.il/wp-content/themes/qs-starter-child/build/…?ver=0.54904900%201790292623

js kol-barama.co.il collected 2026-09-24 23:32:40 UTC 11,505 bytes, 402 lines download raw bytes

1var $item_grid = jQuery( '.trigger_isotop_items' );
2var filters    = {};
3var storyPlayerTimeout;
4
5jQuery(document).ready( function(){
6    init_players();
7    header_functions();
8    home_functions();
9    filter_functions();
10    show_functions();
11    search_functions();
12
13    if( jQuery(window).width() < 1024 ) {
14        jQuery( '.main_menu_wrapper ul li.show-list' ).attr( 'data-toggle', "offCanvasleft" );
15    }
16
17    initiate_isotop_on_items_grid();
18    init_owl();
19
20    jQuery(document).foundation();
21
22});
23
24
25function init_players(){
26    if( jQuery('#audio-player').length ){
27        jQuery('#audio-player').mediaelementplayer({
28            success: function(mediaElement, originalNode, instance) {
29                if (mediaElement.pluginType == 'flash') {
30                    mediaElement.addEventListener('canplay', function() {
31                        console.log('play');
32                        mediaElement.play();
33                    }, false);
34                }
35            }
36        });
37    }
38
39    if( jQuery('.item-audio-player').length ){
40        jQuery('.item-audio-player').each(function(){
41            var id = jQuery(this).attr('id');
42            jQuery('#' + id).mediaelementplayer({
43                success: function(mediaElement, originalNode, instance) {
44
45                }
46            });
47        });
48    }
49}
50function init_owl(){
51    if( jQuery(".owl-carousel").length ){
52        jQuery(".owl-carousel").owlCarousel({
53            autoPlay: 1000, //Set AutoPlay to 3 seconds
54            items: 1,
55            pagination : true,
56            paginationNumbers: true,
57            itemsDesktop : [1199,3],
58            itemsDesktopSmall : [980,3],
59            itemsTablet: [768,2],
60            autoPlay : true,
61            navigation : true,
62            navigationText : ["הקודם","הבא"]
63        });
64    }
65}
66
67function search_functions(){
68    jQuery( '.page-holder.search .show-tabs .inner-tabs .tabs-title' ).click( function(){
69        setTimeout( function(){
70            $item_grid.isotope();
71        }, 50);
72    });
73}
74
75function filter_functions(){
76    filter_items_by_tax();
77    sort_items();
78}
79function home_functions(){
80    initiate_home_main_slider();
81    timer();
82}
83function header_functions(){
84    display_header_search();
85    display_header_mega_menu();
86    display_header_main_menu();
87    initiate_custom_scrollbar_on_megamenu();
88    initiate_datepicker_on_header_search();
89    display_story_popup();
90    navigate_between_stories();
91    open_live_streaming_popup();
92    open_kolplay_live_popup();
93}
94function show_functions(){
95    open_full_show_popup();
96}
97
98jQuery(window).on( 'scroll', function(){
99    check_scroll_from_top_document();
100});
101
102jQuery(window).on( 'load', function(){
103    // show_popup();
104    $item_grid.isotope();
105});
106
107function open_kolplay_live_popup(){
108    jQuery( '.header .nav ul li.voice-play-live a' ).click( function(e){
109        e.preventDefault();
110        var link = jQuery(this).attr('href');
111        window.open( link, 'kolplay-live-popup', 'width=500,height=540' );
112    });
113}
114
115function open_live_streaming_popup(){
116    jQuery( '.header .nav ul li.live a, .header .main-menu-holder ul li.live a, .side-menu-holder .broadcast-now-holder a' ).click( function(e){
117        e.preventDefault();
118        var link = jQuery(this).attr('href');
119        window.location.href = link;
120    });
121}
122
123function timer(){
124    var end_date = jQuery( '.home-timer-section .timer-holder .timer-inner-holder' ).attr( 'data-end' );
125    jQuery( '.home-timer-section .timer-holder .timer-inner-holder .timer' ).countdown( end_date, function(e){
126        jQuery(this).html( e.strftime( '%H:%M:%S' ) );
127    });
128}
129function open_full_show_popup(){
130    jQuery( '.single-show .past-show-holder .past-show .left-side .open_past_show_popup' ).magnificPopup({
131        type          : 'inline',
132        closeBtnInside: true,
133        callbacks     :{
134            close: function(){
135                if( typeof jQuery('.player-fixed audio')[0] != 'undefined' ){
136                    jQuery('.player-fixed audio').each(function(){
137                        this.pause();
138                    });
139                }
140            }
141        }
142    });
143}
144
145function navigate_between_stories(){
146    jQuery( '.story-popup .navigation .story-navigation' ).click( function(e){
147        var current_count = parseInt(jQuery(this).parents('.story-popup').attr('data-count'));
148        var total_count   = jQuery('.story-popup').length / 2;
149        var new_count     = '1';
150        if( jQuery(this).hasClass('next') && current_count > 1 && current_count <= total_count ) {
151            new_count = current_count - 1;
152            navigate_story(new_count);
153        } else if( jQuery(this).hasClass('prev') && current_count < total_count ) {
154            new_count = current_count + 1;
155            navigate_story(new_count);
156        } else if( current_count == 6 && jQuery(this).hasClass('prev') ) {
157            navigate_story(new_count);
158        } else if( current_count == 1 && jQuery(this).hasClass('next') ) {
159            navigate_story(total_count);
160        }
161    });
162}
163
164function navigate_story(new_count){
165    jQuery.magnificPopup.close();
166
167    setTimeout( function(){
168        jQuery.magnificPopup.open({
169            items: {
170                src: "#story-popup-"+new_count+""
171            },
172            type: 'inline',
173            callbacks: {
174                open: function() {
175                    play_current_story();
176                },
177                close: function(){
178                    shut_down_stories();
179                }
180            }
181        });
182    }, 100);
183}
184
185function play_current_story(){
186
187    clearTimeout(storyPlayerTimeout);
188
189    storyPlayerTimeout = setTimeout( function(){
190        var mfp = jQuery.magnificPopup.instance;
191        var iframe = jQuery(mfp.container[0]).find('iframe');
192
193        if( iframe.length ){
194            var iframeSrc = iframe.data('src');
195
196            iframe.attr('src' , iframeSrc );
197        }
198
199    }, 1000);
200
201}
202
203function shut_down_stories(){
204    setTimeout( function(){
205        jQuery('.story-popup iframe').attr('src' , '');
206    }, 1000);
207}
208
209function show_popup(){
210    if( jQuery('body').hasClass('home') ) {
211        setTimeout( function(){
212            jQuery.magnificPopup.open({
213                items: {
214                    src: '#floating-popup'
215                },
216                type: 'inline'
217            });
218        }, 1500);
219    }
220}
221
222function check_scroll_from_top_document(){
223    var header        = jQuery( '.header' );
224    var header_height = header.outerHeight() - 300;
225
226    if( jQuery(window).scrollTop() > header_height ) {
227        header.addClass('after-header');
228    } else {
229        header.removeClass('after-header');
230    }
231}
232
233var sort;
234
235function sort_items(){
236    jQuery( '.trigger_sort_items_grid button' ).click( function(){
237        sort = jQuery(this).attr('data-sort-by');
238
239        jQuery(this).addClass('selected');
240
241        displaied_items_id = [];
242
243        load_more_items_handler();
244    });
245}
246
247function load_more_items_handler(){
248    load_more_items(function(){
249        $item_grid.isotope({
250            sortBy: sort,
251            sortAscending: false
252        });
253
254        $item_grid.isotope('updateSortData').isotope();
255
256        jQuery( '.trigger_sort_items_grid button' ).removeClass('selected');
257
258        sort = "";
259
260    },true);
261}
262var fill_grid = function(event, filteredItems){
263  if( filteredItems.length < 11 ){
264      load_more_items();
265  }else{
266      jQuery('.load_more_items').show();
267  }
268
269  //$item_grid.off( 'arrangeComplete', fill_grid );
270};
271
272function filter_items_by_tax(){
273    jQuery( '.filter_button_group button' ).click( function(){
274        jQuery( '.filter_button_group button' ).removeClass('selected');
275        jQuery(this).addClass('selected');
276        var button_group = jQuery(this).parents('.filter_button_group');
277        var filter_group = button_group.attr( 'data-filter-group' );
278
279        //filters[ filter_group ] = jQuery(this).attr('data-filter');
280        //console.log(filters[filter_group]);
281        //var filter_value = concat_values(filters);
282	var filter_value = jQuery(this).attr('data-filter');
283	//console.log(filter_value);
284        $item_grid.isotope({
285            filter: filter_value
286        });
287
288    });
289}
290function concat_values( obj ) {
291    var value = '';
292    for( var prop in obj ) {
293        value = obj[ prop ]; // value = obj[ prop ] for multy sort
294    }
295    return value;
296}
297
298function initiate_isotop_on_items_grid(){
299    $item_grid.isotope({
300        itemSelector     : '.item-holder',
301        transformsEnabled: false,
302        percentPosition  : true,
303        originLeft       : false,
304        layoutMode       : 'masonry',
305        masonry: {
306            rowHeight: 410,
307            columnWidth: '.grid-sizer'
308        },
309        getSortData: {
310            love: '[data-love] parseInt',
311            time: '[data-time] parseInt',
312        },
313    });
314
315    $item_grid.on( 'arrangeComplete', fill_grid);
316}
317
318function display_story_popup(){
319    var mfp = jQuery( '.open_story_popup' ).magnificPopup({
320        type: 'inline',
321        callbacks: {
322            open: function() {
323                play_current_story();
324            },
325            close: function(){
326                shut_down_stories();
327            }
328        }
329    });
330
331}
332
333function display_header_main_menu(){
334    jQuery( '.trigger_display_main_menu ' ).click( function(e){
335        e.preventDefault();
336        if( jQuery(window).width() > 1024 ) {
337            var main_menu = jQuery( '.header .main-menu-holder>div' );
338            var container = jQuery(this).parents('.main-menu-holder');
339            if( container.hasClass('opened') ) {
340                main_menu.slideUp();
341                container.removeClass('opened');
342            } else {
343                main_menu.slideDown();
344                container.addClass('opened');
345            }
346        } else {
347            jQuery(this).attr( 'data-toggle', "mobile-main-menu" );
348        }
349
350    });
351}
352
353function display_header_mega_menu(){
354    jQuery( '.trigger_mega_menu' ).click( function(e){
355        e.preventDefault();
356        jQuery( '.show-mega-menu .mega-main-holder' ).slideToggle();
357    });
358}
359
360function initiate_home_main_slider(){
361    jQuery( '.home-slider-holder' ).slick({
362        slidesToShow  : 1,
363        slidesToScroll: 1,
364        arrows        : true,
365        dots          : false,
366        infinite      : true,
367        autoplay      : true,
368        rtl           : true,
369        autoplaySpeed : 6000,
370        speed         : 2000,
371	prevArrow : '<button type="button" class="slick-prev" aria-label="לתמונה הקודמת"><span class="fa fa-angle-right"></span></button>',
372	nextArrow : '<button type="button" class="slick-next" aria-label="לתמונה הבאה"><span class="fa fa-angle-left"></span></button>',
373    });
374}
375
376function initiate_datepicker_on_header_search(){
377    jQuery( '.datepicker-select' ).datepicker({
378        showAnim: "slideDown",
379        dateFormat: "dd/mm/yy"
380    });
381
382}
383
384function initiate_custom_scrollbar_on_megamenu(){
385    jQuery( '.show-list-menu-holder' ).mCustomScrollbar({
386        axis: 'y',
387        scrollButtons: { enable: true }
388    });
389}
390
391function display_header_search(){
392    jQuery( '.header .show-search-box' ).click( function(e){
393        var search_box = jQuery( '.header-search' );
394        if( jQuery(this).hasClass('opened') ) {
395            search_box.slideUp();
396            jQuery(this).removeClass('opened');
397        } else {
398            search_box.slideDown();
399            jQuery(this).addClass('opened');
400        }
401    });
402}

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.