PageSourceSearch

https://www.globalmissioncenters.org/assets/js/default.js?v=1760425184

js globalmissioncenters.org collected 2026-10-08 08:22:52 UTC 4,535 bytes, 169 lines download raw bytes

1
2$(document).ready(function(){
3
4	$('.pub-issue .slide').hide();
5	$('.pub-issue .trigger').click(function(){
6		if ($(this).hasClass('open')){
7			$(this).html('View Story List').removeClass('open');
8			$(this).parent().siblings('.slide').slideUp(400);
9		}
10		else {
11			$(this).html('Hide Story List').addClass('open');
12			$(this).parent().siblings('.slide').slideDown(400);
13		}
14	});
15	
16	$('.nav-main .trigger').click(function(){
17		$(this).hide();
18		$(this).next('ul:hidden').slideDown(500);
19		$(this).siblings('#cse-search-box').show();
20	})	
21	
22	$('#search-field').focus(function(){
23		if ($(this).val() == "Search..."){
24			$(this).val('');
25		}
26	}).blur(function(){
27		if ($(this).val() == 0) {
28			$(this).val('Search...');
29		}
30	})
31	
32	var sbh = $('.detail-sb').height() + $('.c2').height() + $('.c3').height();
33	var ch = $('.c1').height();
34	
35	if (sbh >= ch){
36		$('.cwrap').css('min-height',sbh+40);
37	}
38	
39	$('#filters .trigger').click(function(){
40		if ($(this).hasClass('open')) {
41			$(this).removeClass('open').text('More Options');
42			$('#filters .extra').slideUp(300);
43		}
44		else {
45			$(this).addClass('open').text('Fewer Options');
46			$('#filters .extra').slideDown(300);
47		}
48	})
49	
50	if ($('input[name="country"]').length){
51		if ($('input[name="country"]').val().length) {
52			$('#filters .trigger').addClass('open').text('Fewer Options');
53			$('#filters .extra').slideDown(300);
54		}
55	}
56	
57	if ($('.vidlink').length){
58		videos();
59	}
60	
61	// embedded videos
62	function videos(){
63		var ytid = $('.vidlink').attr('rel');
64		var vw = ($('.sidebar-cbottom').width()*.86);
65		var vh = vw*.562;
66		$('.sidebar-cbottom>.vidlink').replaceWith('<iframe style="margin:0 7% 20px" width="'+vw+'" height="'+vh+'" src="//www.youtube.com/embed/'+ytid+'" frameborder="0" allowfullscreen></iframe>')
67		
68	}
69	
70	$('.vidlink,.sbvid').click(function(event){
71		event.preventDefault();
72		var vid = $(this).attr('itemid');
73		var vtype = $(this).attr('itemtype');
74		var vw = ($(window).width()*.8);
75		var vh = vw*.562;
76		if (vtype == 'yt'){
77			src = '//www.youtube.com/embed/'+vid+'?autoplay=1';
78		}
79		if (vtype == 'vm'){
80			src = 'https://player.vimeo.com/video/'+vid+'?autoplay=1';
81		}
82		$('body').append('<div class="overlay"><iframe src="'+src+'" frameborder="0" allowfullscreen></iframe><span class="close">X</span></div>');
83		$('.overlay').addClass=('visible');
84	})
85	
86	$('body').on('click','.close',function(){
87		console.log('click recorded');
88		$('.overlay').fadeOut(300,function(){
89			$(this).remove();
90		});
91	})
92	
93	// Photo Captioning
94	$('img.img-left,img.img-right').each(function(){
95		if ($(this).attr('alt').length){
96			var type = $(this).attr('class');
97			var caption = $(this).attr('alt');
98			var path = $(this).attr('src');
99			$(this).removeAttr('class style');
100			$(this).replaceWith('<div class="'+type+'"><img src="'+path+'"><p>'+caption+'</p></div>');
101		}
102	});
103	
104	$('.box-full').each(function(){
105		var caption = $(this).children('img').attr('alt');
106		if (caption && caption.length){
107			$(this).append('<p>'+caption+'</p>');
108		}
109	})
110	
111	//lessons
112	$(".edition ul").hide();
113	$(".edition h4").prepend('<span>+</span>').click(function(){
114		if ($(this).hasClass('open')){
115			$(this).removeClass('open').siblings('ul').slideUp(300);
116			$(this).children('span').html('+');
117		}else{
118			$(this).addClass('open').siblings('ul').slideDown(500);
119			$(this).children('span').html('–');
120		}
121		
122	})
123	
124	$('.accordian article').hide();
125	$('.accordian h3.trigger').prepend('<b>+</b>');
126	$('.accordian').on('click tap','.trigger',function(){
127		if ($(this).hasClass('open')){
128			$(this).removeClass('open').next('article').slideUp(500);
129			$(this).children('b').html('+');
130		}else{
131			$(this).addClass('open').next('article').slideDown(500);
132			$(this).children('b').html('-');
133		}
134	})
135	
136	$('#sb-username, #sb-password').attr('type','text');
137	$('#sb-username').val('Username');
138	$('#sb-password').val('Password');
139	$('#sb-username,#sb-password').focus(function(){
140		if ($(this).val() == 'Username' || $(this).val() == 'Password'){
141			$(this).val('');
142		}
143		if ($(this).attr('id') == 'sb-password'){
144			$(this).attr('type','password');
145		}
146	})
147	$('#sb-username,#sb-password').blur(function(){
148		if (!$(this).val().length){
149			if ($(this).attr('id') == 'sb-username'){
150				$(this).val('Username');
151			}else{
152				$(this).val('Password').attr('type','text');
153			}
154		}
155	})
156	
157	// Registration form tweaks
158	
159	$('#code').keyup(function(){
160		if ($(this).val().length > 0){
161			$('#divExtraFields').slideUp(300);
162		}else{
163			$('#divExtraFields:hidden').slideDown(300);
164		}
165	})
166	
167	
168});
169

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.