PageSourceSearch

https://bison-polymers.com/wp-content/plugins/divi-toolbox/assets/js/toolbox-scripts.js?ver=1.7.4

js bison-polymers.com collected 2026-10-07 21:52:36 UTC 32,950 bytes, 886 lines download raw bytes

1if (toolbox_values.dtb_vb_enabled !== '1' || (toolbox_values.dtb_vb_enabled === '1' && self == top)) {
2
3
4	jQuery(document).ready(function ($) {
5		
6		function dtb_equalize_heights(selector) {
7			var heights = new Array();
8			$(selector).each(function() {
9				$(this).css('min-height', '0');
10				$(this).css('max-height', 'none');
11				$(this).css('height', 'auto');
12				 heights.push($(this).height());
13			});
14			var max = Math.max.apply( Math, heights );
15			$(selector).each(function() {
16				$(this).css('height', max + 'px');
17			});
18		}
19		function dtb_equalize_heights_min(selector) {
20			var heights = new Array();
21			$(selector).each(function() {
22				$(this).css('min-height', '0');
23				$(this).css('max-height', 'none');
24				$(this).css('height', 'auto');
25				 heights.push($(this).height());
26			});
27			var min = Math.min.apply( Math, heights );
28			$(selector).each(function() {
29				$(this).css('height', min + 'px');
30			});
31		}
32		function dtb_equalize() {
33			var iv = null;
34			if(iv !== null) {window.clearTimeout(iv);}
35			iv = setTimeout(function() {
36				if ((toolbox_values.dtb_archive_styles === '1') || ((toolbox_values.dtb_blog_layout !== 'blog_default') && (toolbox_values.dtb_blog_layout !== ''))) {
37				
38					if (toolbox_values.dtb_equal_archive_boxed === '1') {
39						dtb_equalize_heights('.dtb_archives:not(.et-tb-has-body) .et_pb_post .dtb-post-wrap, .dtb-blog.et_pb_module .et_pb_post .dtb-post-wrap');
40					}
41					if (toolbox_values.dtb_equal_archive_img === '1') {
42						dtb_equalize_heights_min('.dtb_archives:not(.et-tb-has-body) .entry-featured-image-url, .dtb-blog.et_pb_module .entry-featured-image-url');
43					}
44				}
45				
46				if (toolbox_values.dtb_enable_equal_height === '1') {
47				
48					var windowsize = $(window).width();
49					if (windowsize > toolbox_values.dtb_equal_height_breakpoint) {
50					
51						$('.dtb-equal-height').each(function() {
52							if (toolbox_values.dtb_equal_height_quote === '1') {
53								var quote_in_row = $('.et_pb_testimonial_description', this);
54								dtb_equalize_heights(quote_in_row);
55							}
56							
57							if (toolbox_values.dtb_equal_height_pricing === '1') {
58								var pricing_in_row = $('.et_pb_pricing_content', this);
59								dtb_equalize_heights(pricing_in_row);
60							}
61							
62							if (toolbox_values.dtb_equal_height_blurb === '1') {
63								var blurbs_in_row = $('.et_pb_blurb_content', this);
64								dtb_equalize_heights(blurbs_in_row);
65							}
66						});
67					}
68				}
69				
70			}, 120);
71		}
72		
73		
74		function dtb_Ajax_Fn1() {
75			if (toolbox_values.dtb_readmore_text_enable === '1') {
76				$('.more-link').text(toolbox_values.dtb_readmore_text);
77			}
78			if (toolbox_values.dtb_comments_styles === '1') {
79				$('#respond #reply-title>span').text(toolbox_values.dtb_comments_text);
80			}
81			
82			$('#dtb-before-footer').detach().insertBefore('#main-footer, .et-l--footer');
83			$('#dtb-after-footer').detach().insertAfter('#main-footer, .et-l--footer');
84			$('#dtb-after-blog-content').detach().insertBefore('#comment-wrap');
85			
86			
87			if( $( '.et_social_inline_bottom' ).length ) {
88				if ( $( 'body' ).hasClass( 'et_pb_pagebuilder_layout' ) ) {
89					var social_monarch = $('.et_social_inline_bottom').closest('.et_pb_row');
90					$( '.entry-content .et_pb_section' ).not( '.et_pb_fullwidth_section' ).last().append( social_monarch );
91				}
92			}
93		}
94		
95		function dtb_FixedBeforeHeader() {	
96			if ( $('body:not(.et-fb) #dtb-before-header').length > 0 ) {
97				$('body').addClass('has-dtb-before-header');
98				var dtbBeforeHeader = $('body:not(.et-fb) #dtb-before-header');
99				if ($('#wpadminbar').length > 0) {
100				  var dtbBeforeHeaderOffset = $('#wpadminbar').height();
101				}
102				else {
103					var dtbBeforeHeaderOffset = 0;
104				}
105				dtbBeforeHeaderHeight = dtbBeforeHeader.height();
106				dtbMenuTransformValue = 'translateY(' + dtbBeforeHeaderHeight + 'px)';
107				dtbBeforeHeader.detach().prependTo('#page-container').each(function() {
108					var dtb_before_header_container = $(this);
109					if (dtb_before_header_container.children('#et-boc').length === 0) {
110						dtb_before_header_container.children('div').wrap('<div id="et-boc"></div>');
111					}
112				});
113				if ( $('body').hasClass('et_fixed_nav')) {
114					dtbBeforeHeader.css({
115					   'position' : 'fixed',
116					   'top' : dtbBeforeHeaderOffset,
117					   'width' : '100%',
118					   'z-index' : '100001'
119					});
120					$('body:not(.et-fb)').css({'padding-top' : dtbBeforeHeaderHeight});
121					$('#main-header').css({
122					   'transform' : dtbMenuTransformValue
123					});
124					if ( $('#top-header').length > 0 ) {
125						$('#top-header').css({
126						   'transform' : dtbMenuTransformValue,
127							'top' : dtbBeforeHeaderOffset+'!important'
128						});
129					}
130				}
131				
132				if ( $('body:not(.et-fb) .dtb-fixed-always').length > 0 ) {
133					dtbBeforeHeader.css({
134					   'position' : 'fixed',
135					   'top' : dtbBeforeHeaderOffset,
136					   'width' : '100%',
137					   'z-index' : '2'
138					});
139					$('#main-header').css({
140					   'transform' : dtbMenuTransformValue
141					});
142					$('.dtb-fixed-always').css({
143					   'transform' : dtbMenuTransformValue
144					});
145					$('body:not(.et-fb)').css({'padding-top' : dtbBeforeHeaderHeight});
146				}
147				var windowsize = $(window).width();
148				if (windowsize < toolbox_values.dtb_mobile_breakpoint && toolbox_values.dtb_m_m_fixed !== '1') {
149					dtbBeforeHeader.css({
150					   'position' : 'absolute'
151					});
152				
153				}
154				
155			}
156			
157			if (toolbox_values.dtb_move_page_below_header === '1') {
158					if ( $('#dtb-before-header').length > 0 ) {
159						var FixedHeaderHeight = $('.et_pb_section.dtb-fixed-always').outerHeight() + $('#dtb-before-header').outerHeight();
160					} else {
161						var FixedHeaderHeight = $('.et_pb_section.dtb-fixed-always').outerHeight();
162					}
163					dtbBodyTransformValue = 'translateY(' + FixedHeaderHeight + 'px)';
164					$('#main-header').css({
165					   'transform' : dtbBodyTransformValue
166					});
167					$('body:not(.et-fb)').css({'padding-top' : FixedHeaderHeight});
168			}
169		}
170	
171	   $(document).ajaxComplete(function() {
172		   dtb_equalize();
173		   dtb_Ajax_Fn1();
174	   });
175		$(window).resize(function() {
176			dtb_equalize()
177			dtb_FixedBeforeHeader()
178		});
179	   dtb_Ajax_Fn1();
180		dtb_equalize();
181		dtb_FixedBeforeHeader()
182		
183		
184		if ((toolbox_values.dtb_btt === '1') && (toolbox_values.dtb_btt_link === '1')) {
185			$('.et_pb_scroll_top').append('<a class="btt_link"></a>');
186			$('.et_pb_scroll_top').off('click');
187			$('.btt_link').attr('href', toolbox_values.dtb_btt_url);
188		}
189
190		if (toolbox_values.dtb_fixed_scroll === '1') {
191			$(window).scroll(function(){
192				if ($(window).scrollTop() >= toolbox_values.dtb_fixed_scroll_offset) {
193					$('body').addClass('scrolled-down');
194				}
195				 else {
196					 $('body').removeClass('scrolled-down');
197			   }
198			});
199		}
200		
201		if (toolbox_values.dtb_enable_sticky === '1') {
202			$('.dtb-sticky').each(function() {
203				var sticky_parent = $(this).parentsUntil('.et_pb_section');
204				$(sticky_parent).css('overflow','initial');
205			});
206		}
207		
208		
209		if ((toolbox_values.dtb_archive_styles === '1') || ((toolbox_values.dtb_blog_layout !== 'blog_default') && (toolbox_values.dtb_blog_layout !== ''))) {
210			$('.dtb_archives:not(.et-tb-has-body) .et_pb_post').contents().filter(function () { return this.nodeType === 3 && $.trim(this.nodeValue).length; }).wrap('<p class="dtb-post-content">');
211			$('.dtb_archives:not(.et-tb-has-body) .et_pb_post').each(function () {
212				if ($('.dtb-post-wrap', this).length < 1) {
213					$('>:not(.entry-featured-image-url)', this).not('.et_pb_gallery_post_type,.et_main_video_container,.et_audio_content').wrapAll('<div class="dtb-post-wrap"></div>');
214				}
215				if ($('.more-link', this).length < 1) {
216					if ((toolbox_values.dtb_archive_button !== '') && (toolbox_values.dtb_archive_styles !== '')) {
217						link_target = $(this).find('a').attr('href');
218						$('.dtb-post-wrap', this).append("<a class='dtb-read-more " + toolbox_values.dtb_archive_bt
218n_hover + "' href='" + link_target + "'>" + toolbox_values.dtb_readmore_text + "</a>");
219					}
220				}
221			});
222		}
223
224		if (toolbox_values.dtb_sticky_footer === '1') {
225			function positionFooter() {
226				if ($('body:not(.et-fb) #main-footer').length > 0) {
227				  var mFoo = $("body:not(.et-fb) #main-footer");
228				}
229				else if ($('body:not(.et-fb) .et-l--footer').length > 0){
230					var mFoo = $("body:not(.et-fb) .et-l--footer");
231				}
232				if ($('body:not(.et-fb) #dtb-before-footer').length > 0) {
233					var bFoo = $("body:not(.et-fb) #dtb-before-footer");
234				}
235				if ($('body:not(.et-fb) #dtb-after-footer').length > 0) {
236					var aFoo = $("body:not(.et-fb) #dtb-after-footer");
237				}
238				
239				var bodyHeight = $(document.body).height();
240				if ($('.dtb-body-wrapper').length > 0) {
241				  var bodyHeight = $('.dtb-body-wrapper').height();
242				}
243				if (typeof mFoo !== 'undefined') {
244					var mFooHeight = mFoo.outerHeight()
245				}
246				else {
247					var mFooHeight = 0;
248				}
249				if (typeof bFoo !== 'undefined') {
250					var bFooHeight = bFoo.outerHeight()
251				}
252				else {
253					var bFooHeight = 0;
254				}
255				if (typeof aFoo !== 'undefined') {
256					var aFooHeight = aFoo.outerHeight()
257				}
258				else {
259					var aFooHeight = 0;
260				}
261				
262				
263				var contentHeight = bodyHeight+bFooHeight+aFooHeight+mFooHeight;
264				
265				if ((contentHeight < $(window).height() && mFoo.css("position") === "fixed") || (bodyHeight < $(window).height() && mFoo.css("position") !== "fixed")) {
266					if  ( (typeof aFoo !== 'undefined') && (aFoo.outerHeight() > 0) ) {
267					mFoo.css({
268						position: "fixed",
269						bottom: aFoo.outerHeight() + "px",
270						right: "0",
271						left: "0"
272					});
273					} else {
274					mFoo.css({
275						position: "fixed",
276						bottom: "0",
277						right: "0",
278						left: "0"
279					});
280					}
281					if (typeof bFoo !== 'undefined') {
282						bFoo.css({
283							position: "fixed",
284							bottom: mFoo.outerHeight() + aFoo.outerHeight() + "px",
285							right: "0",
286							left: "0"
287						});
288					}
289					if (typeof aFoo !== 'undefined') {
290						aFoo.css({
291							position: "fixed",
292							bottom: "0",
293							right: "0",
294							left: "0"
295						});
296					}
297				}
298				else {
299					mFoo.css({
300						position: "",
301						bottom: "",
302						right: "",
303						left: ""
304					});
305					
306					if (typeof bFoo !== 'undefined') {
307						bFoo.css({
308							position: "",
309							bottom: "",
310							right: "",
311							left: ""
312						});
313					}
314					
315					if (typeof aFoo !== 'undefined') {
316						aFoo.css({
317							position: "",
318							bottom: "",
319							right: "",
320							left: ""
321						});
322					}
323				}
324			}
325			$(document).ready(function () {
326				positionFooter();
327				$(window).scroll(positionFooter);
328				$(window).resize(positionFooter);
329			});
330		}
331		if (toolbox_values.dtb_enable_typing === '1') {
332			var count = 0;
333			$('.et_pb_text.dtb-typing .et_pb_text_inner').each(function () {
334				$(this).wrap("<div class='count-" + count + "'>");
335				$(this).after("<span class='dtb-typed-" + count + "'>");
336				count++;
337			});
338		}
339		
340		
341		if (toolbox_values.dtb_mobile_parallax === '1') {
342			$dtb_is_mobile = null !== (navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/))
343			if ($dtb_is_mobile) {
344				in_viewport = function(elem) {
345					elementTop = elem.offset().top, elementBottom = elementTop + elem.outerHeight(), viewportTop = $(window).scrollTop(), viewportBottom = viewportTop + $(window).height();
346					return elementBottom > viewportTop && elementTop < viewportBottom;
347				};
348				function mobileParallax() {
349					$(".dtb-mobile-parallax .et_parallax_bg").each(function() {
350						var $dtb_parent = $(this).parent();
351						var $dtb_visible = in_viewport($dtb_parent);
352						if ($dtb_visible) {
353							element_top = $dtb_parent.offset().top,
354							parallaxHeight = $(this).parent(".et_pb_fullscreen").length && $(window).height() > $dtb_parent.innerHeight() ? $(window).height() : $dtb_parent.innerHeight(),
355							bg_height = .2 * $(window).height() + parallaxHeight,
356							main_position = "translate(0, " + .2 * ($(window).scrollTop() + $(window).height() - element_top) + "px)";
357							$(this).css({height: bg_height,"-webkit-transform": main_position,"-moz-transform": main_position,"-ms-transform": main_position,transform: main_position});
358							
359						}
360					});
361				}
362				
363				$(document).ready(function () {
364					mobileParallax();
365					$(window).scroll(mobileParallax);
366				});
367			}
368		}
369		
370		
371
372
373		
374
375		if (toolbox_values.dtb_social_target === '1') {
376			$('.et-social-icon a').attr('target', '_blank');
377		}
378
379
380		if ((toolbox_values.dtb_social_move === '1') && (toolbox_values.dtb_social_enable === '1')) {
381			$('#top-header .et-social-icons').detach();
382		}
383		
384		
385
386
387		if (toolbox_values.dtb_social_enable === '1') {
388			$('#top-header .et-social-icons a, #main-header .et-social-icons a').addClass(toolbox_values.social_head_hover);
389			$('#footer-bottom .et-social-icons a').addClass(toolbox_values.social_foot_hover);
390		}
391
392
393
394		$('#footer-bottom .et-social-icons a').width($('#footer-bottom .et-social-icons a').height());
395		$(window).on('resize', function () {
396			$('#footer-bottom .et-social-icons a').width($('#footer-bottom .et-social-icons a').height());
397		});
398
399
400		
401
402		if ((toolbox_values.dtb_fixed_logo === '1') && (toolbox_values.dtb_fixed_logo_url !== '')) {
403			var oldURL = $('#logo').attr('src');
404			function checkScroll() {
405				var scrollPosition = $(window).scrollTop();
406				if ( ($('#main-header').hasClass('et-fixed-header')) || (scrollPosition > 5)) {
407					$('#logo').attr('src', toolbox_values.dtb_fixed_logo_url);
408				}
409				else {
410					$('#logo').attr('src', oldURL);
411				}
412				$(window).on('scroll', function () {
413					var scrollPosition = $(window).scrollTop();
414					if ( ($('#main-header').hasClass('et-fixed-header')) && (scrollPosition > 5)) {
415						$('#logo').attr('src', toolbox_values.dtb_fixed_logo_url);
416					}
417					else {
418						$('#logo').attr('src', oldURL);
419					}
420				});
421			}
422			checkScroll();
423			$(window).resize(checkScroll);
424			
425		}
426
427		if ((toolbox_values.dtb_mobile_logo === '1') && (toolbox_values.dtb_mobile_logo_url !== '')) {
428			var desktopURL = $('#logo').attr('src');
429			function checkWidth() {
430				var windowsize = $(window).width();
431
432				if (windowsize < toolbox_values.dtb_mobile_breakpoint) {
433					$('#logo').attr('src', toolbox_values.dtb_mobile_logo_url);
434				}
435				
436				else {
437					if (toolbox_values.dtb_fixed_logo !== '1') {
438						$('#logo').attr('src', desktopURL);
439					}
440				}
441				$(window).on('scroll', function () {
442					var windowsize = $(window).width();
443					if (windowsize < toolbox_values.dtb_mobile_breakpoint) {
444						$('#logo').attr('src', toolbox_values.dtb_mobile_logo_url);
445					}
446				});
447			}
448			checkWidth();
449			$(window).resize(checkWidth);
450		}
451
452		
453
454		if (toolbox_values.dtb_comments_styles === '1') {
455			$('#respond #submit, .comment-reply-link, #respond #et_pb_submit').addClass(toolbox_values.dtb_comments_btn_hover);
456		}
457
458		$('.et_pb_button').addClass(toolbox_values.dtb_buttons_hover);
459		$('.' + toolbox_values.dtb_sec_btn_class).removeClass(toolbox_values.dtb_buttons_hover).addClass(toolbox_values.dtb_sec_btn_hover);
460
461
462		
463
464		function dtb_header_menu_split() {
465			var $logo_container = $('#main-header > .container > .logo_container'),
466
467				$et_top_navigation = $('#et-top-navigation'),
468				$logo_container_splitted = $('.centered-inline-logo-wrap > .logo_container'),
469				et_top_navigation_li_size = $et_top_navigation.children('nav').children('ul').children('li').length,
470				et_top_navigation_li_break_index = Math.round(et_top_navigation_li_size / 2) - 1,
471				window_width = window.innerWidth;
472
473			if (window_width > toolbox_values.dtb_mobile_breakpoint && $logo_container.length && $('body').hasClass('et_header_style_split')) {
474				$('<li class="centered-inline-logo-wrap"></li>').insertAfter($et_top_navigation.find('nav > ul >li:nth(' + et_top_navigation_li_break_index + ')'));
475				$logo_container.appendTo($et_top_navigation.find('.centered-inline-logo-wrap'));
476			}
477
478			if (window_width <= toolbox_values.dtb_mobile_breakpoint && $logo_container_splitted.length) {
479				$logo_container_splitted.prependTo('#main-header > .container');
480				$('#main-header .centered-inline-logo-wrap').remove();
481			}
482		}
483
484		dtb_header_menu_split();
485		$(window).resize(function () {
486			dtb_header_menu_split();
487		});
488
489		var $slide_menu_container = $('.et_header_style_slide .et_slide_in_menu_container');
490		if ($slide_menu_container.length && !$('body').hasClass('et_pb_slide_menu_active')) {
491			$slide_menu_container.css({ right: '-' + parseInt($slide_menu_container.innerWidth()) + 'px', 'display': 'none' });
492		}
493
494		
495
496		if (toolbox_values.dtb_post_author !== '') {
497			$('.dtb-author-box').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content');
498		}
499		if (toolbox_values.dtb_post_prev_next !== '') {
500			$('.dtb-single-post-nav').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content');;
501		}
502		if (toolbox_values.dtb_post_related !== '') {
503			$('.dtb-related-posts').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content');
504		}
505
506		if (toolbox_values.dtb_single_after_content_layout !== '') {
507			$('.dtb-after-single-post').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content');
508		}
509
510		if (toolbox_values.dtb_hide_post_title !== '') {
511			$('.single-post .et_post_meta_wrapper h1.entry-title').detach();
512		}
513
514		if (toolbox_values.dtb_footer_reveal !== '') {
515			function dtb_footer_height() {
516				if ( $( "#main-footer" ).length ) {
517					var footer_height = $('#main-footer').height();
518				}
519				else {
520					var footer_height = $('.et-l--footer').height();
521				}
522				$('#page-container').css('margin-bottom', footer_height);
523			}
524			function dtb_remove_footer_height() {
525				$('#page-container').css('margin-bottom', '0');
526			}
527			function dtb_footer_reveal_mobile_conditional() {
528				if ($(window).width() > 980) {
529					dtb_footer_height();
530				} else {
531					dtb_remove_footer_height();
532				}
533			}
534			if (toolbox_values.dtb_footer_reveal_mobile_off !== '') {
535				dtb_footer_reveal_mobile_conditional()
536				$(window).resize(function () {
537					dtb_footer_reveal_mobile_conditional()
538				});
539			}
540			else {
541				dtb_footer_height();
542				$(window).resize(function () {
543					dtb_footer_height();
544				});
545			}
546		}
547
548		if (toolbox_values.dtb_testimonial_photo !== '') {
549			$('.et_pb_testimonial').each(function () {
550				$('.et_pb_testimonial_portrait', this).detach().insertBefore($(this).find('.et_pb_testimonial_author'));
551				$('.et_pb_testimonial_portrait, .et_pb_testimonial_author, .et_pb_testimonial_meta', this).wrapAll('<div class="clearfix"></div>');
552			});
553		}
554
555	});
556
557	jQuery(window).on("load", function($){
558		var mbwidth = parseInt(toolbox_values.dtb_mobile_breakpoint);
559		if ((jQuery(window).width() <= mbwidth) && jQuery('body').hasClass('dtb_mobile_slide')) {
560			jQuery('#main-header .mobile_menu_bar, .dtb-fixed-always .mobile_menu_bar').click(function () {
561				jQuery('body').toggleClass('noscroll');
562			});
563			jQuery('.mobile_menu_bar').click(function () {
564				jQuery('#mobile_menu, .dtb-fixed-always .et_mobile_menu').css('min-height', (jQuery(window).height()) + 'px');
565				jQuery('#mobile_menu, .dtb-fixed-always .et_mobile_menu').css('max-height', '100vh');
566			});
567		}
568	});
569
570
571	if (toolbox_values.dtb_follow_the_mouse === '1') {
572
573		/*jQuery directional hover */
574		!function (t) { t.fn.directionalHover = function (e) { var n = t.extend({}, t.fn.directionalHover.defaults, e), o = function (t, e, n, o, f, a, r, s) { var u = 0; o - s <= a / 2 && (u ^= 1), n - r >= f / 2 && (u ^= 2), o - s > a / 2 && (u ^= 4), n - r < f / 2 && (u ^= 8), i(u, t, e, n - r, o - s, f / 2, a / 2) }, i = function (t, e, n, o, i, u, l) { f(t, 9) ? a(o, i, u, l) ? s(e, n, 0, 2 * -u) : s(e, n, 2 * -l, 0) : f(t, 3) ? r(o, i, u, l) ? s(e, n, 2 * -l, 0) : s(e, n, 0, 2 * u) : f(t, 12) ? r(o, i, u, l) ? s(e, n, 0, 2 * -u) : s(e, n, 2 * l, 0) : f(t, 6) && (a(o, i, u, l) ? s(e, n, 2 * l, 0) : s(e, n, 0, 2 * u)) }, f = function (t, e) { return (t & e) === e }, a = function (t, e, n, o) { return o * t - n * e < 0 }, r = function (t, e, n, o) { return n * (e - o) + o * t - n * o < 0 }, s = function (t, e, o, i) { "in" === e ? t.animate({ top: o, left: i }, 0, function () { t.stop().animate({ top: 0, left: 0 }, n.speed, n.easing) }) : "out" === e && t.animate({ top: 0, left: 0 }, 0, function () { t.stop().animate({ top: o, left: i }, n.speed, n.easing) }) }; return this.css({ position: "relative", overflow: "hidden" }), this.find(n.overlay).css({ position: "absolute", top: "-100%" }), this.each(function () { var e = t(this);
574 e.hover(function (t) { o(e.find(n.overlay), "in", t.pageX, t.pageY, e.width(), e.height(), Math.floor(e.offset().left), e.offset().top) }, function (t) { o(e.find(n.overlay), "out", t.pageX, t.pageY, e.width(), e.height(), Math.floor(e.offset().left), e.offset().top) }) }) }, t.fn.directionalHover.defaults = { overlay: ".et_overlay", easing: "swing", speed: 400 } }(jQuery);
575
576
577		(function ($) {
578			var triggerClassChange = $.fn.addClass;
579			$.fn.addClass = function () {
580				$(this).trigger('classChanged');
581				return triggerClassChange.apply(this, arguments);
582			}
583		})(jQuery);
584		jQuery(document).ready(function ($) {
585
586			$('.et_pb_portfolio .et_pb_portfolio_item, .et_pb_fullwidth_portfolio .et_pb_portfolio_item, .et_pb_gallery .et_pb_gallery_item').directionalHover();
587			$('div.et_pb_portfolio').find('li.et_pb_portfolio_filter a').on('classChanged', function () {
588				setTimeout(function () {
589					$('.et_pb_portfolio .et_pb_portfolio_item').directionalHover();
590				});
591			});
592
593			$('div.et_pb_portfolio').on('classChanged', 'li.page a', function () {
594				setTimeout(function () {
595					$('.et_pb_portfolio .et_pb_portfolio_item').directionalHover();
596				});
597			});
598		});
599	}
600
601
602	if (toolbox_values.dtb_mobile_nested === '1') {
603		(function ($) {
604			function dtb_setup_submenus() {
605				$("<a class='sub-menu-toggle' href='#'></a>").insertBefore(".et_mobile_menu .menu-item-has-children > a, #dtb-m-menu .menu-item-has-children > a");
606				
607				$(".sub-menu-toggle").click(function (e) {
608					e.preventDefault();
609					$(this).toggleClass("popped");
610				});
611			}
612			$(document).ready(function() {
613				dtb_setup_submenus();
614				var parent_links = $(".et_mobile_menu .menu-item-has-children > a:not(.sub-menu-toggle), #dtb-m-menu .menu-item-has-children > a:not(.sub-menu-toggle)");
615				var toggles = $(".sub-menu-toggle");
616				parent_links.off();
617				parent_links.each(function (i) {
618					if ($(this).attr("href") === '#') {
619						$(this).click(function () {
620							toggles[i].click(function () {
621								$(this).toggleClass('popped');
622							});
623						});
624					}
625				});
626			});
627		})(jQuery);
628	}
629}
630
631jQuery(document).ready(function($) {
632	function dtb_Ajax_Fn2() {
633		if ((toolbox_values.dtb_blog_layout !== 'blog_default') && (toolbox_values.dtb_blog_layout !== '')) {
634			$('.dtb-blog.et_pb_module .et_pb_post').each(function () {
635				if ($('.dtb-post-wrap', this).length < 1) {
636					$('>:not(.entry-featured-image-url)', this).not('.et_pb_gallery_post_type,.et_main_video_container,.et_audio_content').wrapAll('<div class="dtb-post-wrap"></div>');
637				}
638				$('.more-link', this).addClass(toolbox_values.dtb_archive_btn_hover);
639			});
640		}
641		
642		if (toolbox_values.dtb_post_meta === '1') {
643			$(".dtb-blog.et_pb_module .post-meta, .archive #left-area .et_pb_post .post-meta, .blog #left-area .et_pb_post .post-meta, .search #left-area .et_pb_post .post-meta, .single-post #left-area .et_pb_post .post-meta, .dtb-blog.et_pb_module .et_pb_title_meta_container").html(function () {
644				return $(this).html().replace(/\|/g, '').replace('by', '').replace('por', '').replace('...', '').replace(/,/g, '');
645			});
646			$('.dtb-blog.et_pb_module .post-meta').contents().each(function() {
647				if (this.nodeType == 3 && $.trim(this.nodeValue) != '') {
648				   $(this).wrap('<span class="comments-wrapper"></span>');
649				}
650			});
651		}
652	
653		if (toolbox_values.dtb_sidebar_search !== '') {
654			$('.et_pb_widget_area #searchsubmit, #sidebar #searchsubmit, .dtb-sidebar #searchsubmit').before('<span class="icon"></span>');
655		}
656		
657		$('#top-menu-nav #top-menu li a, .dtb-menu ul.et-menu li a, #et-secondary-nav li.cta-link a').each(function () {
658			if ($('>span', this).length < 1) {
659				$(this).wrapInner('<span></span>');
660			}
661		});
662		
663		if (toolbox_values.dtb_cta_link === '1') {
664			if (toolbox_values.dtb_cta_link_type === 'first_item') {
665				$('#top-menu>li:first-child, #mobile_menu>li:first-child, .dtb-menu .et-menu>li:first-child, .dtb-menu .et_mobile_menu>li:first-child').addClass('cta-item');
666			}
667			if (toolbox_values.dtb_cta_link_type === 'last_item') {
668				$('#top-menu>li:last-child, #mobile_menu>li:last-child, .dtb-menu .et-menu>li:last-child, .dtb-menu .et_mobile_menu>li:last-child').addClass('cta-item');
669			}
670			if (toolbox_values.dtb_cta_link_type === 'custom_class') {
671				$('#top-menu>li.cta-link, #mobile_menu>li.cta-link, .dtb-menu .et-menu>li.cta-link, .dtb-menu .et_mobile_menu>li.cta-link, #et-secondary-nav>li.cta-link').addClass('cta-item');
672			}
673			$('#top-menu>li.cta-item>a,.dtb-menu .et-menu>li.cta-item>a, #et-secondary-nav>li.cta-item>a').addClass(toolbox_values.cta_hover_style);
674		}
675		
676		
677		if ((toolbox_values.dtb_social_mobile_add === '1') && (toolbox_values.dtb_social_enable === '1')) {
678			$('body>.et-social-icons').detach().appendTo('[id^="mobile_menu"], .dtb-menu .et_mobile_menu');
679		}
680	}
681
682   $(document).ajaxComplete(function() {
683	   dtb_Ajax_Fn2();
684   });
685   dtb_Ajax_Fn2();
686   
687   
688	if ($('.custom_hamburger_icon').length > 0) {
689		var iconName = 'hamburger_menu_icon',
690			toggledName = iconName + '-toggled';
691		$('.mobile_menu_bar').addClass(iconName).html('<div class="dtb-hamburger"><div class="dtb-hamburger-box"><div class="dtb-hamburger-inner"></div></div></div>');
692		  
693		$('.' + iconName).on('click', function (e) {
694			e.preventDefault();
695			$(this).toggleClass(toggledName);
696			$('.et_slide_in_menu_container .mobile_menu_bar').toggleClass(toggledName);
697		});	
698		
699		$('.et_slide_in_menu_container .mobile_menu_bar').click(function(){
700			$('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled');
701		});
702	}
703		
704});
705
706
707
708
709jQuery(document).ready(function($) {
710	
711	
712	function CustomMobileMenu() {
713
714
715		if ((toolbox_values.dtb_enable_custom_m_menu !== '') && (toolbox_values.dtb_mobile_enable !== '')) {
716			$('#dtb-m-menu').detach().insertAfter('#page-container');
717			//if (toolbox_values.dtb_m_m_hamburger_show !== '') {
718				$('#main-header .mobile_menu_bar_toggle, .et_slide_in_menu_container .mobile_menu_bar, .et_toggle_slide_menu').clone().prependTo('#dtb-m-menu .nav-wrapper');
719			//}
720				
721			if ((toolbox_values.dtb_custom_m_menu === '') && ($('.et_pb_module.dtb-menu').length > 0) ){
722				$('#dtb-m-menu ul.dtb-mobile-menu:first-of-type').detach();
723				//if (toolbox_values.dtb_m_m_hamburger_show !== '') {
724					$('.et_pb_module.dtb-menu .mobile_menu_bar').clone().prependTo('#dtb-m-menu .nav-wrapper');
725				//}
726				$('.et_pb_module.dtb-menu .et_mobile_menu').detach().appendTo('#dtb-m-menu .nav-wrapper').removeClass('et_mobile_menu').addClass('dtb-mobile-menu');
727				
728				
729			}
730			if ((toolbox_values.dtb_custom_m_menu !== '') && ($('.et_pb_module.dtb-menu').length > 0) /*&& (toolbox_values.dtb_m_m_hamburger_show !== '') */){
731				$('.et_pb_module.dtb-menu .mobile_menu_bar').clone().prependTo('#dtb-m-menu .nav-wrapper');
732				
733				
734			}
735			if ((toolbox_values.dtb_m_m_animation_page !== '') && (toolbox_values.dtb_vb_enabled !== '1')) {
736				
737				$('#page-container, #dtb-m-menu').wrapAll('<div class="dtb-body-wrapper"/>');
738				$('#page-container').wrap('<div class="dtb-page-container noanimation"/>');
739				var dtbMenuHeight = $('#dtb-m-menu').height();
740				var dtbAdminBar = $('#wpadminbar').height();
741				var dtbMenuOffset = -1*(dtbMenuHeight-dtbAdminBar);
742				var dtbMenucontainer = $('#dtb-m-menu');
743				var dtbMenuAnimation	= toolbox_values.dtb_m_m_animation_type;
744				if (dtbMenuAnimation === 'move_bottom')  {
745					dtbMenucontainer.css('top', dtbMenuOffset);
746				}
747				if (dtbMenuAnimation === 'move_top')  {
748					dtbMenucontainer.css('bottom', -dtbMenuHeight);
749				}
750				dtbMenucontainer.addClass('dtb-mobile-opacity');
751			}
752			
753			if (toolbox_values.dtb_m_mobile_elements_widgets !== '') {
754				$('#dtb-m-menu .menu-wrapper').attr('id', 'page-container');
755			}
756	
757					
758			$('.mobile_menu_bar_toggle, .et_pb_module.dtb-menu .mobile_menu_bar, #dtb-m-menu .mobile_menu_bar, #dtb-m-menu li.menu-item a[href*="#"]:not([href$="#"]), .et_header_style_fullscreen .mobile_menu_bar, .et_toggle_slide_menu').click(function(){
759				$('#dtb-m-menu .mobile_menu_bar').toggleClass('hamburger_menu_icon-toggled');
760				$('#dtb-m-menu').addClass('dtb-in');
761				$('#dtb-m-menu').toggleClass('dtb-out');
762				$('body').toggleClass('dtb-m-mobile-open stopscroll');
763				$('.dtb-page-container').removeClass('noanimation');
764				if (toolbox_values.dtb_m_m_animation_page !== '') {
765					
766					var dtbMenuAnimation	= toolbox_values.dtb_m_m_animation_type;
767					var dtbMenuOpened = $('body').hasClass('dtb-m-mobile-open');
768					var dtbPagecontainer = $('.dtb-page-container');
769					var dtbMenucontainer = $('#dtb-m-menu');
770					var dtbMenuHeight = $('#dtb-m-menu').height();
771					if ( $('#wpadminbar').length ) {
772						var dtbAdminBar = $('#wpadminbar').height();
773						} else {
774						var dtbAdminBar = 0 };
775					var dtbMenuOffset = dtbMenuHeight-dtbAdminBar;
776					
777					if (toolbox_values.dtb_m_m_width !== '') {
778						var dtbMenuWidth = '100%';
779					} else { 
780						var dtbMenuWidth = toolbox_values.dtb_m_m_width_max + 'px';
781					}
782					if (dtbMenuAnimation === 'move_left')  {
783						
784						if (dtbMenuOpened) {
785							dtbPagecontainer.animate({right: dtbMenuWidth}, 500 );
786							dtbMenucontainer.animate({right: "0"}, 500 );
787						}
788						if (!dtbMenuOpened) {
789							dtbPagecontainer.animate({right: "0"}, 500 );
790							dtbMenucontainer.animate({right: '-'+dtbMenuWidth}, 500 );
791						}
792					}
793					if (dtbMenuAnimation === 'move_right')  {
794						
795						if (dtbMenuOpened) {
796							dtbPagecontainer.animate({left: dtbMenuWidth}, 500 );
797							dtbMenucontainer.animate({left: "0"}, 500 );
798						}
799						if (!dtbMenuOpened) {
800							dtbPagecontainer.animate({left: "0"}, 500 );
801							dtbMenucontainer.animate({left: '-'+dtbMenuWidth}, 500 );
802						}
803					}
804					if (dtbMenuAnimation === 'move_bottom')  {
805						
806						if (dtbMenuOpened) {
807							dtbPagecontainer.animate({top: dtbMenuHeight}, 500 );
808							dtbMenucontainer.animate({top: dtbAdminBar}, 500 );
809						}
810						if (!dtbMenuOpened) {
811							dtbPagecontainer.animate({top: "0"}, 500 );
812							dtbMenucontainer.animate({top: '-'+dtbMenuOffset}, 500 );
813						}
814					}
815					if (dtbMenuAnimation === 'move_top')  {
816						
817						if (dtbMenuOpened) {
818							dtbPagecontainer.animate({bottom: dtbMenuHeight}, 500 );
819							dtbMenucontainer.animate({bottom: 0}, 500 );
820						}
821						if (!dtbMenuOpened) {
822							dtbPagecontainer.animate({bottom: "0"}, 500 );
823							dtbMenucontainer.animate({bottom: '-'+dtbMenuHeight}, 500 );
824						}
825					}
826				}
827				
828			});
829			
830			
831			if (toolbox_values.dtb_m_mobile_trigger !== '') {
832				$('#main-header .mobile_menu_bar, .et_pb_module.dtb-menu .mobile_menu_bar, #dtb-m-menu .mobile_menu_bar').not('.dtb-m-menu-trigger .mobile_menu_bar').not('.et_header_style_fullscreen .mobile_menu_bar').not('.et_header_style_slide .mobile_menu_bar').detach();
833			}	
834			
835			
836			$('#dtb-m-menu .mobile_menu_bar, #dtb-m-menu li.menu-item a[href*="#"]:not([href$="#"])').click(function(){
837			$('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled');
838			$('.dtb-menu .mobile_nav').removeClass('opened').addClass('closed');
839		 });
840			
841			
842		}
843		
844	}
845
846	CustomMobileMenu();
847	
848	if (toolbox_values.dtb_m_m_animation_page !== '') {
849		$(window).on('resize', function(event){
850			var dtbMenuOpened = $('body').hasClass('dtb-m-mobile-open');
851			var dtbMenuHeight = $('#dtb-m-menu').height();
852			if ( $('#wpadminbar').length ) {
853				var dtbAdminBar = $('#wpadminbar').height();
854				} else {
855				var dtbAdminBar = 0 };
856			var dtbMenuOffset = -1*(dtbMenuHeight-dtbAdminBar);
857			var dtbMenucontainer = $('#dtb-m-menu');
858			var dtbMenuAnimation	= toolbox_values.dtb_m_m_animation_type;
859			if (!dtbMenuOpened) {
860				
861				
862				if (dtbMenuAnimation === 'move_bottom')  {
863					dtbMenucontainer.css('top', dtbMenuOffset);
864				}
865				if (dtbMenuAnimation === 'move_top')  {
866					dtbMenucontainer.css('bottom', -dtbMenuHeight);
867				}
868			}
869		});
870	}
871	
872	if ($('.page-template-page-template-blank .dtb-menu').length == 0) {
873		$('.page-template-page-template-blank #dtb-m-menu, .page-template-page-template-blank .dtb-m-menu-trigger').detach()
874	}
875}
875);
876
877
878function dtbHideCachedMenu() {
879	jQuery('body').removeClass('dtb-m-mobile-open stopscroll');
880	jQuery('#dtb-m-menu').removeClass('dtb-in').addClass('dtb-out').attr('style', '');
881	jQuery('.dtb-page-container').attr('style', '');
882	jQuery('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled');
883}
884window.addEventListener("pageshow", function() {
885	dtbHideCachedMenu();
886});	

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.