PageSourceSearch

https://www.transcripture.com/theme/js/functions.js

js transcripture.com collected 2026-10-02 12:48:49 UTC 4,256 bytes, 154 lines download raw bytes

1// jQuery enhanced menu
2function MainMenu(){
3	this.navLi = $('#nav li').children('ul').hide().end();
4
5	$('#nav li li:has(ul)').append('<span class="hasChildren"></span>');
6	
7	this.navLi.hover(function() {
8		// Mouse over
9		$(this).find('> ul').stop(true, true).slideDown('slow', 'easeOutBounce');
10		}, function() {
11		// Mouse out
12		$(this).find('> ul').stop(true, true).hide(); 		
13	});
14}
15
16
17
18// On page load
19$(document).ready(function() {
20	// Contact form validation
21	$('#submit-button').click(function(){
22		// Getting variables
23		var input_name = $('input:eq(0)').val(),
24			input_email = $('input:eq(1)').val(),
25			input_website = $('input:eq(2)').val(),
26			input_message = $('textarea').val(),
27			
28			ajax_loader = '<img src="img/preloader.gif" alt="Loading..." />';
29			
30		// Hide any previous text
31		$("#negativeResponse").hide();
32		
33		// Show the loader
34		$("#submitLoader").html(ajax_loader);
35		
36		$.post("sendMail.php", {name: input_name, email: input_email, website: input_website, message: input_message}, function(data){
37			// Hide the loader
38
39			$("#submitLoader img").fadeOut(function(){
40				if(data=='<h2 class="dark">Your message has been sent</h2><p>Your message has been successfully sent. We will get back to you as soon as we can !<br /><br />Thanks!</p>') {
41					$('#negativeResponse').hide();
42					
43					$('#contact-form fieldset').fadeOut(function(){
44						$('#positiveResponse').html(data);
45						$('#positiveResponse').fadeIn();
46					});
47				}
48				else {
49					$('#negativeResponse').html(data);
50					$('#negativeResponse').fadeIn();
51				}
52			});
53		});
54		
55		return false;
56	});
57
58
59
60	// Blog comment form validation
61	$('#comment-submit-button').click(function(){
62		// Getting variables
63		var input_name = $('input:eq(0)').val(),
64			input_email = $('input:eq(1)').val(),
65			input_website = $('input:eq(2)').val(),
66			input_comment = $('textarea').val(),
67			
68			ajax_loader = '<img src="img/preloader.gif" alt="Loading..." />';
69			
70		// Hide any previous text
71		$("#positiveResponse").hide();
72		$("#negativeResponse").hide();
73		
74		// Show the loader
75		$("#submitLoader").html(ajax_loader);
76		
77		$.post("submitComment.php", {name: input_name, email: input_email, website: input_website, comment: input_comment}, function(data){
78			// Hide the loader
79
80			$("#submitLoader img").fadeOut(function(){
81				if(data=='<p>Your comment has been submitted and it might be waiting for approval before it shows up in the comment list.<br /><br />Thanks!</p>') {
82					$('#negativeResponse').hide();
83					
84					$('#positiveResponse').html(data);
85					$('#positiveResponse').fadeIn();
86					
87					// Reset the form
88					$('#blog-comment-form')[0].reset();
89				}
90				else {
91					$('#negativeResponse').html(data);
92					$('#negativeResponse').fadeIn();
93				}
94			});
95		});
96		
97		return false;
98	});
99
100
101
102	// Rollover function for the form submit element
103    $("input:image[src$=img/subscribeButton.png]").hover(function() {
104        $(this).attr("src", "img/subscribeButtonOver.png")
105    }, function(){
106        $(this).attr("src", "img/subscribeButton.png")    
107    });
108
109    $("input:image[src$=img/submitButton.png]").hover(function() {
110        $(this).attr("src", "img/submitButtonOver.png")
111    }, function(){
112        $(this).attr("src", "img/submitButton.png")    
113    });
114
115
116
117	// Tipsy Init
118	$(function() {
119		$('ul.socialNav li a').tipsy({fade: true, gravity: 'n'});
120		$('div#contactInformation a').tipsy({fade: true, gravity: 'n'});
121		$('div#sharePost ul li a').tipsy({fade: true, gravity: 'n'});
122	});
123	
124	
125	
126	// Activate the tabs
127	$(".tabContent").hide(); //Hide all content
128	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
129	$(".tabContent:first").show(); //Show first tab content
130
131
132
133	//On click event
134	$("ul.tabs li").click(function() {
135
136		$("ul.tabs li").removeClass("active"); //Remove any "active" class
137		$(this).addClass("active"); //Add "active" class to selected tab
138		$(".tabContent").hide(); //Hide all tab content
139
140		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
141		$(activeTab).fadeIn(); //Fade in the active ID content
142		return false;
143	});
144	
145	
146	
147	// Call the menu function
148	MainMenu();
149	
150	
151	
152	// Activate image preloading
153	$(".preloadImg").preloader();
154});

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.