PageSourceSearch

http://uoftengineering.com/js/welcomebar-front.js

js uoftengineering.com collected 2026-10-04 10:09:01 UTC 23,818 bytes, 471 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
235
236	/* Submit contact lead form */
237
238	var flag=true;
239	var trigger_sec = 100;
240	var welcomebar_widget = 0;	
241	if( jQuery(".mysticky-welcomebar-lead-content").length > 0 && !$(this).hasClass("mysticky-welcomebar-close")){
242
243		if( jQuery('#contact-lead-name-'+welcomebar_widget).val() != '' && ( jQuery('#contact-lead-phone-'+welcomebar_widget).val() != '' || jQuery('#contact-lead-email-'+welcomebar_widget).val() != '' )){
244
245			if( jQuery('#contact-lead-email-'+welcomebar_widget).css("display") != 'none' &&  IsEmail(jQuery('#contact-lead-email-'+welcomebar_widget).val()) != true ){
246				
247				if( $(".input-error").length ){
248					$(".input-error").remove();
249				}
250
251				$( '<div class="input-error"><span>Please, enter valid email</span></div>' ).insertAfter( jQuery('#contact-lead-email-' + welcomebar_widget) );
252				flag = false;
253			}	
254
255
256			if( jQuery('#contact-lead-phone-'+welcomebar_widget).css("display") != 'none' &&  validatePhone(jQuery('#contact-lead-phone-'+welcomebar_widget).val()) != true  ){
257				if( $(".input-error").length ){
258					$(".input-error").remove();
259				}
260				$( '<div class="input-error"><span>Please, enter valid phone</span></div>' ).insertAfter( jQuery('#contact-lead-phone-'+welcomebar_widget) );
261				flag=false;
262			}	
263			
264			if (flag == true) {
265				var data = [];
266				data["contact_name"] = jQuery('#contact-lead-name-'+welcomebar_widget).val();
267				data["contact_email"] = jQuery('#contact-lead-email-'+welcomebar_widget).val();
268				data["contact_phone"] = jQuery('#contact-lead-phone-'+welcomebar_widget).val();
269				data["contact_page_link"] = jQuery('#contact-lead-pagelink-'+welcomebar_widget).val();
270				
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				var trigger_sec = 2000;
277				jQuery.ajax({
278					url: welcomebar_frontjs.ajaxurl,
279					type:'post',
280					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,
281					success: function( data ){					
282						$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");
283					},
284				});
285			}else{
286				$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
287				return false;
288			}
289
290			
291		}else{
292			localStorage.removeItem('welcomebar_close_' + welcomebar_widget);
293			sessionStorage.removeItem('welcomebar_close_' + welcomebar_widget);
294			
295			if($(".input-error").length){
296				$(".input-error").remove();
297			}
298
299			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() == '' ){
300
301				$( '<div class="input-error"><span>Please enter your name and email</span></div>' ).insertAfter( jQuery('#contact-lead-name-'+welcomebar_widget) );
302				flag=false;
303
304			}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() == '' ){
305
306				$( '<div class="input-error"><span>Please enter your name and phone</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() == '' ){
310
311				$( '<div class="input-error"><span>Please enter your name</span></div>' ).insertAfter( jQuery('#contact-lead-name-'+welcomebar_widget) );
312				flag=false;
313
314			}else if( jQuery('#contact-lead-email-'+welcomebar_widget).css("display") != 'none' &&  jQuery('#contact-lead-email-'+welcomebar_widget).val() == '' ){
315
316				$( '<div class="input-error"><span>Please, enter your email</span></div>' ).insertAfter( jQuery('#contact-lead-email-'+welcomebar_widget) );
317				flag=false;
318
319			}else if( jQuery('#contact-lead-phone-'+welcomebar_widget).css("display") != 'none' && jQuery('#contact-lead-phone-'+welcomebar_widget).val() == '' ){
320
321				$( '<div class="input-error"><span>Please, enter your phone</span></div>' ).insertAfter( jQuery('#contact-lead-phone-'+welcomebar_widget) );
322				flag=false;
323
324			}
325
326			if(flag==false){
327				
328				$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","10px");
329			} else{
330				$(".mysticky-welcomebar-widget-"+welcomebar_widget+" .mysticky-welcomebar-fixed-wrap").css("margin-bottom","0");
331			}
332			return false;
333		}
334	}else{
335		if( $(this).hasClass("mysticky-welcomebar-close") ){
336			localStorage.setItem('is_close_trigger_' + welcomebar_widget, 'yes');
337		}
338	}
339	
340		setTimeout(function(){
341			if( welcombar_aftersubmission != 'show_welcomebar_every_page' ){
342				if( welcombar_aftersubmission == 'dont_show_welcomebar' ){
343					sessionStorage.removeItem('welcomebar_close');
344					localStorage.setItem('welcomebar_close', 'close');
345				} else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) {
346					localStorage.removeItem('welcomebar_close');
347					sessionStorage.setItem('welcomebar_close', 'close');
348				}
349			}
350			var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position');
351			var welcombar_height = $( '.mysticky-welcomebar-fixed' ).outerHeight();
352			jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-notapper' );
353			jQuery( 'body' ).removeClass( 'mysticky-welcomebar-apper' );
354			jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' );
355			if ( welcombar_position == 'top' ) {
356				jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' );
357			} else {
358				jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' );
359			}
360			jQuery( '#mysticky_divi_style' ).remove();
361			jQuery( '.et_fixed_nav #top-header' ).css( 'top', '' );
362			jQuery( 'html' ).css( 'margin-top', '' );
363			jQuery( 'html' ).css( 'margin-bottom', '' );
364			$( '#mysticky-nav' ).css( 'top', '0px' );
365			/*if mystickyelements show*/
366			var mystickyelements_show = $( '.mystickyelements-fixed' ).length;
367			if( mystickyelements_show && $( window ).width() <= 1024 && $( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) && welcombar_position == 'top' ) {
368				var mystickyelements_height = $( '.mystickyelements-fixed' ).height();
369				$( '.mystickyelements-fixed' ).css( 'top', '' );
370				$( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_height + 'px !important' );
371			}
372		}, trigger_sec );
373	} );
374});
375function mystickyelements_present() {
376	var after_trigger 		  = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger');
377	var mystickyelements_show = jQuery( '.mystickyelements-fixed' ).length;		
378	var welcombar_position 			  = jQuery( '.mysticky-welcomebar-fixed' ).data('position');
379	var adminBarHeight = 0;
380	if ( jQuery("#wpadminbar").length != 0 ){
381		var adminBarHeight = jQuery('#wpadminbar').height();
382	}
383	
384	if ( jQuery( window ).width() <= 600 && jQuery(window).scrollTop() != 0 && welcombar_position == 'top') {
385		jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0px' );
386		var welcombar_height = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
387		
388		if (jQuery( '.mysticky-welcomebar-fixed' ).css('display') === 'none') {
389			welcombar_height= 0;
390		}			
391		jQuery( '#mysticky-nav' ).css( 'top', welcombar_height + 'px' );
392		
393	} else if ( welcombar_position == 'top' ) {
394		var mysticky_welcomebar_height = adminBarHeight + jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
395		if (jQuery( '.mysticky-welcomebar-fixed' ).css('display') === 'none') {
396			mysticky_welcomebar_height= adminBarHeight + 0;
397		}	
398		jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', ( adminBarHeight + 0) + 'px' );			
399		jQuery( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' );
400	}
401	if( mystickyelements_show ) {
402		
403		var welcombar_height 			  = jQuery( '.mysticky-welcomebar-fixed' ).outerHeight();
404		var mystickyelements_height 	  = jQuery( '.mystickyelements-fixed' ).height();
405		var mystickyelements_total_height = welcombar_height + mystickyelements_height;
406		if ( jQuery( window ).width() <= 1024 && jQuery( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) ) {
407			if ( after_trigger == 'after_a_few_seconds' ) {
408				if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
409					var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000;
410					setTimeout(function(){
411						if ( welcombar_position == 'top' ) {
412							jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
413							jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
414						} else {
415							jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
416							jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
417						}
418					}, trigger_sec );
419				}
420			} else if ( after_trigger === 'after_scroll' ) {
421				var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height());
422				var after_scroll_val = $( '.mysticky-welcomebar-fixed' ).data('triger-sec');
423				if( scroll > after_scroll_val ) {
424					if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) {
425						if ( welcombar_position == 'top' ) {
426							jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height );
427							jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' );
428						} else {
429							jQuery( '.mystickyelements-fixed' ).css( 'top', '' );
430							jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' );
431						}
432					}
433				}
434			}
435		}
436	}
437}
438jQuery(".mysticky-welcomebar-fixed").on(
439	"animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd",
440	function() {
441		jQuery(this).removeClass("animation-start");
442	}
443);
444jQuery(document).ready(function() { 
445	var container = jQuery(".mysticky-welcomebar-fixed");
446	var refreshId = setInterval(function() {
447		container.addClass("animation-start");
448	}, 3500);
449});
450
451function IsEmail(email) {
452	var regex =
453/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
454	if (!regex.test(email)) {
455		return false;
456	}
457	else {
458		return true;
459	}
460}
461
462function validatePhone(txtPhone) {
463	var a = txtPhone;
464	var filter = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/;
465	if (filter.test(a)) {
466		return true;
467	}
468	else {
469		return false;
470	}
471}

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.