PageSourceSearch

https://www.greek123.com/wp-content/themes/greek123-child/child-as…&cea658902c57bae018f4175ff7251f1a&ver=1.0

js greek123.com collected 2026-10-02 13:44:26 UTC 13,281 bytes, 453 lines download raw bytes

1/**/
2(function ($) {
3
4	$(".attr-style").each(function (i, el) {
5	  		el.setAttribute('style', el.getAttribute('data-style'));
6	});
7	$("section[data-bg*='https']").each(function (i, el) {
8	  		el.setAttribute('style', 'background-image:url('+el.getAttribute('data-bg')+')');
9	});
10	setTimeout(function () {
11		var custom_logo = $('.custom-logo');
12		if(custom_logo.attr('src').indexOf('https') == -1){
13			custom_logo.attr('src', custom_logo.attr('data-lazy-src'))
14		}
15		var mainGalleryImage = jQuery('#main-gallery-image');
16		if(mainGalleryImage.length && mainGalleryImage.attr('src').indexOf('data:image/svg') > -1){
17			mainGalleryImage.attr('src', mainGalleryImage.data('lazy-src'))
18		}
19	}, 2000);
20	
21	$(".menu-item-13190 a").attr('target','_blank');
22	/**********/
23	$(".school-video-holder").click(function(){
24		var el = $(this);
25		$("#school-video-wrap").html(el.data('video'));
26		$("#school-video-ModalLabel").html(el.data('title'));
27		$("#school-video-modal-btn").click();
28	});
29	jQuery('#password_2, #password_1').keyup(function(){
30		if(this.value.length >= 12){
31			$('.woocommerce-Button').removeClass('disabled').prop('disabled', false); 
32		}
33	})
34	$("#register_school .acf-form-submit").prepend('<span class="button-arrow"></span>'); 
35
36	$("#school-registration-form .acf-field-radio").append('<span class="acf-row-toggle" ></span>');
37	$(document).on('click', '.acf-row-toggle', function(){
38		var parentEl = $(this).parent('.acf-field');
39		console.log('parentEl', parentEl.html());
40		parentEl.toggleClass('_acf-closed');
41		parentEl.find('.acf-input').slideToggle();
42	}); 
43	if(location.href.indexOf('request_login')>0){
44		alert('Please login to download your files.');
45	}
46	$('.download-file a').click(function (e) {
47		if(gr_user_id == 0){
48			e.preventDefault();
49			alert('Please login to download your files.');
50		}
51	}); 
52	$('.sib-form-block__button').click(function () {
53		var form_data = $('#sib-form').serialize();
54		setTimeout(function () {
55			if($('#success-message').length){
56				$.post(wc_add_to_cart_params.ajax_url, {action:'gr_signup_user_on_sub', nonce:grSignUpNonce, form_data:form_data});
57			}
58			
59		}, 3000);
60		
61	}); 
62	$('._field43 input').click(function(){ 
63		var CurEl = $(this); 
64		$('._field43 input').prop('checked', false); 
65		CurEl.prop('checked', true);  
66	});
67	$(".media-tabs").click(function (e) {
68		e.preventDefault();
69		var curEl = $(this).data('tag-href');
70		console.log(curEl);
71		$(".media-tabs").removeClass('m-selected-tab').attr('style', '');
72		$(this).addClass('m-selected-tab').css('color', '#c56a3a');
73		$(".c-media-content-holder").hide();
74		$(curEl+"-holder").show(); 
75
76	}); 
77	if($("body").hasClass('single')){
78		$(".cool-number").parent('p').addClass('p-indent');
79		var curProdCategs = $("#jg-subcategory-nav .subcategory"); 
80		if(curProdCategs.length>7){
81			curProdCategs.hide();
82			$("body").addClass('show-only-selected-categs');
83		}
84	}
85	$(".gr-nav-categs").click(function () {
86		var curLink = $(this).data('link');
87		if(curLink.length>1){
88			window.location.href=curLink;
89		}
90	});
91	$(document).on('change', '._field41 select', function () {
92		var ACFormId = 1; 
93		switch(this.value){
94			case 'Student / Home / Personal': 
95				ACFormId = 7; 
96			break;
97			case 'Teacher / Tutor': 
98				ACFormId = 9;
99			break;
100			case 'School': 
101				ACFormId = 11;
102			break;
103			
104		}
105		var selectedForm = $('._form_'+ACFormId); 
106		var listId = 0;
107		if(selectedForm.length > 0){
108			listId = selectedForm.find('input[name="u"]').val();
109			if(listId.length>2){
110				$('._form_1 input[name="u"]').val(listId);	
111			}			
112		}
113		console.log('SEARCh', ACFormId, listId, selectedForm);
114		$('._form_1 input[name="f"]').val(ACFormId); 
115	}); 
116	$(document).on('click', '#_form_1_submit', function () {
117		setTimeout(function () {
118			$('._form_1').html('<div class="_form-thank-you" style="display: block;">Thanks for signing up!</div>'); 
119		}, 1000); 
120	})
121	//<div class="_form-thank-you" style="display: block;">Thanks for signing up!</div>
122	$( document ).ajaxComplete(function( event, xhr, settings ) {
123		console.log('AJAX', event, xhr, settings); 
124	  if ( settings.url === "ajax/test.html" ) {
125	    $( ".log" ).text( "Triggered ajaxComplete handler. The result is " +
126	      xhr.responseText );
127	  }
128	});
129	$('.video-responsive').slick({
130	  dots: false,
131	  infinite: false,
132	  speed: 300,
133	  slidesToShow: 4,
134	  slidesToScroll: 4,
135	  responsive: [
136	    {
137	      breakpoint: 1024,
138	      settings: {
139	        slidesToShow: 3,
140	        slidesToScroll: 3,
141	        infinite: false,
142	        dots: false
143	      }
144	    },
145	    {
146	      breakpoint: 600,
147	      settings: {
148	        slidesToShow: 2,
149	        slidesToScroll: 2
150	      }
151	    },
152	    {
153	      breakpoint: 480,
154	      settings: {
155	        slidesToShow: 1,
156	        slidesToScroll: 1
157	      }
158	    }
159	    // You can unslick at a given breakpoint now by adding:
160	    // settings: "unslick"
161	    // instead of a settings object
162	  ]
163	}); 
164
165
166	$(".c-video-item").click(function (e) {
167		console.log("*8*8*8*8*8*8");
168		e.preventDefault(); 
169		var targetEl = $(this).data('target');
170		var targetTitle = $(this).data('target-title');
171		console.log(targetEl);
172		$("#m-popup-video-player").html($("#"+targetEl).html());
173		$("#mVideoModalLabel").html(targetTitle);
174		$("#open-video-modal").click();
175
176	}); 
177	$(document).ready(function () {
178		setTimeout(function () {
179			var videoResponsive = $(".video-responsive .slick-track");
180				if(typeof videoResponsive !== "undefined" && videoResponsive.length > 0){
181					var videoResponsiveEl = $(".video-responsive").width();
182					console.log(videoResponsiveEl); 
183					var curSlider = curSliderWidth = ""; 
184					videoResponsive.each(function (e, i) {
185						curSlider = $(i); 
186						curSliderWidth = (curSlider.css('width').replace('px', '') - 0)
187						console.log( curSlider.css('width'));
188						if( curSliderWidth < videoResponsiveEl ){
189							curSlider.addClass('keep-full-width'); 
190						}
191					}); 
192				}
193		}, 2000);
194	}); 
195	
196	$('#mVideoModal').on('hidden.bs.modal', function () {
197	  $("#m-popup-video-player").html('');
198	});
199	$('body').addClass('fix-style'); 
200	setTimeout(function () {
201		$(window).resize(); 
202
203	},2000);
204
205	$(window).resize(function () {
206		setTimeout(function () {
207			if($('body').hasClass('single')){
208				var jg_product_columns = $(".jg-product-columns");
209				var fItem = jg_product_columns.eq(0); 
210				jg_product_columns.css('height', fItem.height());
211				console.log(fItem.height());	
212			}
213			
214			//$('body').removeClass('fix-style'); 
215		}, 500); 
216		
217
218	});
219
220	/*$(".showcoupon,#coupon_code,input[name='apply_coupon']").click(function () {
221		document.cookie = "cFormData="+$("form.woocommerce-checkout").serialize(); 
222	}); 
223	$(".checkout_coupon").submit(function () {
224		document.cookie = "cFormData="+$("form.woocommerce-checkout").serialize(); 
225	})
226	$(document).on('change','#billing_country', function(){
227		console.log('country', this.value); 
228		var coupon_code = $("#coupon_code").val();
229		if(coupon_code.length == 0){
230			var cLink = $(".woocommerce-remove-coupon");
231			if(cLink.length >0){
232				var thelink = cLink.attr('href').split("=");
233				coupon_code = thelink[1]; 	 
234			}
235			
236		}
237
238		
239		$.ajax({
240			type:'POST', 
241			url:wc_add_to_cart_params.ajax_url, //window.location.href,//
242			data:{action:'gr_validate_coupon', _checkout_fields:$("form.woocommerce-checkout").serialize(), coupon_code:coupon_code }, 
243			success:function(e){
244				
245				 $(document.body).trigger("update_checkout")
246			}
247		})
248	});*/
249	$('#acf-field_5a86d496914f5').change(function () {
250		$('#firstname').val(this.value); 
251	}); 
252	$('#acf-field_5a86d49e914f6').change(function () {
253		$('#lastname').val(this.value); 
254	}); 
255	$('#acf-field_5a86d4a4914f7').change(function () {
256		$('._x63326332 input').val(this.value); 
257	}); 
258	$('#acf-field_5efe10370a33d').change(function () {
259		$('#phone').val(this.value); 
260	}); 
261	$('#acf-field_5a86b75959761').change(function () {
262		$('._field8 input').val(this.value); 
263	}); 
264	$('#acf-field_5ad0a94960b48').change(function () {
265		$('._field44 input').val(this.value); 
266	}); 
267	$('.acf-field-5efe10500a33e input').click(function () {
268		//$('._field45 input').prop('checked', false); 
269		$('._field45 input[value="'+this.value+'"]').prop('checked', true); 
270		console.log('CHHHHHH', this.value);
271	}); 
272	$('#register_school').submit(function () {
273		$('#_form_18_submit').click();
274	}); 
275	$('.woocommerce-form-register').submit(function () {
276		$('#_form_20_submit').click();
277	})
278	$('#reg_email').change(function () {
279		$('._x63326332 input').val(this.value); 
280	}); 	
281	setTimeout(function () {
282		if(typeof GRACForm != 'undefined' ){
283			$('#firstname').val(GRACForm.firstname); 
284			$('#lastname').val(GRACForm.lastname); 
285			$('._x63326332 input').val(GRACForm.email); 
286			$('#phone').val(GRACForm.phone_number); 
287			$('._field44 input').val(GRACForm.description); 
288			for(var i = 0; i<GRACForm.please_contact_me_for.length; i++){
289				$('._field45 input[value="'+GRACForm.please_contact_me_for[i]+'"]').prop('checked', true); 
290			}
291		}
292	}, 2000); 	
293	$('a').click(function (e) {
294		if(this.href.indexOf('?_blank') > -1){
295			e.preventDefault();
296			window.open(this.href, '_blank');
297		}
298	})
299
300	//-----------------------------------------------------
301	jQuery(document).ready(function ($) {
302        $(".showcoupon,#coupon_code,input[name='apply_coupon']").click(function () {
303	        document.cookie = "cFormData="+$("form.woocommerce-checkout").serialize(); 
304	        console.log('cFormData', document.cookie);
305	    }); 
306	    $(".checkout_coupon").submit(function () {
307	        document.cookie = "cFormData="+$("form.woocommerce-checkout").serialize(); 
308	        console.log('cFormData',document.cookie);
309	        setTimeout(function () {
310	            jQuery('#billing_country').change(); 
311	        }, 3000); 
312	    })
313	    $(document).on('change','#billing_country', function(){
314	        console.log('country', this.value); 
315	        var coupon_code = $("#coupon_code").val();
316	        if(coupon_code.length == 0){
317	            var cLink = $(".woocommerce-remove-coupon");
318	            if(cLink.length >0){
319	                var thelink = cLink.attr('href').split("=");
320	                coupon_code = thelink[1];    
321	            }
322	            
323	        }
324
325	        
326	        $.ajax({
327	            type:'POST', 
328	            url:wc_add_to_cart_params.ajax_url, //window.location.href,//
329	            data:{action:'gr_validate_coupon', _checkout_fields:$("form.woocommerce-checkout").serialize(), coupon_code:coupon_code }, 
330	            success:function(e){
331	                if(e.remove){
332	                    $(".woocommerce-remove-coupon").click(); 
333	                 
334	                }
335	                 $(document.body).trigger("update_checkout")
336	            }
337	        })
338	    });
339	    if(typeof cart_count_html != 'undefined'){
340	    	jQuery('.dynamic-cart-tally,#wp-block-search__input-1').html(cart_count_html);
341	    }
342	    setTimeout(function () {
343					// body...
344				
345				jQuery(function($) {
346				    $('img[data-lazy-src]').each(function() {
347				        var $img = $(this);
348				        var realSrc = $img.data('lazy-src');
349				        
350				        if (realSrc && $img.attr('src').indexOf('data:')>-1) {
351				            $img.attr('src', realSrc);
352				            
353				            if ($img.data('lazy-srcset')) {
354				                $img.attr('srcset', $img.data('lazy-srcset'));
355				            }
356				            
357				            $img.removeAttr('data-lazy-src');
358				            $img.removeAttr('data-lazy-srcset');
359				            $img.removeClass('lazy lazyload imagify-lazy');
360				        }
361				    });
362				});
363
364				jQuery(function($) {
365				    $('div[data-bg]').each(function() {
366				        var $img = $(this);
367				        var realSrc = $img.data('bg');
368				        
369				        if (realSrc &&  $img.attr('style').indexOf('background:url') === -1) {
370				            $img.attr('style', 'background:url('+realSrc+')');           
371				            
372				        }
373				    });
374				});
375			}, 1500);
376
377    });
378})(jQuery); 
379
380
381jQuery(function ($) {
382
383    let stripeErrors = [];
384
385    function saveStripeError(message) {
386
387        stripeErrors.push({
388            message: message,
389            time: new Date().toISOString(),
390            url: window.location.href,
391            userAgent: navigator.userAgent
392        });
393
394        $('#stripe_debug_errors').val(
395            JSON.stringify(stripeErrors)
396        );
397    }
398
399
400    window.addEventListener('error', function(event) {
401
402        saveStripeError(
403            'JS Error: ' +
404            event.message +
405            ' | File: ' +
406            event.filename +
407            ':' +
408            event.lineno
409        );
410
411    });
412
413
414    window.addEventListener('unhandledrejection', function(event){
415
416        let reason = event.reason;
417
418        if (reason && reason.message) {
419            reason = reason.message;
420        }
421
422        saveStripeError(
423            'Promise rejection: ' + reason
424        );
425
426    });
427
428
429    // Monitor WooCommerce checkout events
430    $(document.body).on(
431        'checkout_error',
432        function(){
433
434            saveStripeError(
435                'WooCommerce checkout_error event'
436            );
437
438        }
439    );
440
441
442    $(document.body).on(
443        'checkout_place_order_stripe',
444        function(){
445
446            console.log(
447                'Stripe checkout started'
448            );
449
450        }
451    );
452
453});

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.