PageSourceSearch

https://www.institutohemingway.com/assets/js/main.js

js institutohemingway.com collected 2026-10-02 11:59:47 UTC 8,498 bytes, 366 lines download raw bytes

1(function ($) {
2	("use strict");
3
4	var windowOn = $(window);
5	////////////////////////////////////////////////////
6	// preLoader
7	windowOn.on("load", function () {
8		$("#loading").fadeOut(200);
9	});
10
11	////////////////////////////////////////////////////
12	// menu movil
13	$("#mobile-menu").meanmenu({
14		meanMenuContainer: ".mobile-menu",
15		meanScreenWidth: "1199",
16		meanExpand: ['<i class="fal fa-plus"></i>'],
17	});
18
19	// barra lateral 
20
21	$(".lateral-info-cerrar,.barra-lat-ext").on("click", function () {
22		$(".lateral-info").removeClass("info-open");
23		$(".barra-lat-ext").removeClass("overlay-open");
24	});
25	$(".palanca-lat").on("click", function () {
26		$(".lateral-info").addClass("info-open");
27		$(".barra-lat-ext").addClass("overlay-open");
28	});
29	
30	// barra lateral 2
31
32	$(".lateral-info-cerrar2,.barra-lat-ext2").on("click", function () {
33		$(".lateral-info2").removeClass("info-open");
34		$(".barra-lat-ext2").removeClass("overlay-open");
35	});
36	$(".palanca-lat2").on("click", function () {
37		$(".lateral-info2").addClass("info-open");
38		$(".barra-lat-ext2").addClass("overlay-open");
39	});
40	
41    // slimscroll
42    $('.scroller').each(function(){
43        $(this).slimScroll({
44            height: $(this).attr('data-height') || '100%',
45            color: $(this).attr('data-color') || '#71808f',
46            railOpacity: '0.9',
47            size: '4px',
48        });
49    });
50
51    $('.slimScrollBar').hide();
52
53	////////////////////////////////////////////////////
54	// cart toggle lateral
55	$(".carrito-alt-boton").on("click", function () {
56		$(".carrito-ext").addClass("opened");
57		$(".body-overlay").addClass("opened");
58	});
59	$(".carrito-cerrar-btn").on("click", function () {
60		$(".carrito-ext").removeClass("opened");
61		$(".body-overlay").removeClass("opened");
62	});
63	$(".body-overlay").on("click", function () {
64		$(".carrito-ext").removeClass("opened");
65		$(".sidebar__area").removeClass("sidebar-opened");
66		$(".header__search-3").removeClass("search-opened");
67		$(".body-overlay").removeClass("opened");
68	});
69
70
71	////////////////////////////////////////////////////
72	// sticky header
73	windowOn.on("scroll", function () {
74		var scroll = $(window).scrollTop();
75		if (scroll < 100) {
76			$(".sticky-header").removeClass("sticky");
77		} else {
78			$(".sticky-header").addClass("sticky");
79		}
80	});
81
82	////////////////////////////////////////////////////
83	// data background 
84	$("[data-background").each(function () {
85		$(this).css(
86			"background-image",
87			"url( " + $(this).attr("data-background") + "  )"
88		);
89	});
90
91	////////////////////////////////////////////////////
92	// nice select
93	$("select").niceSelect();
94
95
96	// magnificPopup
97	/* magnificPopup galeria */
98	$(".image-popups").magnificPopup({
99		type: "image",
100		gallery: {
101			enabled: true,
102		},
103	});
104
105	/* magnificPopup video */
106	$(".popup-video").magnificPopup({
107		type: "iframe",
108	});
109
110	////////////////////////////////////////////////////
111	// Wow efectos
112	new WOW().init();
113
114	////////////////////////////////////////////////////
115	// data width
116	$("[data-width]").each(function () {
117		$(this).css("width", $(this).attr("data-width"));
118	});
119
120	////////////////////////////////////////////////////
121	// carrito agregar restar unidades
122	$(".cart-minus").click(function () {
123		var $input = $(this).parent().find("input");
124		var count = parseInt($input.val()) - 1;
125		count = count < 1 ? 1 : count;
126		$input.val(count);
127		$input.change();
128		return false;
129	});
130	$(".cart-plus").click(function () {
131		var $input = $(this).parent().find("input");
132		$input.val(parseInt($input.val()) + 1);
133		$input.change();
134		return false;
135	});
136
137
138	////////////////////////////////////////////////////
139	// efecto onhover
140	$(".hover__active").on("mouseenter", function () {
141		$(this)
142			.addClass("active")
143			.parent()
144			.siblings()
145			.find(".hover__active")
146			.removeClass("active");
147	});
148
149	if (typeof $.fn.knob != "undefined") {
150		$(".knob").each(function () {
151			var $this = $(this),
152				knobVal = $this.attr("data-rel");
153
154			$this.knob({
155				draw: function () {
156					$(this.i).val(this.cv + "%");
157				},
158			});
159
160			$this.appear(
161				function () {
162					$({
163						value: 0,
164					}).animate(
165						{
166							value: knobVal,
167						},
168						{
169							duration: 2000,
170							easing: "swing",
171							step: function () {
172								$this
173									.val(Math.ceil(this.value))
174									.trigger("change");
175							},
176						}
177					);
178				},
179				{
180					accX: 0,
181					accY: -150,
182				}
183			);
184		});
185	}
186
187	// 22. logos pie
188	const brand = new Swiper(".brand-active", {
189		slidesPerView: 1,
190		spaceBetween: 10,
191		loop: true,
192		autoplay: {
193			delay: 3000,
194		},
195		breakpoints: {
196			320: {
197				slidesPerView: 1,
198				spaceBetween: 20,
199			},
200			480: {
201				slidesPerView: 2,
202				spaceBetween: 30,
203			},
204			640: {
205				slidesPerView: 3,
206				spaceBetween: 40,
207			},
208			991: {
209				slidesPerView: 4,
210				spaceBetween: 40,
211			},
212			1200: {
213				slidesPerView: 5,
214				spaceBetween: 40,
215			},
216			1400: {
217				slidesPerView: 6,
218				spaceBetween: 40,
219			},
220		},
221	});
222
223
224	// opiniones google
225	const feedback = new Swiper(".feedback-active", {
226		slidesPerView: 1,
227		spaceBetween: 30,
228		loop: true,
229		autoplay: {
230			delay: 3000,
231		},
232		pagination: {
233			el: ".feedback-pagination",
234			clickable: false,
235		},
236		breakpoints: {
237			320: {
238				slidesPerView: 1,
239				spaceBetween: 20,
240			},
241			480: {
242				slidesPerView: 1,
243				spaceBetween: 30,
244			},
245			640: {
246				slidesPerView: 1,
247				spaceBetween: 40,
248			},
249			991: {
250				slidesPerView: 1,
251				spaceBetween: 40,
252			},
253			1200: {
254				slidesPerView: 1,
255				spaceBetween: 40,
256			},
257			1400: {
258				slidesPerView: 1,
259			},
260		},
261	});
262
263	// extranet
264
265	$(".extranet-login").on("click", function () {
266		$(".signin-area").addClass("open");
267		$(".barra-lat-ext").addClass("overlay-open");
268	});
269	$(".barra-lat-ext").on("click", function () {
270		$(".signin-area").removeClass("open");
271		$(".signup-area").removeClass("open");
272		$(".barra-lat-ext").removeClass("overlay-open");
273	});
274
275	$(".user-btn-sign-up").on("click", function () {
276		$(".signup-area").addClass("open");
277		$(".barra-lat-ext").addClass("overlay-open");
278	});
279
280	// menu programas
281	$(".cattexto").on("click", function () {
282		$(".cattexto").toggleClass("showCategory");
283	});
284
285	jQuery("body").on("click", function (e) {
286		if ($(e.target).is(".cattexto")) {
287			return;
288		}
289		if ($(".cattexto.showCategory").length > 0) {
290			$(".cattexto").removeClass("showCategory");
291		}
292	});
293	
294    // idioma
295    $(".idioma-seleccion").each(function () {
296        var each = $(this)
297        each.find(".lang-nombre").html(each.find(".language-dropdown-menu a:nth-child(1)").text());
298        var allOptions = $(".language-dropdown-menu").children('a');
299        each.find(".language-dropdown-menu").on("click", "a", function () {
300            allOptions.removeClass('selected');
301            $(this).addClass('selected');
302            $(this).closest(".idioma-seleccion").find(".lang-nombre").html($(this).text());
303        });
304    })
305	
306	
307	
308	$(".edu-boton").on("click", function () {
309		event.preventDefault();
310		var pr = $('#pr').val(); 
311		var sem = '0';
312		  sem = $('#sem').val();
313		var alo = 'sa';
314		  alo = $('#alo').val();
315		  
316		var fecha = $('#fecha').val();
317		if(pr!='' && sem!='' && alo!='' && fecha!=''){
318			 
319			
320	url_peticion = "includes/calculator.php?pr="+pr+"&sem="+sem+"&alo="+alo+"&fecha="+fecha;
321			  $.ajax({
322        url: url_peticion,
323        cache: false
324        
325        })
326        .done(function( data ) {
327			location.href='carrito.php';
328
329        }
330    );
331			
332			
333			
334			
335			
336			
337			
338		} if(alo==''){alert('Please pick an accomodation choice');}
339	});
340	
341	
342	$("#pr").on("change", function () {
343		 
344		event.preventDefault();
345		var c = $(this).find(":selected").data('c');
346		var aloj = $(this).find(":selected").data('aloj');
347		var semanas = $(this).find(":selected").data('semanas');
348		var fechainic = $(this).find(":selected").data('fechainic');
349		var where = $(this).find(":selected").data('where');
350		 location.href = where+'?c='+c+'&aloj='+aloj+'&semana='+semanas+'&fechainic='+fechainic;
351		 
352	});
353	
354	
355	$('#ficono').click(function(){
356       $(document).ready(function(){
357           $("#fecha").datepicker().focus();
358       });
359   });
360	
361	 
362	
363	
364	
365
366})(jQuery);

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.