PageSourceSearch

https://media.texasfarmbureau.org/wp-content/themes/Lucid-child/ep…/js/et-ptemplates-frontend.js?ver=1.1

js texasfarmbureau.org collected 2026-10-01 11:35:14 UTC 4,785 bytes, 131 lines download raw bytes

1/* <![CDATA[ */
2jQuery(document).ready(function() {
3	jQuery("a[class*=fancybox]").fancybox({
4		'overlayOpacity'	:	0.7,
5		'overlayColor'		:	'#000000',
6		'transitionIn'		: 'elastic',
7		'transitionOut'		: 'elastic',
8		'easingIn'      	: 'easeOutBack',
9		'easingOut'     	: 'easeInBack',
10		'speedIn' 			: '700',
11		'centerOnScroll'	: true
12	});
13	
14	jQuery("a[class*='et_video_lightbox']").click(function(){
15		var et_video_href = jQuery(this).attr('href'),
16			et_video_link;
17
18		et_vimeo = et_video_href.match(/vimeo.com\/(.*)/i);
19		if ( et_vimeo != null )	et_video_link = 'http://player.vimeo.com/video/' + et_vimeo[1];
20		else {
21			et_youtube = et_video_href.match(/watch\?v=([^&]*)/i);
22			if ( et_youtube != null ) et_video_link = 'http://youtube.com/embed/' + et_youtube[1];
23		}
24		
25		jQuery.fancybox({
26			'overlayOpacity'	:	0.7,
27			'overlayColor'		:	'#000000',
28			'autoScale'		: false,
29			'transitionIn'	: 'elastic',
30			'transitionOut'	: 'elastic',
31			'easingIn'      : 'easeOutBack',
32			'easingOut'     : 'easeInBack',
33			'type'			: 'iframe',
34			'centerOnScroll'	: true,
35			'speedIn' 			: '700',
36			'href'			: et_video_link
37		});
38		return false;
39	});
40	
41	var $portfolioItem = jQuery('.et_pt_gallery_entry');
42	$portfolioItem.find('.et_pt_item_image').css('background-color','#000000');
43	jQuery('.zoom-icon, .more-icon').css({'opacity':'0','visibility':'visible'});
44	
45	$portfolioItem.hover(function(){
46		jQuery(this).find('.et_pt_item_image').stop(true, true).animate({top: -10}, 500).find('img.portfolio').stop(true, true).animate({opacity: 0.7},500);
47		jQuery(this).find('.zoom-icon').stop(true, true).animate({opacity: 1, left: 43},400);
48		jQuery(this).find('.more-icon').stop(true, true).animate({opacity: 1, left: 110},400);
49	}, function(){
50		jQuery(this).find('.zoom-icon').stop(true, true).animate({opacity: 0, left: 31},400);
51		jQuery(this).find('.more-icon').stop(true, true).animate({opacity: 0, left: 128},400);
52		jQuery(this).find('.et_pt_item_image').stop(true, true).animate({top: 0}, 500).find('img.portfolio').stop(true, true).animate({opacity: 1},500);
53	});
54	
55	
56	//contact page
57	var $et_contact_container = jQuery('#et-contact'),
58		$et_contact_form = $et_contact_container.find('form#et_contact_form'),
59		$et_contact_submit = $et_contact_container.find('input#et_contact_submit'),
60		$et_inputs = $et_contact_form.find('input[type=text],textarea'),
61		et_email_reg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/,
62		et_contact_error = false,
63		$et_contact_message = jQuery('#et-contact-message'),
64		et_message = '';
65			
66	$et_inputs.live('focus', function(){
67		if ( jQuery(this).val() === jQuery(this).siblings('label').text() ) jQuery(this).val("");
68	}).live('blur', function(){
69		if (jQuery(this).val() === "") jQuery(this).val( jQuery(this).siblings('label').text() );
70	});
71	
72	$et_contact_form.live('submit', function() {
73		et_contact_error = false;
74		et_message = '<ul>';
75	
76		$et_inputs.removeClass('et_contact_error');
77		
78		$et_inputs.each(function(index, domEle){
79			if ( jQuery(domEle).val() === '' || jQuery(domEle).val() === jQuery(this).siblings('label').text() ) {
80				jQuery(domEle).addClass('et_contact_error');
81				et_contact_error = true;
82				
83				var default_value = jQuery(this).siblings('label').text();
84				if ( default_value === undefined ) default_value = 'Captcha';
85								
86				et_message += '<li>Fill ' + default_value + ' field</li>';
87			}
88			if ( (jQuery(domEle).attr('id') == 'et_contact_email') && !et_email_reg.test(jQuery(domEle).val()) ) {
89				jQuery(domEle).removeClass('et_contact_error').addClass('et_contact_error');
90				et_contact_error = true;
91				
92				if ( !et_email_reg.test(jQuery(domEle).val()) ) et_message += '<li>Invalid email</li>';
93			}
94		});
95		
96		if ( !et_contact_error ) {
97			$href = jQuery(this).attr('action');
98				
99			$et_contact_container.fadeTo('fast',0.2).load($href+' #et-contact', jQuery(this).serializeArray(), function() {
100				$et_contact_container.fadeTo('fast',1);
101			});
102		}
103		
104		et_message += '</ul>';
105		
106		if ( et_message != '<ul></ul>' )
107			$et_contact_message.html(et_message);
108		
109		return false;
110	});
111		
112	var $et_searchinput = jQuery('#et-searchinput');
113		etsearchvalue = $et_searchinput.val();
114	
115	$et_searchinput.focus(function(){
116		if (jQuery(this).val() === etsearchvalue) jQuery(this).val("");
117	}).blur(function(){
118		if (jQuery(this).val() === "") jQuery(this).val(etsearchvalue);
119	});
120	
121	var $et_template_portfolio_thumb = jQuery('.et_pt_portfolio_entry');
122	$et_template_portfolio_thumb.hover(function(){
123		jQuery(this).find('img').fadeTo('fast', 0.8);
124		jQuery(this).find('.et_portfolio_more_icon,.et_portfolio_zoom_icon').fadeTo('fast', 1);
125	}, function(){
126		jQuery(this).find('img').fadeTo('fast', 1);
127		jQuery(this).find('.et_portfolio_more_icon,.et_portfolio_zoom_icon').fadeTo('fast', 0);
128	});
129		
130});
131/* ]]> */

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.