PageSourceSearch

https://mymsaa.org/wp-content/themes/dwf-nh-08/site.js?ver=1.1.1.489876

js mymsaa.org collected 2026-09-24 09:54:16 UTC 11,705 bytes, 426 lines download raw bytes

1$(document).ready(function() 
2{
3
4/* NAV/HAMBURGER CODE */
5	$burgermenu = 0;
6	$burgersubmenu = 0;
7	/* $burgertertmenu = 0; */
8
9	$("div.container header.site-header div.row div div.nh_hamb_nav img").click(function()
10	{
11		if ($burgermenu == 0)
12		{
13			$burgermenu = 1;
14			$("div.container div.navigation-wrap, div.container div.navigation-wrap nav, div.container div.navigation-wrap nav#masthead.navbar.navbar-default.site-navigation ul.menu").css("display", "block");
15		}
16		else
17		{
18			$burgermenu = 0;
19			$("div.container div.navigation-wrap, div.container div.navigation-wrap nav").css("display", "none");
20		}
21	});
22	
23	$("div.container div.navigation-wrap nav ul.menu li").click(function()
24	{
25		if ($burgersubmenu == 0)
26		{
27			$burgersubmenu = 1;
28			$("div.container div.navigation-wrap nav ul.menu li.dropdown ul.dropdown-menu").css("display", "none");
29			$(this).find("> ul.dropdown-menu").css("display", "block");
30			$("#page div header div div div img#hamburger").attr("aria-expanded", "true");
31			
32		}
33		else
34		{
35			$burgersubmenu = 0;
36			$("div.container div.navigation-wrap nav ul.menu li.dropdown ul.dropdown-menu").css("display", "none");
37			$("#page div header div div div img#hamburger").attr("aria-expanded", "false");
38		}
39	});
40
41	/*$("div.navigation-wrap nav.navbar ul.menu li.menu-donate ul.dropdown-menu li.dropdown.menu-other-ways-to-give a").click(function()
42	{
43		$("div.navigation-wrap nav.navbar ul.menu li.menu-donate ul.dropdown-menu li.dropdown.menu-other-ways-to-give ul.dropdown-menu").css("display", "block");		
44	});
45	*/
46	
47	
48	/*$("div.container div.navigation-wrap nav ul.menu li.dropdown.menu-donate ul.dropdown-menu li.dropdown.menu-other-ways-to-give").click(function()
49	{
50		if ($burgertertmenu == 0)
51		{
52			$burgertertmenu = 1;
53			$(this).find("> ul.dropdownmenu").css("display", "block");
54		}
55		else
56		{
57			$burgertertmenu = 0;
58			$("div.container div.navigation-wrap nav ul.menu li.dropdown.menu-donate ul.dropdown-menu li.dropdown.menu-other-ways-to-give ul.dropdown-menu").css("display", "none");
59		}
60	});*/
61																					
62	
63	
64	
65	
66	
67	
68
69/* SEARCH CODE */
70
71	/*
72	$("div.navigation-wrap nav.navbar ul.menu li.menu-s a").click(function()
73	{
74		$("div.container div.navigation-wrap nav.navbar div#nh_search_box")
75			.animate(
76			{
77				width: "100%", 
78				height: "42px",
79				opacity: 1
80			}, 125, "linear", function()
81			{
82				$("div.container div.navigation-wrap nav.navbar div#nh_search_box form p input")
83				.fadeIn(10, function()
84				{
85					$("div.container div.navigation-wrap nav#masthead.navbar.navbar-default.site-navigation ul#menu-nh-menu-191105a.menu li.menu-s a").css(
86					{
87						"background-color" : "#00558C", 
88						"background-position" : "-60px -60px"
89					});
90				});
91			});
92	});
93	
94	$("div.container div.navigation-wrap nav.navbar div#nh_search_box form p span#nh_s_exit")
95	.click(function()
96	{
97		$("div.container div.navigation-wrap nav.navbar div#nh_search_box")
98			.animate(
99			{
100				width: "1%", 
101				height: "1px",
102				opacity: 0
103			}, 125, "linear", function()
104			{
105				$("div.container div.navigation-wrap nav#masthead.navbar.navbar-default.site-navigation ul#menu-nh-menu-191105a.menu li.menu-s a").css(
106				{
107					"background-color" : "#a9a9a9", 
108					"background-position" : "center center"
109				});
110			});		
111	});*/
112	
113	/*$("div.container div.navigation-wrap nav.navbar div#nh_search_box form p input#nh_s_buttonk").click(function()*/
114	
115	/*(function() {
116var cx = '006069380093883528586:a7y-hptvn38';
117var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
118gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
119var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
120})();*/
121
122	/*$("input#nh_s_button").click(function()
123	{
124		alert("search");
125	});*/
126
127/* END SEARCH CODE */
128
129
130/* SPECIAL CLICK LISTENER FOR THE 'EVENTS/HIT MEN' BLOCK */
131
132	/*$("div.content-area main div.page-content div#annivben").click(function()
133	{
134		window.location.href = "http://support.mymsaa.org/benefit";
135	});*/
136
137
138/*html body.home.page-template.page-template-template-full-width.page-template-template-full-width-php.page.page-id-16706.logged-in.admin-bar.customize-support div#page.hfeed.site div#content.site-content.nhfront div.container div#primary.content-area main#main.site-main div.page-content div#annivben.h_csect.h_upcoming div.h_htext div p.learnmore a*/
139
140
141/* TESTIMONIALS ROTATION CODE */
142
143	var tstcount = $("#testimonial_block blockquote").length;	
144	var rndtestm = Math.floor(Math.random()*tstcount);
145	rndtestm = 1 + Math.floor(Math.random()*(tstcount - 1));
146	
147	$("#testimonial_block blockquote").css("display", "none");
148	$("#testimonial_block blockquote:nth-child(" + rndtestm + ")").css("display", "block");
149
150/* END TESTIMONIALS */
151
152/* HOW YOU CAN HELP BUTTON FORM */
153
154	var hychselected = 0;
155	var hychmonthly = 0;
156	var hychtemp = "";
157	var hychidtext = "";
158	var hychoptraw = "";	
159
160	function hychmakelink(hsel, hmon, hopt)
161	{
162		/* clean the other text */
163		optraw = hopt;
164		optmatch = optraw.match(/\d{1,6}(\.\d{1,2})?/g);
165		optvalue = parseFloat(optmatch);
166		
167		cturlbase = 'https://secure.mymsaa.org/site/Donation2?';
168		cturlbase += 'df_id=8632&8632.donation=form1&mfc_pref=T&';
169		cturlbase += "promo_name=DF_teaser&";
170
171		/* ORIGINAL PATH: as above, plus 
172		set.DonationLevel=12699&
173		set.OptionalRepeat=FALSE&
174		_ga=2.62003628.1695661199.1612213428-934203427.1605128988 */
175
176		
177		/* amount=200&set.OptionalRepeat=FALSE&
178		_ga=2.62003628.1695661199.1612213428-934203427.1605128988 */
179		
180		amt = 0;
181		bamd = 0;
182		durl = "";
183		
184		switch(hsel)
185		{
186			case 1: /* 50   */ /* durl = cturlbase + "&set.DonationLevel=12697"; */
187				durl = cturlbase + 'amount=50';
188			break; 
189			
190			case 2: /* 250  */ /* durl = cturlbase + "&set.DonationLevel=12699"; */
191            	durl = cturlbase + 'amount=250';
192			break;
193			
194			case 3: /* 1000 */ /* durl = cturlbase + "&set.DonationLevel=12701"; */
195            	durl = cturlbase + 'amount=1000';
196			break;
197			
198			case 4: /* Other */
199				/* durl = cturlbase + "&set.DonationLevel=12702"; durl += "&set.Value=";
200				durl += (optvalue * 100); */
201				durl = cturlbase + 'amount=' + optvalue; /*(optvalue * 100);*/
202			break;
203		}
204		
205		switch(hmon)
206		{
207			case 1: durl += "&set.OptionalRepeat=TRUE"; 
208				break;
209			case 0: durl += "&set.OptionalRepeat=FALSE"; 
210				break;
211		}
212
213		durl += '&_ga=2.62003628.1695661199.1612213428-934203427.1605128988';
214		
215		$("p#hych06.donatenow a").attr("href", durl);
216	}	
217	
218	$("li.def, li.tog").click(function()
219	{
220		$("li.def, li.tog").css(
221		{
222			"background-color": "white", 
223			"color": "#00558C"
224		});
225
226		$(this).css(
227		{
228			"background-color": "#e4002b", 
229			"color": "white"
230		});
231		
232		hychtemp = $(this).attr("id");
233		hychidtext = hychtemp.substr(5,1);
234		hychselected = parseInt(hychidtext);
235		if (hychselected == 4)
236		{
237			if ($("li#hych04 label").css("display") == "none")
238			{}
239			else
240			{
241				$("li#hych04 label").css("display", "none");
242				$("li#hych04 input").val("").css("display", "block").focus();
243			}
244		}
245		else
246		{
247			$("li#hych04 label").css("display", "block");
248			$("li#hych04 input").css("display", "none");
249		}
250
251		
252	});
253	
254	$("p.bamd span#hych05").click(function()
255	{
256		/* ☐ ... ☒ */
257		if (hychmonthly == 0) 
258		{ 
259			hychmonthly = 1;
260			$(this).html("✓"); /*☑");*/
261		}
262		else
263		{
264			hychmonthly = 0;
265			$(this).html(" "); /*☐");*/
266		}
267	});
268	
269	$("p#hych06.donatenow a").click(function()
270	{
271		hychoptraw = $("li#hych04.def input#hychother").val();
272		
273		hychmakelink(hychselected,hychmonthly,hychoptraw);
274	});
275	
276	/* establish default link upon page load */
277	hychselected = 2;
278	hychmakelink(hychselected,hychmonthly,hychoptraw);
279	
280/* END HOW YOU CAN HELP */
281
282/* A11Y - keyboard NAV/FOCUS HELPER */
283
284	/*$( ".menu li.dropdown" ).focusin(function() 
285	{
286		$(".menu > li.dropdown > ul.dropdown-menu").css("display", "none");
287		$(this).find("ul.dropdown-menu").css("display", "block");
288
289	});
290	
291	$(".menu > li.dropdown.menu-about-msaa > ul > li > a").focus(function()
292	{
293		$(this).css("backgroundColor", "red");
294	});*/
295/* END KEYBOARD TAB<FOCUS HELP */
296	
297	
298/* BEGIN LOG IN AND LUMINATE SESSION CODE */
299	
300	var mdomain = "mymsaa.org"; 
301	var isloggedraw = "";
302	var isloggedval = 0;
303	var isloggedtemp = "";
304	var msapicookie = "";
305	var ismobile = "no";
306	var isloggedin = "no";
307
308
309		
310	/* MOVED INIT TO HEAD OF HEADER.PHP 
311	luminateExtend.init(
312	{ 
313		apiKey: 'msaadetectives', 
314		path: 
315		{ nonsecure: 'http://' + mdomain, secure: 'https://secure.mymsaa.org/site/' }
316	});*/
317
318	function showstandardline()
319	{
320		/*console.log("SHOWSTANDARD");*/
321		$("#page div header div nav ul li.h_mob_reg").html('<a href="http://support.mymsaa.org/site/ConsProfileUser" tabindex="0">Register</a>');
322		$("#page div header div nav ul li.h_mob_log").html('<a href="https://secure.mymsaa.org/site/UserLogin" tabindex="0">Login</a>');
323	}
324	
325	function showmyaccountline()
326	{
327		/*console.log("ACCOUNTLINE");*/
328		$("#page div header div nav ul li.h_mob_reg").html('<a href="http://support.mymsaa.org/site/ConsProfileUser" tabindex="0">My Account</a>');		
329		$("#page div header div nav ul li.h_mob_log").html('<span class="logoutlink">logout</span>');
330	}
331		
332	var wcallbackalpha = function(walphadata)
333	{ 
334		isloggedraw = '' + JSON.stringify(walphadata);
335		isloggedtemp = String(isloggedraw);
336		console.log(isloggedtemp);
337		isloggedval = isloggedtemp.indexOf('User not logged in'); 
338		if (isloggedval >= 0) 
339		{ isloggedin = "no"; showstandardline(); } 
340		else 
341		{ isloggedin = "yes"; showmyaccountline(); }
342	};
343	
344	/*luminateExtend.api.getAuth(useHTTPS = true);*/
345	
346	wdatalinealpha = 'method=loginTest&v=1.0';
347
348	/*luminateExtend.api.request(
349	{
350		api: 'cons', 
351		callback: wcallbackalpha, 
352		data: wdatalinealpha, 
353		useHTTPS: true, 
354		type: 'POST'
355	});*/
356
357	$('#page div header div nav ul li.h_mob_log').click(function()
358	{
359		/*  span.logoutlink */
360		mobloghtml = $(this).html();
361		if (mobloghtml.indexOf("logoutlink") == -1)
362		{}
363		else
364		{
365			/*var n = str.indexOf("welcome");*/
366			wlogoutline = 'method=logout&v=1.0';
367			luminateExtend.api.request(
368			{ 
369				api: 'cons', 
370				data: wlogoutline, 
371				useHTTPS: true, 
372				type: 'POST'
373			});
374			isloggedin = "no";
375			showstandardline();
376		}
377	});
378	
379	/*luminateExtend.api.request(
380	{
381		api: 'cons', 
382		callback: wcallbackalpha, 
383		data: wdatalinealpha, 
384		useHTTPS: true  
385	});*/
386	
387	/*https://secure.mymsaa.org/site/CRConsAPI?method=getUser&v=1*/
388	
389	/*luminateExtend.api.request(
390	{
391		contentType: 'application/x-www-form-urlencoded', 
392		data: 'method=loginTest&api_key=[value]&response_format=json&suppress_response_codes=true&v=1.0', 
393		dataType: 'json', 
394		success: function(data) { console.log(data); }, 
395		type: 'GET', 
396		url: 'http://secure.mymsaa.org/site/CRConsAPI', 
397		xhrFields: { withCredentials: true } 
398	}); */
399
400		 
401	
402	/*<li class="h_mob_reg"><a href="http://support.mymsaa.org/site/ConsProfileUser" tabindex="0">Register</a></li>*/
403		
404/* END LOG IN AND LUMINATE SESSION CODE */
405	
406/* GENERAL MOBILE-RELATED SCRIPTING SHOULD GO BELOW */
407/* END GENERAL MOBILE SCRIPTING */
408	
409	/* TREATMENT TO RESET DROPDOWNS UPON WINDOW FOCUS/LINK ACTIVATED IN NEW WINDOW + USER RETURN 
410	 * (rolled back 11/5) */
411	$(window).focus(function() 
412	{
413		/* get hover state of nav menu li tags 
414		var isNavHovered = $('div.container div.navigation-wrap nav ul li').is(".hover");
415		if (isNavHovered == true) { alert("1"); } */
416		/*location.reload();
417		$("div.container div.navigation-wrap nav ul li.dropdown").css("display");		
418		$("div.container div.navigation-wrap nav ul li.dropdown").css("all", "revert");*/
419		
420	});
421	
422	/*$("div.container div.navigation-wrap nav ul li.dropdown").css("display", "initial");*/
423	
424});
425	
426	

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.