PageSourceSearch

https://jewua.org/wp-content/themes/Aggregate/js/custom.js

js jewua.org collected 2026-10-02 12:19:12 UTC 5,761 bytes, 144 lines download raw bytes

1jQuery.noConflict();
2
3jQuery(document).ready(function(){
4	var et_disable_toptier = jQuery("meta[name=et_disable_toptier]").attr('content'),
5		et_theme_folder = jQuery("meta[name=et_theme_folder]").attr('content'),
6		$et_top_menu = jQuery('ul#top-menu > li > ul'),
7		$et_secondary_menu = jQuery('ul#secondary-menu li ul');
8
9	jQuery('ul.nav').superfish({
10		delay:       300,                            // one second delay on mouseout
11		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
12		speed:       'fast',                          // faster animation speed
13		autoArrows:  true,                           // disable generation of arrow mark-up
14		dropShadows: false                            // disable drop shadows
15	});
16
17	if ( $et_top_menu.length ){
18		$et_top_menu.prepend('<li class="menu-gradient"></li>');
19		jQuery('ul#top-menu li ul li').each(function(){
20			if ( jQuery(this).prevAll().length == 0 && !jQuery(this).hasClass('menu-gradient') ) jQuery(this).addClass('first-item');
21		});
22	}
23
24	if ( $et_secondary_menu.length ){
25		$et_secondary_menu.find('>li:odd').addClass('even-item');
26	}
27
28	var $featured_content = jQuery('#featured #slides'),
29		et_featured_slider_auto = jQuery("meta[name=et_featured_slider_auto]").attr('content'),
30		et_featured_auto_speed = jQuery("meta[name=et_featured_auto_speed]").attr('content'),
31		et_featured_slider_pause = jQuery("meta[name=et_featured_slider_pause]").attr('content');
32
33	jQuery(window).load( function(){
34		var $et_sidebar = jQuery('#sidebar'),
35			$et_entries = jQuery('#entries');
36
37		if ( $et_sidebar.length && ( $et_sidebar.height() > $et_entries.height() ) )
38			$et_entries.css( 'min-height', $et_sidebar.height() - 58 );
39
40		if ($featured_content.length){
41			var $featured_controllers = jQuery('#controllers ul li'),
42				$featured_controllers_links = $featured_controllers.find('a'),
43				$et_active_arrow = jQuery('div#active_item'),
44				et_featured_options = {
45					timeout: 0,
46					speed: 500,
47					cleartypeNoBg: true,
48					prev:   '#featured a#left-arrow',
49					next:   '#featured a#right-arrow',
50					before: function (currSlideElement, nextSlideElement, options, forwardFlag) {
51						var $et_active_slide = jQuery(nextSlideElement),
52							et_active_order = $et_active_slide.prevAll().length;
53
54						$featured_controllers_links.removeClass('active').eq(et_active_order).addClass('active');
55
56						$et_active_arrow.animate({"left": $featured_controllers.eq(et_active_order).find('div').position().left+37}, "slow");
57					}
58				}
59
60			if ( et_featured_slider_auto == 1 ) et_featured_options.timeout = et_featured_auto_speed;
61			if ( et_featured_slider_pause == 1 ) et_featured_options.pause = 1;
62
63			$featured_content.cycle( et_featured_options );
64
65			$featured_content.css('backgroundImage','none')
66			if ( $featured_content.find('.slide').length == 1 ){
67				$featured_content.find('.slide').css({'position':'absolute','top':'0','left':'0'}).show();
68				jQuery('#featured a#left-arrow, #featured a#right-arrow').hide();
69			}
70
71			$featured_controllers_links.click(function(){
72				et_ordernumber = jQuery(this).parent().parent('li').prevAll().length;
73				$featured_content.cycle( et_ordernumber );
74				return false;
75			}).hover(function(){
76				jQuery(this).fadeTo('fast',.7);
77			}, function(){
78				jQuery(this).fadeTo('fast',1);
79			});
80		}
81	} );
82
83	var $footer_widget = jQuery("#footer-widgets .footer-widget");
84	if ( $footer_widget.length ) {
85		$footer_widget.each(function (index, domEle) {
86			if ((index+1)%4 == 0) jQuery(domEle).addClass("last").after("<div class='clear'></div>");
87		});
88	}
89
90	et_search_bar();
91
92	function et_search_bar(){
93		var $searchform = jQuery('#top-header div#search-form'),
94			$searchinput = $searchform.find("input#searchinput"),
95			searchvalue = $searchinput.val();
96
97		$searchinput.focus(function(){
98			if (jQuery(this).val() === searchvalue) jQuery(this).val("");
99		}).blur(function(){
100			if (jQuery(this).val() === "") jQuery(this).val(searchvalue);
101		});
102	}
103
104	if ( et_disable_toptier == 1 ) jQuery("ul.nav > li > ul").prev("a").attr("href","#");
105
106	var $comment_form = jQuery('form#commentform');
107
108	$comment_form.find('input:text, textarea').each(function(index,domEle){
109		var $et_current_input = jQuery(domEle),
110			$et_comment_label = $et_current_input.siblings('label'),
111			et_comment_label_value = $et_current_input.siblings('label').text();
112		if ( $et_comment_label.length ) {
113			$et_comment_label.hide();
114			if ( $et_current_input.siblings('span.required') ) {
115				et_comment_label_value += $et_current_input.siblings('span.required').text();
116				$et_current_input.siblings('span.required').hide();
117			}
118			$et_current_input.val(et_comment_label_value);
119		}
120	}).live('focus',function(){
121		var et_label_text = jQuery(this).siblings('label').text();
122		if ( jQuery(this).siblings('span.required').length ) et_label_text += jQuery(this).siblings('span.required').text();
123		if (jQuery(this).val() === et_label_text) jQuery(this).val("");
124	}).live('blur',function(){
125		var et_label_text = jQuery(this).siblings('label').text();
126		if ( jQuery(this).siblings('span.required').length ) et_label_text += jQuery(this).siblings('span.required').text();
127		if (jQuery(this).val() === "") jQuery(this).val( et_label_text );
128	});
129
130	// remove placeholder text before form submission
131	$comment_form.submit(function(){
132		$comment_form.find('input:text, textarea').each(function(index,domEle){
133			var $et_current_input = jQuery(domEle),
134				$et_comment_label = $et_current_input.siblings('label'),
135				et_comment_label_value = $et_current_input.siblings('label').text();
136
137			if ( $et_comment_label.length && $et_comment_label.is(':hidden') ) {
138				if ( $et_comment_label.text() == $et_current_input.val() )
139					$et_current_input.val( '' );
140			}
141		});
142	});
143
144});

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.