PageSourceSearch

https://glowiphub.com/wp-content/plugins/mystickymenu/js/welcomebar-front.js?ver=2.6.7

js glowiphub.com collected 2026-09-24 09:58:38 UTC 24,441 bytes, 480 lines download raw bytes

1jQuery(document).ready(function($){	
2	
3	var adminBarHeight = 0;
4	if ( $("#wpadminbar").length != 0 ){
5		var adminBarHeight = $('#wpadminbar').height();
6	}
7	var mysticky_welcomebar_height = adminBarHeight + jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
8	if( jQuery( '.mysticky-welcomebar-fixed' ).data('position') == 'top' ) {
9		jQuery( '.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
10	} else {
11		jQuery( '.mysticky-welcomebar-entry-effect-slide-in.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
12	}
13	var divi_topbar_height = $( '.et_fixed_nav #top-header' ).outerHeight();
14	var divi_total_height = mysticky_welcomebar_height + divi_topbar_height;
15	var welcombar_aftersubmission = $( '.mysticky-welcomebar-fixed' ).data('aftersubmission');
16	if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
17		var welcomebar_storage = localStorage.getItem("welcomebar_close");
18	} else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
19		var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
20	} else {
21		sessionStorage.removeItem('welcomebar_close');
22		localStorage.removeItem('welcomebar_close');
23		var welcomebar_storage = null;
24	}
25	if ( welcomebar_storage === null ){
26
27		var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
28		
29		jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
30
31		if ( after_trigger == 'after_a_few_seconds' ) {
32			
33			if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
34				if ( $( window ).width() > 767 ) {
35					var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
36					var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
37					var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
38					
39					setTimeout(function(){
40						jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
41						$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
42						if ( welcombar_position == 'top' ) {								
43							
44							jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
45							jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', (adminBarHeight + 0) + 'px' );
46							jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
47							$( 'html' ).css( 'margin-bottom', '' );
48							jQuery( '#mysticky_divi_style' ).remove();
49							jQuery( '.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
50							jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
51							$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
52							$( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
53						} else {
54							jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
55							jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
56							$( 'html' ).css( 'margin-top', '' );
57							jQuery( '#mysticky_divi_style' ).remove();
58							jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
59							$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
60						}
61					}, trigger_sec );
62				}
63			}
64		}
65		if ( $( window ).width() < 767 ) {
66			if ( after_trigger == 'after_a_few_seconds' ) {
67				if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
68					var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
69					var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
70					var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
71					setTimeout(function(){
72						jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
73						$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
74						jQuery( '#mysticky_divi_style' ).remove();
75						jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );							
76						if ( welcombar_position == 'top' ) {
77							jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight + 0) + 'px' );
78							jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
79							$( 'html' ).css( 'margin-bottom', '' );
80							$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
81							$( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
82						} else {
83							jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
84							jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
85							$( 'html' ).css( 'margin-top', '' );
86							$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
87						}
88					}, trigger_sec );
89				}
90			}
91		}
92		mystickyelements_present();
93	}
94	$( window ).resize( function(){		
95	
96		var mysticky_welcomebar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
97		if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
98			var welcomebar_storage = localStorage.getItem("welcomebar_close");
99		} else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
100			var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
101		} else {
102			sessionStorage.removeItem('welcomebar_close');
103			localStorage.removeItem('welcomebar_close');
104			var welcomebar_storage = null;
105		}
106		if ( welcomebar_storage === null ){
107			var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
108			if ( ! $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-notapper' ) ) {
109				jQuery( 'body' ).addClass( 'mysticky-welcomebar-apper' );
110			} else {
111				jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
112			}
113			if ( after_trigger == 'after_a_few_seconds' ) {
114				var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
115				var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
116				var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
117				if ( $( window ).width() < 767 ) {
118					if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
119						setTimeout(function(){
120							jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
121							$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
122							jQuery( '#mysticky_divi_style' ).remove();
123							jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
124							if ( welcombar_position == 'top' ) {
125								jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight +  0) + 'px' );
126								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
127								$( 'html' ).css( 'margin-bottom', '' );
128								$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
129								$( '.mysticky-welcomebar-apper #mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
130							} else {
131								jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
132								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
133								$( 'html' ).css( 'margin-top', '' );
134								$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
135							}
136						}, trigger_sec );
137					}
138				} else {
139					if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
140						setTimeout(function(){
141							jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
142							$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
143							if ( welcombar_position == 'top' ) {
144								jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight + 0) + 'px' );
145								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
146								$( 'html' ).css( 'margin-bottom', '' );
147								jQuery( '#mysticky_divi_style' ).remove();
148								jQuery( '.mysticky-welcomebar-apper.et_fixed_nav #top-header' ).css( 'top', welcombar_height + 'px' );
149								jQuery( 'head' ).append( '<style id="mysticky_divi_style" type="text/css">.mysticky-welcomebar-apper.et_fixed_nav #main-header {top: ' + welcombar_height + 'px !important}.mysticky-welcomebar-apper.et_fixed_nav #top-header + #main-header{top: ' + divi_total_height + 'px !important}</style>' );
150								$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
151								$( '.mysticky-welcomebar-apper #mysticky-nav' ).css( 'to
151p', mysticky_welcomebar_height + 'px' );
152							} else {
153								jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
154								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
155								$( 'html' ).css( 'margin-top', '' );
156								jQuery( '#mysticky_divi_style' ).remove();
157								jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
158								$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
159							}
160						}, trigger_sec );
161					}
162				}
163			}
164			mystickyelements_present();
165		}
166	} );
167
168	jQuery(window).on( 'scroll', function(){			
169		if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
170			var welcomebar_storage = localStorage.getItem("welcomebar_close");
171		} else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
172			var welcomebar_storage = sessionStorage.getItem("welcomebar_close");
173		} else {
174			sessionStorage.removeItem('welcomebar_close');
175			localStorage.removeItem('welcomebar_close');
176			var welcomebar_storage = null;
177		}
178		if ( welcomebar_storage === null ){
179			var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
180			var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
181			if ( welcombar_position == 'top' ) {
182				$( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
183			}
184			if ( after_trigger === 'after_scroll' ) {
185				var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
186				var after_scroll_val = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec');
187				var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
188				var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
189				if( scroll > after_scroll_val ) {
190					if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) {
191						if ( $( window ).width() > 767 ) {
192							jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
193							$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
194							if ( welcombar_position == 'top' ) {
195								jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', (adminBarHeight+ 0 ) + 'px' );
196								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
197								$( 'html' ).css( 'margin-bottom', '' );
198								$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
199								$( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
200							} else {
201								jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
202								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
203								$( 'html' ).css( 'margin-top', '' );
204								$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
205							}
206						}
207					}
208					if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
209						if ( $( window ).width() < 767 ) {
210							jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' );
211							$( '.mysticky-welcomebar-fixed' ).addClass( 'entry-effect' );
212							if ( welcombar_position == 'top' ) {
213								jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight +0 ) + 'px' );
214								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
215								$( 'html' ).css( 'margin-bottom', '' );
216								$( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' );
217								$( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
218							} else {
219								jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' );
220								jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' );
221								$( 'html' ).css( 'margin-top', '' );
222								$( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' );
223							}
224						}
225					}
226				}
227			}
228			mystickyelements_present();
229		}
230
231	});
232	
233	jQuery( '.mysticky-welcomebar-close, .mysticky-welcomebar-btn a' ).on( 'click', function(){
234		/* Submit contact lead form */
235		var flag				= true;
236		var trigger_sec 		= 100;
237		var welcomebar_widget 	= 0;	
238		if( jQuery(".mysticky-welcomebar-lead-content").length > 0 && !$(this).hasClass("mysticky-welcomebar-close")){
239
240			if( jQuery('#contact-lead-name-'+welcomebar_widget).val() != '' && ( jQuery('#contact-lead-phone-'+welcomebar_widget).val() != '' || jQuery('#contact-lead-email-'+welcomebar_widget).val() != '' )){
241
242				if( jQuery('#contact-lead-email-'+welcomebar_widget).css("display") != 'none' &&  IsEmail(jQuery('#contact-lead-email-'+welcomebar_widget).val()) != true ){
243					
244					if( $(".input-error").length ){
245						$(".input-error").remove();
246					}
247
248					$( '<div class="input-error"><span>Please, enter valid email</span></div>' ).insertAfter( jQuery('#contact-lead-email-' + welcomebar_widget) );
249					flag = false;
250				}	
251
252
253				if( jQuery('#contact-lead-phone-'+welcomebar_widget).css("display") != 'none' &&  validatePhone(jQuery('#contact-lead-phone-'+welcomebar_widget).val()) != true  ){
254					if( $(".input-error").length ){
255						$(".input-error").remove();
256					}
257					$( '<div class="input-error"><span>Please, enter valid phone</span></div>' ).insertAfter( jQuery('#contact-lead-phone-'+welcomebar_widget) );
258					flag=false;
259				}	
260				
261				if (flag == true) {
262					var data = [];
263					data["contact_name"] = jQuery('#contact-lead-name-'+welcomebar_widget).val();
264					data["contact_email"] = jQuery('#contact-lead-email-'+welcomebar_widget).val();
265					data["contact_phone"] = jQuery('#contact-lead-phone-'+welcomebar_widget).val();
266					data["contact_page_link"] = jQuery('#contact-lead-pagelink-'+welcomebar_widget).val();
267					
268					
269					var sucess_message = $( '.mysticky-welcomebar-fixed' ).data('show-success-message');
270					if ( sucess_message == 1) {
271						$(".mysticky-welcomebar-fixed .mysticky-welcomebar-lead-content").hide();
272						$(".mysticky-welcomebar-fixed .mysticky-welcomebar-content p").hide();
273						$(".mysticky-welcomebar-fixed .mysticky-welcomebar-btn.contact-lead-button").hide();
274						$(".mysticky-welcomebar-fixed .mysticky-welcomebar-thankyou-content").show();
275						$(".mysticky-welcomebar-fixed .mysticky-welcomebar-thankyou-content p").show();
276					}
277					var trigger_sec = 2000;
278					jQuery.ajax({
279						url: welcomebar_frontjs.ajaxurl,
280						type:'post',
281						data: 'contact_name='+data["contact_name"]+'&contact_email='+data["contact_email"]+'&contact_phone='+data["contact_phone"]+'&action=stickymenu_contact_lead_form&widget_id=' + welcomebar_widget  + '&page_link='+ data["contact_page_link"]+'&save_form_lead=1&wpnonce=' + welcomebar_frontjs.ajax_nonce,
282						success: function( data ){					
283							$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");							
284							jQuery('#contact-lead-name-'+welcomebar_widget).val('');
285							jQuery('#contact-lead-email-'+welcomebar_widget).val('');
286							jQuery('#contact-lead-phone-'+welcomebar_widget).val('');
287							
288						},
289					});
290				}else{
291					$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
292					return false;
293				}
294
295				
296			}else{
297				localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
298				sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
299				
300				if($(".input-error").length){
301					$(".input-error").remove();
302				}
303
304				if( jQuery('#contact-lead-name-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-name-'+welcomebar_widget).val() == '' && jQuery('#contact-lead-email-'+welcomebar_widget).css("display") != 'none' &&  jQuery('#contact-lead-email-'+welcomebar_widget).val() == '' ){
305
306					$( '<div class="input-error"><span>Please enter your name and email</span></div>' ).insertAfter( jQuery('#contact-lead-name-'+welcomebar_widget) );
307					flag=false;
308
309				}else if( jQuery('#contact-lead-name-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-name-'+welcomebar_widget).val() == '' && jQuery('#contact-lead-phone-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-phone-'+welcomebar_widget).val() == '' ){
310
311					$( '<div class="input-error"><span>Please enter your name and phone</span></div>' ).insertAfter( jQuery('#contact-lead-name-'+welcomebar_widget) );
312					flag=false;
313
314				}else if( jQuery('#contact-lead-name-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-name-'+welcomebar_widget).val() == '' ){
315
316					$( '<div class="input-error"><span>Please enter your name</span></div>' ).insertAfter( jQuery('#contact-lead-name-'+welcomebar_widget) );
317					flag=false;
318
319				}else if( jQuery('#contact-lead-email-'+welcomebar_widget).css("display") != 'none' &&  jQuery('#contact-lead-email-'+welcomebar_widget).val() == '' ){
320
321					$( '<div class="input-error"><span>Please, enter your email</span></div>' ).insertAfter( jQuery('#contact-lead-email-'+welcomebar_widget) );
322					flag=false;
323
324				}else if( jQuery('#contact-lead-phone-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-phone-'+welcomebar_widget).val() == '' ){
325
326					$( '<div class="input-error"><span>Please, enter your phone</span></div>' ).insertAfter( jQuery('#contact-lead-phone-'+welcomebar_widget) );
327					flag=false;
328
329				}
330
331				if(flag==false){
332					
333					$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
334				} else{
335					$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");
336				}
337				return false;
338			}
339		}else{
340			if( $(this).hasClass("mysticky-welcomebar-close") ){
341				localStorage.setItem('is_close_trigger_' + welcomebar_widget, 'yes');
342			}
343		}
344		
345		setTimeout(function(){
346			if( welcombar_aftersubmission != 'show_welcomebar_every_page' ){
347				if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
348					sessionStorage.removeItem('welcomebar_close');
349					localStorage.setItem('welcomebar_close', 'close');
350				} else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
351					localStorage.removeItem('welcomebar_close');
352					sessionStorage.setItem('welcomebar_close', 'close');
353				}
354			}
355			var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
356			var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
357			jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-notapper' );
358			jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
359			jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
360			if ( welcombar_position == 'top' ) {
361				jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
362			} else {
363				jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
364			}
365			jQuery( '#mysticky_divi_style' ).remove();
366			jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
367			jQuery( 'html' ).css( 'margin-top', '' );
368			jQuery( 'html' ).css( 'margin-bottom', '' );
369			$( '#mysticky-nav' ).css( 'top', '0px' );
370			/*if mystickyelements show*/
371			var mystickyelements_show = $( '.mystickyelements-fixed' ).length;
372			if( mystickyelements_show && $( window ).width() <= 1024 && $( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) && welcombar_position == 'top' ) {
373				var mystickyelements_height = $( '.mystickyelements-fixed' ).height();
374				$( '.mystickyelements-fixed' ).css( 'top', '' );
375				$( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_height + 'px !important' );
376			}
377			
378		}, trigger_sec );
379		jQuery('#contact-lead-name-'+welcomebar_widget).val('');
380		jQuery('#contact-lead-email-'+welcomebar_widget).val('');
381		jQuery('#contact-lead-phone-'+welcomebar_widget).val('');
382	} );
383});
384function mystickyelements_present() {
385	var after_trigger 		  = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
386	var mystickyelements_show = jQuery( '.mystickyelements-fixed' ).length;		
387	var welcombar_position 			  = jQuery( '.mysticky-welcomebar-fixed' ).data('position');
388	var adminBarHeight = 0;
389	if ( jQuery("#wpadminbar").length != 0 ){
390		var adminBarHeight = jQuery('#wpadminbar').height();
391	}
392	
393	if ( jQuery( window ).width() <= 600 && jQuery(window).scrollTop() != 0 && welcombar_position == 'top') {
394		jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0px' );
395		var welcombar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
396		
397		if (jQuery( '.mysticky-welcomebar-fixed' ).css('display') === 'none') {
398			welcombar_height= 0;
399		}			
400		jQuery( '#mysticky-nav' ).css( 'top', welcombar_height + 'px' );
401		
402	} else if ( welcombar_position == 'top' ) {
403		var mysticky_welcomebar_height = adminBarHeight + jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
404		if (jQuery( '.mysticky-welcomebar-fixed' ).css('display') === 'none') {
405			mysticky_welcomebar_height= adminBarHeight + 0;
406		}	
407		jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight + 0) + 'px' );			
408		jQuery( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
409	}
410	if( mystickyelements_show ) {
411		
412		var welcombar_height 			  = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
413		var mystickyelements_height 	  = jQuery( '.mystickyelements-fixed' ).height();
414		var mystickyelements_total_height = welcombar_height + mystickyelements_height;
415		if ( jQuery( window ).width() <= 1024 && jQuery( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) ) {
416			if ( after_trigger == 'after_a_few_seconds' ) {
417				if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
418					var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
419					setTimeout(function(){
420						if ( welcombar_position == 'top' ) {
421							jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
422							jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
423						} else {
424							jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
425							jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
426						}
427					}, trigger_sec );
428				}
429			} else if ( after_trigger === 'after_scroll' ) {
430				var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
431				var after_scroll_val = $( '.mysticky-welcomebar-fixed' ).data('triger-sec');
432				if( scroll > after_scroll_val ) {
433					if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
434						if ( welcombar_position == 'top' ) {
435							jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
436							jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
437						} else {
438							jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
439							jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
440						}
441					}
442				}
443			}
444		}
445	}
446}
447jQuery(".mysticky-welcomebar-fixed").on(
448	"animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
449	function() {
450		jQuery(this).removeClass("animation-start");
451	}
452);
453jQuery(document).ready(function() { 
454	var container = jQuery(".mysticky-welcomebar-fixed");
455	var refreshId = setInterval(function() {
456		container.addClass("animation-start");
457	}, 3500);
458});
459
460function IsEmail(email) {
461	var regex =
462/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
463	if (!regex.test(email)) {
464		return false;
465	}
466	else {
467		return true;
468	}
469}
470
471function validatePhone(txtPhone) {
472	var a = txtPhone;
473	var filter = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/;
474	if (filter.test(a)) {
475		return true;
476	}
477	else {
478		return false;
479	}
480}

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.