PageSourceSearch

https://www.iicc.org.il/js/custom.js?v=2

js iicc.org.il collected 2026-10-06 19:06:33 UTC 8,968 bytes, 314 lines download raw bytes

1
2
3$(window).on("load resize",function(e){	
4 $(function() {
5  $('.homepage_video_experience_section > .container-fluid > .row > [class*="col-"]').matchHeight(true);
6  $('.homepage_casualties_section_wrapper > .container > .row > [class*="col-"]').matchHeight(true);
7  $('.homepage_magazine_section > .container-fluid > .row > [class*="col-"]').matchHeight(true);
8  $('.homepage_article_col').matchHeight(true); 
9  $('.match_col').matchHeight(true); 
10 });
11 
12});
13
14(function( $ ) {
15
16	'use strict';
17
18	/*
19	Popup with video or map
20	*/
21	$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
22		//disableOn: 200,
23//		type: 'iframe',
24//		mainClass: 'mfp-fade',
25//		removalDelay: 160,
26//		preloader: false,
27//		fixedContentPos: false
28type: 'iframe',
29    iframe: {
30        patterns: {
31            youtube: {
32                index: 'youtube.com/', 
33                id: function(url) {        
34                    var m = url.match(/[\\?\\&]v=([^\\?\\&]+)/);
35                    if ( !m || !m[1] ) return null;
36                    return m[1];
37                },
38                src: '//www.youtube.com/embed/%id%?autoplay=1&rel=0&showinfo=0&wmode=opaque'
39            },
40            vimeo: {
41                index: 'vimeo.com/', 
42                id: function(url) {        
43                    var m = url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);
44                    if ( !m || !m[5] ) return null;
45                    return m[5];
46                },
47                src: '//player.vimeo.com/video/%id%?autoplay=1'
48            }
49        }
50    }
51	});
52	
53}).apply( this, [ jQuery ]);
54
55
56$(document).ready(function() {	
57
58if( $('.contact_popup').length ){
59      $('.contact_popup').delay(1500).fadeIn(500);
60      $(".contact_popup_close").click(function(){
61       $(".contact_popup").hide();
62     });
63 }
64
65 initMenu();
66 
67 if( $('.youtube_player').length ){
68    
69    var sound_iframe_src =  $('#sound_iframe').attr('src');
70	
71	var yt_int, yt_players={},
72    initYT = function() {
73        $(".ytplayer").each(function() {
74            yt_players[this.id] = new YT.Player(this.id);
75        });
76    };
77    
78	$.getScript("//www.youtube.com/player_api", function() {
79    yt_int = setInterval(function(){
80        if(typeof YT === "object"){
81            initYT();
82            clearInterval(yt_int);
83        }
84     },500);
85    });
86	
87    $('.pause_sound').click(function(){      
88        $('iframe').attr('src', '');
89        $( ".play_sound" ).show();
90        $( ".pause_sound" ).hide();
91    });
92	
93	sound_iframe_src = sound_iframe_src;
94	
95	$('.play_sound').click(function(){      
96        $('iframe').attr('src', sound_iframe_src);
97        $( ".pause_sound" ).show();
98        $( ".play_sound" ).hide();
99    });
100 }
101 
102 if( $('.tags_btn').length ){
103  $(".tags_btn").click(function() {
104    $('html, body').animate({
105        scrollTop: $("#tags_row").offset().top-100
106    }, 1000);
107  });
108 }
109 
110 $("iframe").each(function() {
111    var $frame = $(this)
112    $frame.attr('src', $frame.attr('src').replace('http:', 'https:'))
113 });
114 
115 $(".owl-carousel").each(function( i ) {
116  //****** set owl focus	  
117  var casualties_owl = $(this);
118  casualties_owl.on('initialized.owl.carousel', function() { 
119   $(this).find('.owl-item').attr('aria-selected','false');
120   $(this).find('.owl-item.active').attr('aria-selected','true'); // let screen readers know an item is active
121   $(this).find('.owl-item.cloned a').attr('tabindex', '-1');
122   $(this).find('.owl-item a').focusin(function() {
123    $(this).parents('.owl-carousel').addClass('focused_owl_wrapper')
124   });
125   $(this).find('.owl-item a').focusout(function() {
126    $(this).parents('.owl-carousel').removeClass('focused_owl_wrapper')
127   });
128  })
129 });
130  
131 
132 // $('.homepage_casualties_carousel').owlCarousel({
133//	  items: 1,
134//	  autoplay: true, 
135//	  smartSpeed: 1800, 
136//	  dots: false, 
137//	  autoplayTimeout: 6000
138//  });
139
140// var casualties_owl = $('.homepage_news_carousel');
141// casualties_owl.on('initialized.owl.carousel', function(event) {
142//  $(".homepage_news_carousel .owl-item a").focusin(function() {
143//   //console.log("test");
144//   casualties_owl.trigger('next.owl.carousel');
145//  });
146// })
147//
148//$('.homepage_news_carousel').on('initialized.owl.carousel change.owl.carousel changed.owl.carousel ', function (e) {
149//if (!e.namespace || e.type != 'initialized' && e.property.name != 'position') return;
150//var current = e.relatedTarget.current()
151//var items = $(this).find('.owl-stage').children()
152//console.log("current"+current);
153//var add = e.type == 'changed' || e.type == 'initialized'
154//items.eq(e.relatedTarget.normalize(current)).toggleClass('current', add)
155//
156//});
157
158// var casualties_owl = $('.homepage_news_carousel');
159// casualties_owl.on('initialized.owl.carousel', function() { 
160//    
161//    $('.homepage_news_carousel .owl-item').attr('aria-selected','false');
162//    $('.homepage_news_carousel .owl-item.active').attr('aria-selected','true'); // let screen readers know an item is active
163//
164//    // listen for keyboard input
165//    $(".homepage_news_carousel").on('keydown', function(e){
166//        console.log("keydown");
167//        var $focusedElement = $(document.activeElement),
168//        singleOwl = $(".homepage_news_carousel").data('owlCarousel'),
169//            type = e.which == 39? 'next': null,
170//            type = e.which == 37? 'prev': type,
171//            type = e.which == 13? 'enter':type;
172//
173//        // if the carousel is focused, use left and right arrow keys to navigate
174//        if($focusedElement.attr('id') === 'owl-single-example'){
175//          console.log("focusedElement");
176//          if (type == 'next') {
177//            singleOwl.next();
178//          } else if (type == 'prev') {
179//            singleOwl.prev();
180//          }
181//
182//        // if the prev and next buttons are focused, catch "Enter" and navigate in the right direction
183//        } else if (type == 'enter') {
184//        if ($focusedElement.hasClass('owl-next')) {
185//          singleOwl.next();
186//        } else if ($focusedElement.hasClass('owl-prev')) {
187//          singleOwl.prev();
188//        }
189//      }
190//  });
191// })
192// 
193 
194}); 
195
196function initMenu() {
197
198	$('.sidebar_menu ul').hide();
199	$('li.active').parents("li").addClass("active");
200	$('.sidebar_menu .active ul').show();
201
202	$('.sidebar_menu li a').click(
203		function() {
204			var checkElement = $(this).next();
205			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
206				$(this).next().toggle("slow");
207				//return false;
208			}
209			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
210				$('.sidebar_menu ul:visible').slideUp('normal');
211				$('.sidebar_menu ul li a').addClass('opened');
212				var a_element = checkElement.parent();
213				$(a_element).addClass('top_opened');
214				checkElement.slideDown('normal');
215				//return false;
216			}
217			
218			if ($('.sidebar_menu ul li a').hasClass('opened')) {
219				//alert("test");
220				//$(this).parent().addClass('top_opened');
221			}
222							
223		}
224	);
225
226}
227
228function isValidEmailAddress(emailAddress) {
229    var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
230    return pattern.test(emailAddress);
231};
232	
233var relPath = "";
234$("#newsletterForm").submit(function(e) {
235		   
236	var signin_email = $("#newsletterEmail").val();
237	$("#newsletterAlert").html('');
238	
239	if(signin_email !== '') {
240		    
241	if(isValidEmailAddress(signin_email)) {
242		
243	$.ajax({
244		type: "POST",
245		url: relPath + "member_functions.asp",
246		data: {
247			action: "register",
248			email: signin_email,
249		},
250
251		success: function(theResponse) {
252		
253			if (theResponse == "wrong_params") {
254				$("#newsletterAlert").html('נא להזין כתובת תקינה לדוגמא [email protected]');
255			}
256			else if (theResponse == "email_exist") {
257				$("#newsletterAlert").html('דואר אלקטרוני קיים במערכת');
258			}
259			else {
260				$("#newsletterAlert").html('תודה על הרשמתך');
261
262			}
263		}
264	});
265	
266	}
267	
268	else {
269		 $("#newsletterAlert").html('נא להזין כתובת תקינה לדוגמא [email protected]');
270	}
271	
272	}
273	
274	else {
275		 $("#newsletterAlert").html('נא להזין דואר אלקטורני');
276	}
277		 	
278	e.preventDefault();
279});
280
281
282// search form validation    
283$(".inner_search_form, .sidebar_search_form").validate
284({ 
285
286	rules: 
287	{ 
288		q: {required:true},
289	}
290	
291}); 
292
293
294$("#searchForm").validate
295({ 
296
297	rules: 
298	{ 
299		q: {required:true}
300	}
301	
302}); 
303
304$("#footer .header-search form").validate
305({ 
306
307	rules: 
308	{ 
309		q: {required:true}
310	}
311	
312}); 
313
314

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.