PageSourceSearch

https://www.colegiomit.com/wp-content/themes/codeus/js/scripts.js?ver=4.9.29

js colegiomit.com collected 2026-10-06 04:13:40 UTC 8,031 bytes, 233 lines download raw bytes

1function convertColor(rgb){
2	if(rgb.indexOf('rgb') != -1) {
3		rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
4		rgb[1] -= (rgb[1] > 20 ? 20 : rgb[1]);
5		rgb[2] -= (rgb[2] > 20 ? 20 : rgb[2]);
6		rgb[3] -= (rgb[3] > 20 ? 20 : rgb[3]);
7		return 'rgb('+rgb[1]+','+rgb[2]+','+rgb[3]+')';
8	} else {
9		return rgb;
10	}
11}
12
13function buildQuickfinderTextShadow(element, color) {
14	var $self = jQuery(element).find('span');
15	var length = $self.height();
16	var shadowColor = convertColor(color);
17	var textShadow = '0px 0px 0 '+shadowColor;
18	for(i = 1; i < length; i++) {
19		textShadow += ','+i+'px '+i+'px 0 '+shadowColor;
20	}
21	return textShadow;
22}
23
24jQuery(document).ready(function() {
25	jQuery('ul.jobs li').hover(
26		function() {
27			jQuery(this).animate({
28				left: -15
29			}, 150);
30		},
31		function() {
32			jQuery(this).animate({
33				left: 0
34			}, 150);
35		}
36	);
37});
38
39function codeus_fix_header_height(timeout) {
40	var func = function() {
41		jQuery('.header-fixed-wrapper').height(jQuery('#header').outerHeight());
42	};
43	if (timeout > 0)
44		setTimeout(func, timeout);
45	else
46		func();
47	
48}
49
50function codeus_header_fixed_init() {
51	jQuery('#header').addClass('fixed-init');
52	
53	jQuery(window).resize(function() {
54		if (jQuery('#header').hasClass('header-first-init'))
55			codeus_fix_header_height(300);
56	});
57	
58	jQuery(window).scroll(function() {
59		if (jQuery(window).scrollTop() > 0 && !jQuery('#header').hasClass('header-fixed-inited')) {
60			codeus_fix_header_height(0);
61			jQuery('#header').addClass('header-fixed-inited').addClass('header-first-init');
62			jQuery('#header').css({
63				paddingTop: 20
64			}).animate({
65				paddingTop: 0
66			}, 600);
67			jQuery('#header .central-wrapper').stop(true, true).animate({
68				paddingBottom: 13
69			}, 600);
70			jQuery('#header .header-fixed-logo').stop(true, true);
71			jQuery('#header .site-title > a > img').not('.header-fixed-logo').stop(true, true).css({display: 'inline', visibility: 'visible'}).fadeOut(300, function() {
72				jQuery('#header').addClass('header-fixed');
73				jQuery('#header .header-fixed-logo').fadeIn(300);
74			});
75		} else if (jQuery(window).scrollTop() == 0 && jQuery('#header').hasClass('header-fixed-inited')) {
76			jQuery('#header').removeClass('header-fixed-inited');
77			jQuery('#header .central-wrapper').stop(true, true).animate({
78				paddingBottom: 20
79			}, 600);
80			jQuery('#header .site-title > a > img').not('.header-fixed-logo').stop(true, true);
81			jQuery('#header .site-title > a > img.header-fixed-logo').stop(true, true).fadeOut(300, function() {
82				jQuery('#header').removeClass('header-fixed');
83				jQuery('#header .site-title > a > img').not('.header-fixed-logo').fadeIn(300);
84			});
85		}
86	});
87	
88	if (jQuery(window).scrollTop() > 0)
89		jQuery(window).trigger('scroll');
90}
91
92
93
94jQuery(document).ready(function() {
95	if(jQuery('body').hasClass('lazy-enabled')) {
96		if(!jQuery.support.opacity) {
97			jQuery('body').removeClass('lazy-enabled')
98		} else {
99			jQuery('.widget_text, .widget_black_studio_tinymce').addClass('lazy-loading').data('ll-item-delay', '0').wrapInner('<div class="lazy-loading-item" data-ll-effect="fading"></div>');
100			jQuery('ul.jobs').addClass('lazy-loading').data('ll-item-delay', '200');
101			jQuery('li', 'ul.jobs').addClass('lazy-loading-item').data('ll-effect', 'slide-right');
102			if(jQuery(window).width() > 800) {
103				jQuery.lazyLoading();
104				
105			}
106		}
107	}
108});
109
110jQuery(document).ready(function() {
111	if(jQuery(window).width() > 800)
112		codeus_header_fixed_init();
113});
114
115function fix_pricing_table_title() {
116	jQuery('.pricing-table').each(function() {
117		var $highlighted = jQuery('.pricing-column.highlighted', this);
118		if ($highlighted.size() == 0)
119			return;
120		var height = jQuery('.pricing-title', $highlighted).outerHeight();
121		jQuery('.pricing-column', this).not('.highlighted').each(function() {
122			var diff = height - jQuery('.pricing-title', this).outerHeight();
123			if (diff < 0)
124				diff = 0;
125			jQuery(this).css({
126				paddingTop: diff
127			});
128		});
129	});
130}
131
132function update_price_order_code(elem) {
133	if ( jQuery( elem ).data( 'order_button_text' ) ) {
134		jQuery( '#place_order' ).html( jQuery( elem ).data( 'order_button_text' ) );
135	} else {
136		jQuery( '#place_order' ).html( jQuery( '#place_order' ).data( 'value' ) );
137	} 
138}
139
140(function($) {
141	fix_pricing_table_title();
142	$('.woocommerce-checkout .form-row #createaccount, .woocommerce-checkout #ship-to-different-address .input-checkbox, .woocommerce .login .form-row #rememberme').checkbox();
143	$('body').bind('updated_checkout', function() {
144		$('.woocommerce .checkout #payment .payment_methods li .input-radio').radio();
145		$('.woocommerce .checkout #payment .payment_methods li .input-radio').click(function() {
146			update_price_order_code(this);
147		});
148		update_price_order_code($('.woocommerce .checkout #payment .payment_methods li .input-radio:checked'));
149	});
150	
151	jQuery('.woocommerce-button-next-step').click(function() {
152		var tab_id = $(this).closest('.tab_wrapper').attr('id');
153		$(this).closest('.tabs').find('.tabs-nav li[aria-controls="' + tab_id + '"]').next('li').find('a').click();
154		return false;
155	});
156
157	/* State/Country select boxes */
158	if ( typeof wc_country_select_params !== 'undefined' ) { 
159		var states_json = wc_country_select_params.countries.replace( /&quot;/g, '"' ),
160			states = $.parseJSON( states_json );
161
162		$( 'body' ).on( 'change', 'select.country_to_state, input.country_to_state', function() {
163	
164			var country = $( this ).val(),
165				$statebox = $( this ).closest( 'div' ).parent().find( '#billing_state, #shipping_state, #calc_shipping_state' ),
166				$parent = $statebox.parent(),
167				input_name = $statebox.attr( 'name' ),
168				input_id = $statebox.attr( 'id' ),
169				value = $statebox.val(),
170				placeholder = $statebox.attr( 'placeholder' );
171			if ( states[ country ] ) {
172				if ( $.isEmptyObject( states[ country ] ) ) {
173	
174					$statebox.parent().hide().find( '.select2-container' ).remove();
175					$statebox.replaceWith( '<input type="hidden" class="hidden" name="' + input_name + '" id="' + input_id + '" value="" placeholder="' + placeholder + '" />' );
176	
177					$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' ).parent()] );
178	
179				} else {
180	
181					var options = '',
182						state = states[ country ];
183	
184					for( var index in state ) {
185						if ( state.hasOwnProperty( index ) ) {
186							options = options + '<option value="' + index + '">' + state[ index ] + '</option>';
187						}
188					}
189	
190					$statebox.parent().show();
191	
192					if ( $statebox.is( 'input' ) ) {
193						// Change for select
194						$statebox.replaceWith( '<select name="' + input_name + '" id="' + input_id + '" class="state_select" placeholder="' + placeholder + '"></select>' );
195						$statebox = $( this ).closest( 'div' ).parent().find( '#billing_state, #shipping_state, #calc_shipping_state' );
196					}
197	
198					$statebox.html( '<option value="">' + wc_country_select_params.i18n_select_state_text + '</option>' + options );
199					$statebox.val( value ).change();
200	
201					$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' ).parent()] );
202	
203				}
204			} else {
205				if ( $statebox.is( 'select' ) ) {
206	
207					$parent.show().find( '.select2-container' ).remove();
208					$statebox.replaceWith( '<input type="text" class="input-text" name="' + input_name + '" id="' + input_id + '" placeholder="' + placeholder + '" />' );
209	
210					$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' ).parent()] );
211	
212				} else if ( $statebox.is( '.hidden' ) ) {
213	
214					$parent.show().find( '.select2-container' ).remove();
215					$statebox.replaceWith( '<input type="text" class="input-text" name="' + input_name + '" id="' + input_id + '" placeholder="' + placeholder + '" />' );
216	
217					$( 'body' ).trigger( 'country_to_state_changed', [country, $( this ).closest( 'div' ).parent()] );
218	
219				}
220			}
221	
222			$( 'body' ).trigger( 'country_to_state_changing', [country, $( this ).closest( 'div' ).parent()] );
223	
224		});
225	}
226
227})(jQuery);
228
229(function($) {
230	$(function() {
231		$('select.styled, .widget_layered_nav select').combobox();
232	});
233})(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.