PageSourceSearch

https://stubcreator.com/wp-content/themes/StubCreator/js/main-footer.js?1790860376

js stubcreator.com collected 2026-10-01 13:13:11 UTC 29,735 bytes, 814 lines download raw bytes

1var admin_ajax = frontend_footer_ajax_object.ajaxurl;
2var site_url = frontend_footer_ajax_object.siteurl;
3var templateurl = frontend_footer_ajax_object.templateurl;
4var bloginfourl = frontend_footer_ajax_object.bloginfourl;
5var admin_ajaxurl = frontend_footer_ajax_object.ajaxurl;
6var is_mobile     = frontend_footer_ajax_object.is_mobile;
7var pathname = window.location.pathname;
8pathname = pathname.split('/');
9var slug = pathname[1];
10jQuery(document).ready(function($) {
11	jQuery('#show-templates .stub_template .btn_color .item a, .use_template').click(function(e) {
12		e.preventDefault();
13		var template_id = jQuery(this).data('id');
14		jQuery('select#btn_color').val(template_id).change();
15		setTimeout(function() {
16			$('#show-templates').modal('hide');
17		}, 600);
18	});
19	if (slug == 'pay-stub-generator' || slug == 'advanced-pay-stub'  || slug == 'paystub-generator-canada' || slug == 'custom-paystub-generator') {
20		jQuery('#show-templates .stub_template .btn_color').owlCarousel({
21			loop: true,
22			margin: 10,
23			responsiveClass: true,
24			items: 1,
25			autoWidth: true,
26			nav: true,
27			navigation: true,
28			navigationText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"],
29			pagination: true,
30			paginationNumbers: false,
31			paginationSpeed: 400,
32			responsive: {
33				0: {
34					items: 1,
35					nav: true
36				},
37				600: {
38					items: 1,
39					nav: true
40				},
41				1000: {
42					items: 1,
43					nav: true
44				}
45			}
46		});
47	}
48	if (slug == 'w-2-form' || slug == 'w-2-form-2013' || slug == 'w-2-form-2014' || slug == 'w-2-form-2015' || slug == 'w-2-form-2016' || slug == 'w-2-form-2017' || slug == 'w-2-form-2018' || slug == 'w-2-form-2019' || slug == 'w-2-form-2020' || slug == 'w-2-form-2021' || slug == 'w-2-form-2022' || slug == 'w-2-form-2023') {
49		jQuery('.btn_color_w2').owlCarousel({
50			loop: true,
51			margin: 10,
52			responsiveClass: true,
53			items: 1,
54			autoWidth: true,
55			nav: true,
56			navigation: true,
57			navigationText: [
58				"<i class='fa fa-chevron-left'></i>",
59				"<i class='fa fa-chevron-right'></i>"
60			],
61			pagination: true,
62			paginationNumbers: false,
63			paginationSpeed: 400,
64			responsive: {
65				0: {
66					items: 1,
67					nav: true
68				},
69				600: {
70					items: 1,
71					nav: true
72				},
73				1000: {
74					items: 1,
75					nav: true
76				}
77			}
78		});
79	}
80	
81	jQuery('#show-templates .stub_template .btn_color').trigger('owl.goTo', jQuery('#show-templates .stub_template .item.active').find('a').data('id'));
82	if (!getCookie('pushNotify')) {
83		if (jQuery(window).width() < 800) {
84			cookieConsent();
85		}
86	}
87	//expand depending on your needs
88	jQuery('.close-cookies').on('click', function() {
89		setCookie('pushNotify', '1', 7);
90		jQuery('.privacy-pop-up').hide();
91		jQuery('body').find('.navbar.navbar-default').attr('style', '');
92	});
93	var buttonURL = '';
94	if (/Android/i.test(navigator.userAgent)) {
95		buttonURL = 'https://bit.ly/3vtBZ7f';
96	} else if (/iPhone/i.test(navigator.userAgent)) {
97		buttonURL = 'https://apple.co/2SuPk1T';
98	}
99
100	function cookieConsent() {
101		var html_data = '<div class="cookie-overlay p-4 d-none privacy-pop-up">' + '<div class="d-flex">' + '<table>' + '<tr>' + '<td style="width: 8%;"><a href="javascript:void(0)" class="closeCookieConsent close-cookies">X</a></td>' + '<td style="display: flex;"><div class="cookieDesc"><p>Generate your paystub using Stubcreator App and <span>Get First Paystub free.</span></p></div></td>' + '<td style="width: 30%;"><div class="cookieButton"><a href="' + buttonURL + '">Download App</a></div></td>' + '</tr>' + '</table>' + '</div>' + '</div>';
102		jQuery(html_data).prependTo('body');
103		jQuery('body').find('.navbar.navbar-default').attr('style', "top:auto");
104	}
105
106	function setCookie(name, value, days) {
107		var expires = "";
108		if (days) {
109			var date = new Date();
110			date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
111			expires = "; expires=" + date.toUTCString();
112		}
113		document.cookie = name + "=" + (value || "") + expires + "; path=/";
114	}
115
116	function getCookie(name) {
117		var nameEQ = name + "=";
118		var ca = document.cookie.split(';');
119		for (var i = 0; i < ca.length; i++) {
120			var c = ca[i];
121			while (c.charAt(0) == ' ') c = c.substring(1, c.length);
122			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
123		}
124		return null;
125	}
126	jQuery(window).scroll(function() {
127		if (jQuery(this).scrollTop() > 50) {
128			jQuery('#back-to-top').fadeIn();
129		} else {
130			jQuery('#back-to-top').fadeOut();
131		}
132	});
133	jQuery('#back-to-top').click(function() {
134		jQuery('body, html').animate({
135			scrollTop: 0
136		}, 800);
137		return false;
138	});
139	var top_div = jQuery('div#page-container nav.navbar');
140	if(top_div.length) {
141		top_div.offset().top;
142		jQuery(window).scroll(function() {
143			var scroll = jQuery(window).scrollTop();
144			if (scroll >= top) {
145				jQuery("nav.navbar").addClass("navbar-fixed-top");
146			}
147			if (scroll <= top) {
148				jQuery("nav.navbar").removeClass("navbar-fixed-top");
149			}
150		});
151	}
152	var currentwidth = jQuery(window).width();
153	if (currentwidth <= 767) {
154		jQuery('ul#top-menu1 > li.menu-item-has-children > a').attr('href', 'javascript:void(0)');
155		jQuery('ul#top-menu1 > li.menu-item-has-children > ul > li.menu-item-has-children > a').attr('href', 'javascript:void(0)');
156		jQuery('ul#top-menu1 ul.sub-menu').hide();
157		jQuery('ul#top-menu1 li.menu-item-has-children a').click(function() {
158			jQuery(this).next().children('ul').hide();
159			jQuery(this).next().find('ul').hide();
160			jQuery(this).next().toggle();
161		});
162	}
163	jQuery(document).on('click', 'a.showcoupon,a.dispcoupon', function(e) {
164		e.preventDefault();
165		e.stopPropagation();
166		jQuery('form.checkout_coupon.woocommerce-form-coupon').toggle('slow');
167	});
168	jQuery(document).ready(function($) {
169		var headings = $('.sec3_text1');
170		var nav = $('#top-menu-nav #top-menu li');
171		$(document).scroll(function() {
172			var docScrollTop = $(document).scrollTop();
173			var windowHeight = $(window).height();
174			var foundHeading;
175			headings.each(function(index, heading) {
176				heading = $(heading);
177				if ((heading.offset().top + 250) - windowHeight <= docScrollTop && (!foundHeading || foundHeading.offset().top < (heading.offset().top + 250))) {
178					foundHeading = heading;
179				}
180			});
181			nav.find('.current').removeClass('current');
182			if (foundHeading) {
183				nav.find('[href="/#' + foundHeading.data('id') + '"]').addClass('current');
184			}
185		});
186	});
187	jQuery(document).find('.create_cmp_address').on('click', function() {
188		var form_data = jQuery('#manage_company_address_form').serialize();
189		jQuery.ajax({
190			url: admin_ajaxurl,
191			type: 'post',
192			data: form_data + '&action=add_company_address',
193			dataType: "json",
194			success: function(response) {
195				if (response.data_insert == true) {
196					jQuery(document).find('.alert_msg').text(response.msg);
197					jQuery(document).find('.alert_msg').css({
198						"color": "green"
199					});
200					jQuery('#manage_company_address_form input[type="text"]').val('');
201					window.location.reload();
202					setTimeout(function() {
203						jQuery(document).find('.alert_msg').text('');
204						jQuery(document).find('#manage_company_address_modal').modal('hide');
205					}, 1000);
206				} else {
207					jQuery(document).find('.alert_msg').text(response.msg);
208					jQuery(document).find('.alert_msg').css({
209						"color": "red"
210					});
211					setTimeout(function() {
212						jQuery(document).find('.alert_msg').text('');
213					}, 5000);
214				}
215			}
216		});
217	});
218	jQuery(document).find('.create_emp_address').on('click', function() {
219		var form_data = jQuery('#manage_employee_address_form').serialize();
220		jQuery.ajax({
221			url: admin_ajaxurl,
222			type: 'post',
223			data: form_data + '&action=add_employee_address&cmp_id=' + jQuery('.add_address').data('cmpid') + '&contractor_emp=' + jQuery('#contractor_emp:checked').val(),
224			dataType: "json",
225			success: function(response) {
226				if (response.data_insert == true) {
227					jQuery(document).find('.alert_msg').text(response.msg);
228					jQuery(document).find('.alert_msg').css({
229						"color": "green"
230					});
231					jQuery('#manage_employee_address_form input[type="text"]').val('');
232					// window.location.reload();
233					
234					var activeCompanyId = jQuery('.all_cmp_add ul li.active .ajax_load_company').data('cmpid');
235
236					// Reload employee + company section
237					jQuery.ajax({
238						type: "POST",
239						url: window.location.href,
240						data: {
241							action: "load_company_ajax",
242							company_id: activeCompanyId
243						},
244						success: function(res){
245							jQuery('.manage_address').html(res);
246						}
247					});
248					
249					setTimeout(function() {
250						jQuery(document).find('.alert_msg').text('');
251						jQuery(document).find('#manage_employee_address_modal').modal('hide');
252					}, 1000);
253				} else {
254					jQuery(document).find('.alert_msg').text(response.msg);
255					jQuery(document).find('.alert_msg').css({
256						"color": "red"
257					});
258					setTimeout(function() {
259						jQuery(document).find('.alert_msg').text('');
260					}, 5000);
261				}
262			}
263		});
264	});
265	jQuery(document).find('.cmp_edit').on('click', function() {
266		var cmp_id = jQuery(this).data("cmpid");
267		jQuery.ajax({
268			url: admin_ajaxurl,
269			type: 'post',
270			data: 'action=company_address_edit&cmp_id=' + cmp_id,
271			dataType: "json",
272			success: function(response) {
273				jQuery('form#manage_company_address_form_edit #company_name').val(response.data_record[0].company_name);
274				jQuery('form#manage_company_address_form_edit #cmp_add_1').val(response.data_record[0].company_address_1);
275				jQuery('form#manage_company_address_form_edit #cmp_add_2').val(response.data_record[0].company_address_2);
276				jQuery('form#manage_company_address_form_edit #cmp_add_id').val(response.data_record[0].ID);
277				jQuery('form#manage_company_address_form_edit #cmp_ein').val(response.data_record[0].company_ein);
278				if (response.data_record[0].cmp_logo_img != '') {
279					jQuery('form#manage_company_address_form_edit .preview #img2').attr("src", response.data_record[0].cmp_logo_img);
280					jQuery('form#manage_company_address_form_edit input[name="cmp_logo_img2"]').val(response.data_record[0].cmp_logo_img);
281					jQuery('form#manage_company_address_form_edit .preview img').show();
282				}
283				setTimeout(function() {
284					jQuery(document).find('#manage_company_address_modal_edit').modal('show');
285				}, 300);
286			}
287		});
288	});
289	jQuery(document).find('.edit_cmp_address').on('click', function() {
290		var form_data = jQuery('#manage_company_address_form_edit').serialize();
291		jQuery.ajax({
292			url: admin_ajaxurl,
293			type: 'post',
294			data: form_data + '&action=update_cmp_address',
295			dataType: "json",
296			success: function(response) {
297				if (response.data_insert == true) {
298					jQuery(document).find('.alert_msg').text(response.msg);
299					jQuery(document).find('.alert_msg').css({
300						"color": "green"
301					});
302					jQuery('#manage_company_address_form_edit input[type="text"]').val('');
303					// window.location.reload();
304					
305					var activeCompanyId = jQuery('#cmp_add_id').val();
306
307					// Reload left company + employees section
308					jQuery.ajax({
309						type: "POST",
310						url: window.location.href,
311						data: {
312							action: "load_company_ajax",
313							company_id: activeCompanyId
314						},
315						success: function(res){
316							jQuery('.manage_address').html(res);
317						}
318					});
319					
320					setTimeout(function() {
321						jQuery(document).find('.alert_msg').text('');
322						jQuery(document).find('#manage_company_address_modal_edit').modal('hide');
323					}, 1000);
324				} else {
325					jQuery(document).find('.alert_msg').text(response.msg);
326					jQuery(document).find('.alert_msg').css({
327						"color": "red"
328					});
329					setTimeout(function() {
330						jQuery(document).find('.alert_msg').text('');
331					}, 5000);
332				}
333			}
334		});
335	});
336
337	jQuery( document ).on( 'click','.send_global_mail', function() {
338		var lead_id = jQuery(this).data('lead_id');
339		var user_id = jQuery(this).data('user_id');
340		var email   = jQuery(this).data('email');
341		var data    = { 'lead_id':lead_id, 'user_id':user_id, 'stub_email':email, 'action': 'admin_send_global_paystub' };
342		jQuery.ajax({
343			url: admin_ajaxurl,
344			type: 'post',
345			data: data,
346			dataType: "json",
347			success: function( response ) {
348				alert(response.message);
349			}
350
351		});
352	} );
353	
354	jQuery(document).find('.emp_edit').on('click', function() {
355		var empid = jQuery(this).data("empid");
356		jQuery.ajax({
357			url: admin_ajaxurl,
358			type: 'post',
359			data: 'action=emp_address_edit&emp_id=' + empid,
360			dataType: "json",
361			success: function(response) {
362				jQuery('form#manage_emp_address_form_edit #employee_name').val(response.data_record[0].employee_name);
363				jQuery('form#manage_emp_address_form_edit #emp_add_1').val(response.data_record[0].employee_address_1);
364				jQuery('form#manage_emp_address_form_edit #emp_add_2').val(response.data_record[0].employee_address_2);
365				jQuery('form#manage_emp_address_form_edit #emp_add_id').val(response.data_record[0].ID);
366				jQuery('form#manage_emp_address_form_edit #emp_ssn').val(response.data_record[0].employee_ssn);
367				jQuery('form#manage_emp_address_form_edit #emp_hash_id').val(response.data_record[0].employee_hash_id);
368				jQuery('form#manage_emp_address_form_edit #hourly_rate').val(response.data_record[0].hourly_rate);
369				jQuery('form#manage_emp_address_form_edit #total_working_hour').val(response.data_record[0].total_working_hour);
370				jQuery('form#manage_emp_address_form_edit #annual_salary').val(response.data_record[0].annual_salary);
371				if (response.data_record[0].pay_type == 1) {
372					jQuery('form#manage_emp_address_form_edit .hourly_cls').show();
373					jQuery('form#manage_emp_address_form_edit .salary_cls').hide();
374				} else {
375					jQuery('form#manage_emp_address_form_edit .hourly_cls').hide();
376					jQuery('form#manage_emp_address_form_edit .salary_cls').show();
377				}
378				if (response.data_record[0].contractor == 'yes') {
379					jQuery('form#manage_emp_address_form_edit #contractor_emp1').attr("checked", true);
380				}
381				jQuery('input[name="paystypes_new"][value="' + response.data_record[0].pay_type + '"]').attr("checked", true);
382				setTimeout(function() {
383					jQuery(document).find('#manage_emp_address_modal_edit').modal('show');
384				}, 300);
385			}
386		});
387	});
388	jQuery(document).find('.edit_emp_address').on('click', function() {
389		var form_data = jQuery('#manage_emp_address_form_edit').serialize();
390		jQuery.ajax({
391			url: admin_ajaxurl,
392			type: 'post',
393			data: form_data + '&action=update_emp_address',
394			dataType: "json",
395			success: function(response) {
396				if (response.data_insert == true) {
397					jQuery(document).find('.alert_msg').text(response.msg);
398					jQuery(document).find('.alert_msg').css({
399						"color": "green"
400					});
401					jQuery('#manage_emp_address_form_edit input[type="text"]').val('');
402					// window.location.reload();
403					
404					// GET ACTIVE COMPANY ID
405					var activeCompanyId = jQuery('.all_cmp_add ul li.active .ajax_load_company').data('cmpid');
406
407					// RELOAD COMPANY + EMPLOYEE SECTION
408					jQuery.ajax({
409						type: "POST",
410						url: window.location.href,
411						data: {
412							action: "load_company_ajax",
413							company_id: activeCompanyId
414						},
415						success: function(res){
416							jQuery('.manage_address').html(res);
417						}
418					});
419					
420					setTimeout(function() {
421						jQuery(document).find('.alert_msg').text('');
422						jQuery(document).find('#manage_emp_address_modal_edit').modal('hide');
423					}, 1000);
424				} else {
425					jQuery(document).find('.alert_msg').text(response.msg);
426					jQuery(document).find('.alert_msg').css({
427						"color": "red"
428					});
429					setTimeout(function() {
430						jQuery(document).find('.alert_msg').text('');
431					}, 5000);
432				}
433			}
434		});
435	});
436	jQuery('#manage_cmp_add').on('change', function() {
437		var cmpaddid = jQuery(this).val();
438		if (cmpaddid != '') {
439			jQuery.ajax({
440				url: admin_ajaxurl,
441				type: 'post',
442				data: 'action=get_company_address&cmp_id=' + cmpaddid,
443				dataType: "json",
444				success: function(response) {
445					jQuery('#manage_emp_add').find('option:not(:first)').remove();
446					jQuery.each(response.data_record, function(i, item) {
447						jQuery('#manage_emp_add').append('<option value="' + item.ID + '">' + item.employee_name + '</option>');
448					});
449					jQuery('#companyName').val(response.date_cmp[0].company_name);
450					jQuery('#company_add').val(response.date_cmp[0].company_address_1);
451					jQuery('#company_add_2').val(response.date_cmp[0].company_address_2);
452					if (slug == 'pay-stub-generator' && is_mobile == 'yes') {
453                        jQuery('#company_name').val(response.date_cmp[0].company_name);
454                        jQuery('#company_addr').val(response.date_cmp[0].company_address_1);
455                        jQuery('#company_addr_2').val(response.date_cmp[0].company_address_2);
456                        if( response.date_cmp[0].cmp_logo_img !='' ) {
457                            jQuery('#preview').attr('src',response.date_cmp[0].cmp_logo_img)
458                            jQuery('.upload-content').hide();
459                            jQuery('#preview').show();
460                            jQuery('#company_logo_name').val('response.date_cmp[0].cmp_logo_img');
461                        } else {
462                            jQuery('#preview').removeAttr('src')
463                            jQuery('.upload-content').show();
464                            jQuery('#preview').hide();
465                            jQuery('#company_logo_name').val('');
466                        }
467                    }
468					if (response.date_cmp[0].cmp_logo_img != '') {
469						jQuery('#company_logo_name').val(response.date_cmp[0].cmp_logo_img);
470					}
471				}
472			});
473		}
474	});
475	jQuery('#manage_emp_add').on('change', function() {
476		var empaddid = jQuery(this).val();
477		var cmpaddid = jQuery('#manage_cmp_add').val();
478		if (empaddid != '') {
479			jQuery.ajax({
480				url: admin_ajaxurl,
481				type: 'post',
482				data: 'action=get_emp_address&emp_id=' + empaddid + '&cmp_id=' + cmpaddid,
483				dataType: "json",
484				success: function(response) {
485					jQuery('#companyName').val(response.date_cmp[0].company_name);
486					jQuery('#company_add').val(response.date_cmp[0].company_address_1);
487					jQuery('#company_add_2').val(response.date_cmp[0].company_address_2);
488					if (response.date_cmp[0].cmp_logo_img != '') {
489						jQuery('#company_logo_name').val(response.date_cmp[0].cmp_logo_img);
490					}
491					if (slug == 'pay-stub-generator' && is_mobile == 'yes') {
492                        jQuery('#emp-name').val(response.date_emp[0].employee_name);
493                        jQuery('#employee_addr').val(response.date_emp[0].employee_address_1);
494                        jQuery('#employee_addr_2').val(response.date_emp[0].employee_address_2);
495                        jQuery('#ssn-no').val(response.date_emp[0].employee_ssn);
496                        jQuery('#emp_id').val(response.date_emp[0].employee_hash_id);
497                        if (response.date_emp[0].pay_type == 1) {
498                            jQuery('#hour-rate').val(response.date_emp[0].hourly_rate);
499                            jQuery('#workinghour').val(response.date_emp[0].total_working_hour);
500                            jQuery('#reg-pay-rate').val(response.date_emp[0].hourly_rate);
501                            jQuery('#reg-pay-hour').val(response.date_emp[0].total_working_hour);
502                            jQuery("#paytype1").trigger("click");
503                        } else {
504                            jQuery('#annual').val(response.date_emp[0].annual_salary);
505                            jQuery("#paytype2").trigger("click");
506                        }
507                    } else {
508                        jQuery('#empl-name').val(response.date_emp[0].employee_name);
509                        jQuery('#employee_add').val(response.date_emp[0].employee_address_1);
510                        jQuery('#employee_add_2').val(response.date_emp[0].employee_address_2);
511                        jQuery('#ssn-num').val(response.date_emp[0].employee_ssn);
512                        jQuery('#empid').val(response.date_emp[0].employee_hash_id);
513                        if (response.date_emp[0].pay_type == 1) {
514                            jQuery('#hour-rate').val(response.date_emp[0].hourly_rate);
515                            jQuery('#workinghour').val(response.date_emp[0].total_working_hour);
516                            jQuery('#reg-pay-rate').val(response.date_emp[0].hourly_rate);
517                            jQuery('#reg-pay-hour').val(response.date_emp[0].total_working_hour);
518                            jQuery("#paytype1").trigger("click");
519                        } else {
520                            jQuery('#annual').val(response.date_emp[0].annual_salary);
521                            jQuery("#paytype2").trigger("click");
522                        }
523                    }
524					if (response.date_emp[0].contractor == 'yes') {
525						jQuery('form#stubForm #contractor').trigger("click");
526					} else {
527						if (jQuery('form#stubForm #contractor').is(':checked')) {
528							jQuery('form#stubForm #contractor').trigger("click");
529		
529				}
530					}
531				}
532			});
533		}
534	});
535	jQuery("#file").change(function() {
536		var fd = new FormData();
537		var files = jQuery('#file')[0].files;
538		if (files.length > 0) {
539			var size  = files[0].size;
540			if ( size > 3000000 ) {
541				jQuery('.red_p').text("Files must be less then 3MB..!");
542				return false;
543			}
544			fd.append('file', files[0]);
545			jQuery.ajax({
546				url: templateurl + '/upload.php',
547				type: 'post',
548				data: fd,
549				contentType: false,
550				processData: false,
551				dataType: 'json',
552				success: function(response) { 
553					if (response != 0) {
554						
555						jQuery("#img").attr("src", templateurl + response.new_src);
556						jQuery('input[name="cmp_logo_img"]').val(templateurl + response.new_src);
557						jQuery(".preview img").show();
558						
559					} else {
560						alert('file not uploaded');
561					}
562				},
563			});
564		} else {
565			alert("Please select a file.");
566		}
567	});
568	jQuery(document).find("#file2").change(function() {
569		var fd = new FormData();
570		var files = jQuery('form#manage_company_address_form_edit #file2')[0].files;
571		if (files.length > 0) {
572			var size  = files[0].size;
573			if ( size > 3000000 ) {
574				jQuery('.red_p').text("Files must be less then 3MB..!");
575				return false;
576			}
577			fd.append('file', files[0]);
578			jQuery.ajax({
579				url: templateurl + '/upload.php',
580				type: 'post',
581				data: fd,
582				contentType: false,
583				processData: false,
584				dataType: 'json',
585				success: function(response) {
586					if (response != 0) {
587						jQuery("form#manage_company_address_form_edit #img2").attr("src", templateurl + response.new_src);
588						jQuery('input[name="cmp_logo_img2"]').val(templateurl + response.new_src);
589						jQuery("form#manage_company_address_form_edit .preview img").show();
590					} else {
591						alert('file not uploaded');
592					}
593				},
594			});
595		} else {
596			alert("Please select a file.");
597		}
598	});
599	jQuery(document).find('.remove_cmp_logo').on('click', function() {
600		var cmp_id = jQuery(this).data("id");
601		jQuery.ajax({
602			url: admin_ajaxurl,
603			type: 'post',
604			data: "cmp_id=" + cmp_id + '&action=remove_cmp_logo',
605			dataType: "json",
606			success: function(response) {
607				if (response.data_insert == true) {
608					jQuery('form#manage_company_address_form_edit .preview #img2').attr("src", '');
609					jQuery('form#manage_company_address_form_edit input[name="cmp_logo_img2"]').val('');
610					jQuery('form#manage_company_address_form_edit .preview img').hide();
611					jQuery('form#manage_company_address_form_edit .remove_cmp_logo').hide();
612					jQuery('form#manage_company_address_form_edit .remove_cmp_logo').attr("data-id", '');
613				} else {
614					jQuery(document).find('.alert_msg').text(response.msg);
615					jQuery(document).find('.alert_msg').css({
616						"color": "red"
617					});
618					setTimeout(function() {
619						jQuery(document).find('.alert_msg').text('');
620					}, 5000);
621				}
622			}
623		});
624	});
625	jQuery(document).on("keypress keyup blur", '#emp_ssn', function(event) {
626		jQuery(this).val(jQuery(this).val().replace(/[^0-9\.]/g, ''));
627		if ((event.which != 46 || jQuery(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57) && event.which != 8 && event.which == 9) {
628			return false;
629		}
630	});
631	jQuery(document).on('change', '#input_1_14', function() {
632		call_tocal_ajax();
633	});
634	jQuery(document).on('change', '#input_1_26', function() {
635		call_tocal_ajax();
636	});
637	jQuery(document).on('change', '#input_1_102', function() {
638		call_tocal_ajax();
639	});
640	jQuery(document).on('change keyup', '#input_1_28', function() {
641		call_tocal_ajax();
642	});
643	
644	
645	jQuery(document).on('click', '#submit_btn_discount', function(e) {
646        jQuery('#loader-stubs1').show();
647        jQuery(this).attr('disabled',true);
648        jQuery(this).css('opacity','0.5');
649        var flag=0;
650        var emailaddress = jQuery('#email').val();
651        if(emailaddress == '')
652        {
653            alert('Email should not be empty.');
654            jQuery('#email').focus();
655            return false;
656        }
657        window.location.href = "https://stubcreator.com/thank-you/?free=1";
658    });
659	
660	/* var distance = jQuery('.static_img_blog');
661	if(distance.length){
662		distance.offset().top;
663		var distance2 = jQuery('.sharethis-inline-share-buttons').offset().top - 610;
664		jQuery(window).scroll(function () {
665			if ( jQuery(this).scrollTop() >= distance ) {		
666				if( jQuery(this).scrollTop() >= distance2 ) {
667					jQuery('.static_img_blog').css('position','static');
668				} else {
669					jQuery('.static_img_blog').css('position','fixed').css('top',0);
670				}
671			} else {
672				jQuery('.static_img_blog').css('position','static');
673			}
674		});
675	}	 */
676
677	function call_tocal_ajax() {
678		var templateurl1 = templateurl;
679		var state = jQuery('#input_1_14 :selected').text();
680		var auto_on_off = 'on';
681		var marital = jQuery('#input_1_26').val();
682		var exemption = jQuery('#input_1_102').val();
683		var last_year_tax = jQuery('#input_1_28').val();
684		jQuery('#input_1_87, #input_1_88, #input_1_89, #input_1_90').val(parseFloat(last_year_tax).toFixed(2));
685		var data = {
686			'state': state,
687			'auto': auto_on_off,
688			'marital': marital,
689			'exemption': exemption,
690			'last_year_tax': last_year_tax
691		};
692		jQuery.ajax({
693			url: templateurl1 + "/tax_form_calculation.php",
694			data: data,
695			type: 'POST',
696			dataType: 'json',
697			success: function(data) {
698				if (data.calculate == true) {
699					jQuery('#input_1_30').val(remove_comma(data.cal_data.federal_tax));
700					jQuery('#input_1_32').val(remove_comma(data.cal_data.FICA_Social_Security));
701					jQuery('#input_1_33').val(remove_comma(data.cal_data.FICA_Medicare));
702					jQuery('#input_1_31').val(remove_comma(data.cal_data.state_tax));
703				}
704			}
705		});
706	}
707
708	function addCommas(nStr) {
709		nStr += '';
710		var x = nStr.split('.');
711		var x1 = x[0];
712		var x2 = x.length > 1 ? '.' + x[1] : '';
713		var rgx = /(\d+)(\d{3})/;
714		while (rgx.test(x1)) {
715			x1 = x1.replace(rgx, '$1' + ',' + '$2');
716		}
717		return x1 + x2;
718	}
719
720	function remove_comma(value) {
721		return value = value.replace(/,/g, "");
722	}
723});
724jQuery('.custom_redirect a').on('click', function() {
725	window.open('https://eformscreator.com/', '_blank');
726})
727
728jQuery( document ).ready(function( $ ) {
729	if ( $( 'body' ).hasClass( 'single-post') ) {
730		var top = $('.sidebar-img').offset().top - parseFloat($('.sidebar-img').css('marginTop').replace(/auto/, 0));
731		var footTop = $('.cta_footer').offset().top - parseFloat($('.cta_footer').css('marginTop').replace(/auto/, 0));
732	
733		var maxY = footTop - $('.sidebar-img').outerHeight();
734	
735		$(window).scroll(function(evt) {
736		var y = $(this).scrollTop();
737		if (y > top) {
738			if (y < maxY) {
739				$('.sidebar-img').addClass('sidebar-fixed').removeAttr('style');
740			} else {
741				$('.sidebar-img').removeClass('sidebar-fixed').css({
742					position: 'absolute',
743					top: (maxY - top) + 'px'
744				});
745			}
746		} else {
747			$('.sidebar-img').removeClass('sidebar-fixed');
748		}
749		});
750	}
751	var windowSize = $(window).width();
752	if (windowSize <= 992) {
753		$(window).scroll(function() {
754			// scrollToTop is not a function - changed to scrollTop
755			if ($(this).scrollTop() > 75) {
756				$('.mobileShow').fadeIn();
757			} else {
758				$('.mobileShow').fadeOut();
759			}
760		})
761	}
762	$( '.customer_support' ).hover( function(){
763		$( '.cs_toggle').stop().slideToggle("slow");
764	});
765  });
766
767  
768function Toggle_promo_code_form(){
769    jQuery('.promo_code_form').toggle();
770}
771function apply_couponcode(){
772	if(jQuery('#coupon_code').val() != ''){
773		var coupon_code = jQuery('#coupon_code').val();
774		jQuery.ajax({
775			url: admin_ajax,
776			data: {'action':'apply_custom_coupon',coupon_code:coupon_code},
777			type: 'POST',
778			dataType: 'json',
779			beforeSend: function() {    
780				$('.apply_coupon_btn').text('Loading..');
781				$('.apply_coupon_btn').attr('disabled', true);
782			},
783			success: function(data) {				
784				if(data.status == true){
785					$('.order_table tbody tr:last').prev().after('<tr><td>Coupon Discount</td><td class="black text-right">-$'+data.discount_amount+'</td></tr>');
786					$('.order_total').html('<b>Total </b>$'+data.total_amount+' USD');
787					$('#error_msg').html(data.msg);
788					$('#discounted_amount').val(data.total_amount);
789					if(data.total_amount == 0) {
790						$('#submit_btn_discount').show();
791						$('.discount_0').hide();
792					} else {
793						$('#submit_btn_discount').hide();
794						$('.discount_0').show();
795					}
796					$('.apply_coupon_btn').attr('disabled', true);
797					$('.apply_coupon_btn').css( {'pointer-events':'none', 'background' : '#fdba448c' } );
798				} else {
799					$('#error_msg').html(data.msg);
800					$('.apply_coupon_btn').attr('disabled', false);
801					$('.apply_coupon_btn').css( {'pointer-events':'unset', 'background' : '#f89040' } );
802				}
803			},
804			error: function(data) {
805				console.log("ERROR!");
806			},
807			complete: function(data) {
808				$('.apply_coupon_btn').text('Apply Code');
809			}
810		});
811	} else {
812		alert('Add coupon code');
813	}
814}

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.