PageSourceSearch

https://amhe.mx/wp-content/themes/amhe/js/javascript.js

js amhe.mx collected 2026-10-02 12:07:53 UTC 8,783 bytes, 397 lines download raw bytes

1  // JavaScript Document
2
3
4
5	
6  $('.check').click(function(){
7    if($(this).find('input').is(':checked')){
8       $(this).addClass('checked');
9    } else {
10        $(this).removeClass('checked');
11    }
12  });
13	
14
15
16
17  
18  function updateBackground() {
19  screenWidth = $(window).width();
20  screenHeight = $(window).height();
21  var minHeight = 600;
22  var minWidth = 1024;
23  
24 $( "section, .menuServicios, .mainServicios,  .servicio, #slider2 .ss-slide" ).css('min-height', screenHeight-95);
25
26 
27
28
29	  
30	  
31	  var count = $("#sec3 .menuServicios ul li").length
32	 $("#sec3 .menuServicios ul li").css('height',(screenHeight-95)/count)
33  
34  
35 
36  
37//  setTimeout(function(){  active();}, 500); 
38  //setTimeout(function(){  active();}, 1500); 
39   
40	$(window).bind("resize", function() {
41	  var hiv2 = document.getElementById('imgRec').offsetWidth;
42	$(".imgRec ").css('height',(hiv2 * '.65'));
43	  }); 
44	setTimeout(function(){
45     var hiv2 = document.getElementById('imgRec').offsetWidth;
46	$(".imgRec").css('height',(hiv2 * '.65'));
47}, 2000);
48	  
49	  	$(window).bind("resize", function() {
50	  var hiv3 = document.getElementById('imgRec2').offsetWidth;
51	$(".imgRec2 ").css('height',(hiv3 * '.55'));
52	  }); 
53	setTimeout(function(){
54     var hiv3 = document.getElementById('imgRec2').offsetWidth;
55	$(".imgRec2").css('height',(hiv3 * '.55'));
56}, 2000);
57	
58$(window).bind("resize", function() {
59	  var hiv = document.getElementById('myDiv').offsetWidth;
60	alert('hiv');
61	$(".video").css('height',(hiv * '.56'));
62	  }); 
63setTimeout(function(){
64     var hiv = document.getElementById('myDiv').offsetWidth;
65	$(".video").css('height',(hiv * '.56'));
66}, 2000);
67	    
68	  
69	  
70	  
71		  
72	$('section aside').each(function(index){
73       var items = $(this).height();
74	   var heightContent =$(this).parent().height(); 
75	    var itemsH = (heightContent-items)/2;
76		
77  	  if (itemsH >= 50){
78	  $(this).css('padding-top', itemsH-50);
79	  }else {
80		 $(this).css('padding-top', 100);
81	  }
82     });
83	  
84	  
85	  $('section .directiva aside').each(function(index){
86       var items = $(this).height();
87	   var heightContent =$(this).parent().height(); 
88	    var itemsH = (heightContent-items)/2;
89		
90  	  if (itemsH >= 50){
91	  $(this).css('padding-top', 100);
92	  }else {
93		 $(this).css('padding-top', 100);
94	  }
95     });
96	  
97	  $('#sec5 aside').each(function(index){
98       var items = $(this).height();
99	   var heightContent =$(this).parent().height(); 
100	    var itemsH = (heightContent-items)/4;
101		
102  	  if (itemsH >= 50){
103	  $(this).css('padding-top', itemsH-50);
104	  }else {
105		 $(this).css('padding-top', 100);
106	  }
107     });
108	 
109	    $(".bulletStop").remove();
110	 
111	 
112	 
113 }
114  //update
115
116
117
118
119 function aside(){
120	  screenHeight = $(window).height()-100;
121	  var hei = (screenHeight-(600))/3;
122
123
124		  var theH = $("header aside" ).height();
125		  if(hei >= 20){
126			  $( "header aside"  ).css('margin-top',hei) ;
127		  }else{
128			  $( "header aside"  ).css('margin-top',20) ;
129		  }
130   
131	   
132	  
133	  
134 }
135  
136  
137  
138 
139  
140  
141  $(document).ready(function() {
142	//$("#menu").load("menu.html");   
143  updateBackground();
144 aside()
145  
146     $(window).bind("resize", function() {
147	  updateBackground();
148	   aside()
149	  }); 
150  });
151  
152  
153var   $window= $(window),
154      win_height_padded = $window.height() * .5;
155  
156$window.on('scroll', revealOnScroll);
157function revealOnScroll() {
158    var scrolled = $window.scrollTop();
159    $(".revealOnScroll:not(.animated)").each(function () {
160      var $this     = $(this),
161          offsetTop = $this.offset().top;
162      
163
164      if (scrolled + win_height_padded > offsetTop) {
165        if ($this.data('timeout')) {
166          window.setTimeout(function(){
167            $this.addClass('animated ' + $this.data('animation'));
168			
169          }, parseInt($this.data('timeout'),10));
170        } else {
171          $this.addClass('animated ' + $this.data('animation'));
172		   $('header').addClass(ids);
173        } 
174      }
175    });
176	
177	$(".revealOnScroll.animated").each(function () {
178      var $this     = $(this),
179          offsetTop = $this.offset().top;
180	      if (scrolled + win_height_padded < offsetTop) {
181        $this.removeClass('animated ' + $this.data('animation'))
182       }
183	  
184    });
185   
186	
187};
188// bullet('sec2','#sec2 .bulletActive');
189 
190function bullet(sec,cls){
191	    
192		if (sec=='sec2'){
193           
194		widthItem = $(cls).width();
195		var positionItem = $(cls).position()
196		console.log(positionItem.left);
197	  
198		$('.bulletMove').animate(	{
199		left: positionItem.left+(widthItem/1.5)
200    	})
201	
202		}
203}
204
205jQuery(document).ready(function () {
206	jQuery(".wp-block-gallery figure a").each(function() { jQuery(this).attr('data-lightbox', 'lightbox')});
207});
208
209
210
211
212function galeBig(url){
213		
214	$('<div class="bg0"><div onClick="closed()" class="close">X</div><div class="contentImage"><img src="'+url+'" /> </div></div>').appendTo("body");
215	
216}
217
218
219
220
221function cargar(){
222	$('.bg0').css('display','block')
223}
224
225
226
227$( ".close" ).click(function() {
228	$('.bg0').css('display','none')
229})
230
231function closed(){$('.bg0').css('display','none')}
232
233
234
235 
236	   
237
238$('#menuToggle li ').click(function(){
239	clase= $(this).attr('class');
240	$('#menuToggle li ').removeClass('activeMenu');
241	$(this).addClass('activeMenu');
242	
243	if(clase!='serviciosMenu'){
244		$( "#menu-toggle" ).prop( "checked", false );
245	    var panel = $(this).attr('rel')
246	    $('section').removeClass('active');
247	    $('#'+panel).addClass('active');
248	              $('html, body').stop().animate({
249                   scrollTop: $('#'+panel).offset().top-110
250                   }, 1500,'easeInOutQuad'); 
251	 } 
252})
253
254function gogo(panel){
255	$('#menuToggle li ').removeClass('activeMenu');
256	$( "#menu-toggle" ).prop( "checked", false );
257
258	 $('section').removeClass('active');
259	 $('#'+panel).addClass('active');
260	 
261	              $('html, body').stop().animate({
262                   scrollTop: $('#'+panel).offset().top-110
263				    }, 1500,'easeInOutQuad'); 
264}
265
266
267
268
269
270$("#myForm").submit(function(e){
271	'use strict';
272    e.preventDefault();
273     $.ajax( {
274      url: templateDir+"/mail.php",
275      type: "POST",
276      data: new FormData( $("#myForm")[0]),
277      processData: false,
278      contentType: false,
279	  success: function(data) {  
280	  $('#myForm').html('<span class="enviado">'+data+'</span>');
281	   }
282    } );
283    e.preventDefault();
284 });
285
286
287
288
289
290
291
292	 
293
294
295$('#sec3 .menuServicios ul li').click(function(){
296	
297	var panel = $(this).attr('rel')
298	var panel2 = $('.activeServicio').attr('id')
299	
300	$('#sec3 .menuServicios ul li').removeClass('activeServMenu');
301	$('.mainServicios .servicio').removeClass('activeServicio');
302	$(this).addClass('activeServMenu');
303	$('#'+panel).addClass('activeServicio');
304	
305	if (panel != panel2){
306	fadePanel(panel,panel2)
307	}
308})
309
310
311function fadePanel(panel, panel2){
312    $("#"+panel).fadeIn(callbackAnimate );
313	$("#"+panel).css("z-index",'3' );
314	
315    function callbackAnimate(){
316      $("#"+panel2).fadeOut("slow" );
317	  $("#"+panel2).css("z-index",'0' );
318    }
319
320}
321
322
323
324function openAdminTab(evt, tabName) {
325  // Declare all variables
326  var i, tabcontent, tablinks;
327
328  // Get all elements with class="tabcontent" and hide them
329  tabcontent = document.getElementsByClassName("tabcontent");
330  for (i = 0; i < tabcontent.length; i++) {
331    tabcontent[i].style.display = "none";
332  }
333
334  // Get all elements with class="tablinks" and remove the class "active"
335  tablinks = document.getElementsByClassName("tablinks");
336  for (i = 0; i < tablinks.length; i++) {
337    tablinks[i].className = tablinks[i].className.replace(" active", "");
338  }
339
340  // Show the current tab, and add an "active" class to the button that opened the tab
341  document.getElementById(tabName).style.display = "inline-block";
342  evt.currentTarget.className += " active";
343}
344
345
346
347
348function menuCuenta() {
349  var element = document.getElementById("arrow");
350  element.classList.toggle("active");
351
352	 var element2 = document.getElementById("hiden");
353  element2.classList.toggle("hiden");
354	
355	
356}
357
358
359function footer(evt, tabName) {
360  // Declare all variables
361  var i, tabcontent, tablinks;
362
363  // Get all elements with class="tabcontent" and hide them
364  tabcontent = document.getElementsByClassName("tabcontentFooter");
365  for (i = 0; i < tabcontent.length; i++) {
366    tabcontent[i].style.display = "none";
367  }
368
369  // Get all elements with class="tablinks" and remove the class "active"
370  tablinks = document.getElementsByClassName("tablinks");
371  for (i = 0; i < tablinks.length; i++) {
372    tablinks[i].className = tablinks[i].className.replace(" active", "");
373  }
374
375  // Show the current tab, and add an "active" class to the button that opened the tab
376  document.getElementById(tabName).style.display = "block";
377  evt.currentTarget.className += " active";
378}
379
380
381
382function miembro(id){		
383	window.location = templateDir2+"/miembro?id="+id;
384	
385}
386		
387function CloseForm(){
388	$(".ContactForm").hide();
389}
390
391
392function contacto(){
393	$(".ContactForm").show();
394}
395
396  
397  

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.