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 .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('.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 .et_pb_post').contents().filter(function () { return this.nodeType === 3 && $.trim(this.nodeValue).length; }).wrap('<p class="dtb-post-content">'); 211 $('.dtb_archives .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 if (toolbox_values.dtb_social_links === '1') { 374 if (toolbox_values.dtb_skype_url !== '') { 375 $('.et-social-icons').append('<li class="et-social-icon et-social-skype"><a href="' + toolbox_values.dtb_skype_url + '" class="icon"><span>
375Skype</span></a></li>') 376 } 377 if (toolbox_values.dtb_instagram_url !== '') { 378 $('.et-social-icons').append('<li class="et-social-icon et-social-instagram"><a href="' + toolbox_values.dtb_instagram_url + '" class="icon"><span>Instagram</span></a></li>') 379 } 380 if (toolbox_values.dtb_youtube_url !== '') { 381 $('.et-social-icons').append('<li class="et-social-icon et-social-youtube"><a href="' + toolbox_values.dtb_youtube_url + '" class="icon"><span>YouTube</span></a></li>') 382 } 383 if (toolbox_values.dtb_linkedin_url !== '') { 384 $('.et-social-icons').append('<li class="et-social-icon et-social-linkedin"><a href="' + toolbox_values.dtb_linkedin_url + '" class="icon"><span>LinkedIn</span></a></li>') 385 } 386 if (toolbox_values.dtb_pinterest_url !== '') { 387 $('.et-social-icons').append('<li class="et-social-icon et-social-pinterest"><a href="' + toolbox_values.dtb_pinterest_url + '" class="icon"><span>Pinterest</span></a></li>') 388 } 389 if (toolbox_values.dtb_tumblr_url !== '') { 390 $('.et-social-icons').append('<li class="et-social-icon et-social-tumblr"><a href="' + toolbox_values.dtb_tumblr_url + '" class="icon"><span>Tumblr</span></a></li>') 391 } 392 if (toolbox_values.dtb_flickr_url !== '') { 393 $('.et-social-icons').append('<li class="et-social-icon et-social-flickr"><a href="' + toolbox_values.dtb_flickr_url + '" class="icon"><span>Flickr</span></a></li>') 394 } 395 if (toolbox_values.dtb_dribble_url !== '') { 396 $('.et-social-icons').append('<li class="et-social-icon et-social-dribble"><a href="' + toolbox_values.dtb_dribble_url + '" class="icon"><span>Dribble</span></a></li>') 397 } 398 if (toolbox_values.dtb_vimeo_url !== '') { 399 $('.et-social-icons').append('<li class="et-social-icon et-social-vimeo"><a href="' + toolbox_values.dtb_vimeo_url + '" class="icon"><span>Vimeo</span></a></li>') 400 } 401 } 402 403 if (toolbox_values.dtb_social_target === '1') { 404 $('.et-social-icon a').attr('target', '_blank'); 405 } 406 407 408 if ((toolbox_values.dtb_social_move === '1') && (toolbox_values.dtb_social_enable === '1')) { 409 $('#top-header .et-social-icons').detach(); 410 } 411 412 413 414 415 if (toolbox_values.dtb_social_enable === '1') { 416 $('#top-header .et-social-icons a, #main-header .et-social-icons a').addClass(toolbox_values.social_head_hover); 417 $('#footer-bottom .et-social-icons a').addClass(toolbox_values.social_foot_hover); 418 } 419 420 421 422 $('#footer-bottom .et-social-icons a').width($('#footer-bottom .et-social-icons a').height()); 423 $(window).on('resize', function () { 424 $('#footer-bottom .et-social-icons a').width($('#footer-bottom .et-social-icons a').height()); 425 }); 426 427 428 429 430 if ((toolbox_values.dtb_fixed_logo === '1') && (toolbox_values.dtb_fixed_logo_url !== '')) { 431 var oldURL = $('#logo').attr('src'); 432 function checkScroll() { 433 var scrollPosition = $(window).scrollTop(); 434 if ( ($('#main-header').hasClass('et-fixed-header')) || (scrollPosition > 5)) { 435 $('#logo').attr('src', toolbox_values.dtb_fixed_logo_url); 436 } 437 else { 438 $('#logo').attr('src', oldURL); 439 } 440 $(window).on('scroll', function () { 441 var scrollPosition = $(window).scrollTop(); 442 if ( ($('#main-header').hasClass('et-fixed-header')) && (scrollPosition > 5)) { 443 $('#logo').attr('src', toolbox_values.dtb_fixed_logo_url); 444 } 445 else { 446 $('#logo').attr('src', oldURL); 447 } 448 }); 449 } 450 checkScroll(); 451 $(window).resize(checkScroll); 452 453 } 454 455 if ((toolbox_values.dtb_mobile_logo === '1') && (toolbox_values.dtb_mobile_logo_url !== '')) { 456 var desktopURL = $('#logo').attr('src'); 457 function checkWidth() { 458 var windowsize = $(window).width(); 459 460 if (windowsize < toolbox_values.dtb_mobile_breakpoint) { 461 $('#logo').attr('src', toolbox_values.dtb_mobile_logo_url); 462 } 463 464 else { 465 if (toolbox_values.dtb_fixed_logo !== '1') { 466 $('#logo').attr('src', desktopURL); 467 } 468 } 469 $(window).on('scroll', function () { 470 var windowsize = $(window).width(); 471 if (windowsize < toolbox_values.dtb_mobile_breakpoint) { 472 $('#logo').attr('src', toolbox_values.dtb_mobile_logo_url); 473 } 474 }); 475 } 476 checkWidth(); 477 $(window).resize(checkWidth); 478 } 479 480 481 482 if (toolbox_values.dtb_comments_styles === '1') { 483 $('#respond #submit, .comment-reply-link, #respond #et_pb_submit').addClass(toolbox_values.dtb_comments_btn_hover); 484 } 485 486 $('.et_pb_button').addClass(toolbox_values.dtb_buttons_hover); 487 $('.' + toolbox_values.dtb_sec_btn_class).removeClass(toolbox_values.dtb_buttons_hover).addClass(toolbox_values.dtb_sec_btn_hover); 488 489 490 491 492 function dtb_header_menu_split() { 493 var $logo_container = $('#main-header > .container > .logo_container'), 494 495 $et_top_navigation = $('#et-top-navigation'), 496 $logo_container_splitted = $('.centered-inline-logo-wrap > .logo_container'), 497 et_top_navigation_li_size = $et_top_navigation.children('nav').children('ul').children('li').size(), 498 et_top_navigation_li_break_index = Math.round(et_top_navigation_li_size / 2) - 1, 499 window_width = window.innerWidth; 500 501 if (window_width > toolbox_values.dtb_mobile_breakpoint && $logo_container.length && $('body').hasClass('et_header_style_split')) { 502 $('<li class="centered-inline-logo-wrap"></li>').insertAfter($et_top_navigation.find('nav > ul >li:nth(' + et_top_navigation_li_break_index + ')')); 503 $logo_container.appendTo($et_top_navigation.find('.centered-inline-logo-wrap')); 504 } 505 506 if (window_width <= toolbox_values.dtb_mobile_breakpoint && $logo_container_splitted.length) { 507 $logo_container_splitted.prependTo('#main-header > .container'); 508 $('#main-header .centered-inline-logo-wrap').remove(); 509 } 510 } 511 512 dtb_header_menu_split(); 513 $(window).resize(function () { 514 dtb_header_menu_split(); 515 }); 516 517 var $slide_menu_container = $('.et_header_style_slide .et_slide_in_menu_container'); 518 if ($slide_menu_container.length && !$('body').hasClass('et_pb_slide_menu_active')) { 519 $slide_menu_container.css({ right: '-' + parseInt($slide_menu_container.innerWidth()) + 'px', 'display': 'none' }); 520 } 521 522 523 524 if (toolbox_values.dtb_post_author !== '') { 525 $('.dtb-author-box').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content'); 526 } 527 if (toolbox_values.dtb_post_prev_next !== '') { 528 $('.dtb-single-post-nav').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content');; 529 } 530 if (toolbox_values.dtb_post_related !== '') { 531 $('.dtb-related-posts').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content'); 532 } 533 534 if (toolbox_values.dtb_single_after_content_layout !== '') { 535 $('.dtb-after-single-post').detach().insertAfter('.et_pb_post>.entry-content, .et_pb_module.et_pb_post_content'); 536 } 537 538 if (toolbox_values.dtb_hide_post_title !== '') { 539 $('.single-post .et_post_meta_wrapper h1.entry-title').detach(); 540 } 541 542 if (toolbox_values.dtb_footer_reveal !== '') { 543 function dtb_footer_height() { 544 if ( $( "#main-footer" ).length ) { 545 var footer_height = $('#main-footer').height(); 546 } 547 else { 548 var footer_height = $('.et-l--footer').height(); 549 } 550 $('#page-container').css('margin-bottom', footer_height); 551 } 552 function dtb_remove_footer_height() { 553 $('#page-container').css('margin-bottom', '0'); 554 } 555 function dtb_footer_reveal_mobile_conditional() { 556 if ($(window).width() > 980) { 557 dtb_footer_height(); 558 } else { 559 dtb_remove_footer_height(); 560 } 561 } 562 if (toolbox_values.dtb_footer_reveal_mobile_off !== '') { 563 dtb_footer_reveal_mobile_conditional() 564 $(window).resize(function () { 565 dtb_footer_reveal_mobile_conditional() 566 }); 567 } 568 else { 569 dtb_footer_height(); 570 $(window).resize(function () { 571 dtb_footer_height(); 572 }); 573 } 574 } 575 576 if (toolbox_values.dtb_testimonial_photo !== '') { 577 $('.et_pb_testimonial').each(function () { 578 $('.et_pb_testimonial_portrait', this).detach().insertBefore($(this).find('.et_pb_testimonial_author')); 579 $('.et_pb_testimonial_portrait, .et_pb_testimonial_author, .et_pb_testimonial_meta', this).wrapAll('<div class="clearfix"></div>'); 580 }); 581 } 582 583 }); 584 585 jQuery(window).on("load", function($){ 586 var mbwidth = parseInt(toolbox_values.dtb_mobile_breakpoint); 587 if ((jQuery(window).width() <= mbwidth) && jQuery('body').hasClass('dtb_mobile_slide')) { 588 jQuery('#main-header .mobile_menu_bar, .dtb-fixed-always .mobile_menu_bar').click(function () { 589 jQuery('body').toggleClass('noscroll'); 590 }); 591 jQuery('.mobile_menu_bar').click(function () { 592 jQuery('#mobile_menu, .dtb-fixed-always .et_mobile_menu').css('min-height', (jQuery(window).height()) + 'px'); 593 jQuery('#mobile_menu, .dtb-fixed-always .et_mobile_menu').css('max-height', '100vh'); 594 }); 595 } 596 }); 597 598 599 if (toolbox_values.dtb_follow_the_mouse === '1') { 600 601 /*jQuery directional hover */ 602 !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);
602 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); 603 604 605 (function ($) { 606 var triggerClassChange = $.fn.addClass; 607 $.fn.addClass = function () { 608 $(this).trigger('classChanged'); 609 return triggerClassChange.apply(this, arguments); 610 } 611 })(jQuery); 612 jQuery(document).ready(function ($) { 613 614 $('.et_pb_portfolio .et_pb_portfolio_item, .et_pb_fullwidth_portfolio .et_pb_portfolio_item, .et_pb_gallery .et_pb_gallery_item').directionalHover(); 615 $('div.et_pb_portfolio').find('li.et_pb_portfolio_filter a').on('classChanged', function () { 616 setTimeout(function () { 617 $('.et_pb_portfolio .et_pb_portfolio_item').directionalHover(); 618 }); 619 }); 620 621 $('div.et_pb_portfolio').on('classChanged', 'li.page a', function () { 622 setTimeout(function () { 623 $('.et_pb_portfolio .et_pb_portfolio_item').directionalHover(); 624 }); 625 }); 626 }); 627 } 628 629 630 if (toolbox_values.dtb_mobile_nested === '1') { 631 (function ($) { 632 function dtb_setup_submenus() { 633 $("<div class='sub-menu-toggle'></div>").insertBefore(".et_mobile_menu .menu-item-has-children > a, #dtb-m-menu .menu-item-has-children > a"); 634 635 $(".sub-menu-toggle").click(function (e) { 636 e.preventDefault(); 637 $(this).toggleClass("popped"); 638 }); 639 } 640 $(document).ready(function() { 641 dtb_setup_submenus(); 642 var parent_links = $(".et_mobile_menu .menu-item-has-children > a, #dtb-m-menu .menu-item-has-children > a"); 643 var toggles = $(".sub-menu-toggle"); 644 parent_links.off(); 645 parent_links.each(function (i) { 646 if ($(this).attr("href") === '#') { 647 $(this).click(function () { 648 toggles[i].click(function () { 649 $(this).toggleClass('popped'); 650 }); 651 }); 652 } 653 }); 654 }); 655 })(jQuery); 656 } 657} 658 659jQuery(document).ready(function($) { 660 function dtb_Ajax_Fn2() { 661 if ((toolbox_values.dtb_blog_layout !== 'blog_default') && (toolbox_values.dtb_blog_layout !== '')) { 662 $('.dtb-blog.et_pb_module .et_pb_post').each(function () { 663 if ($('.dtb-post-wrap', this).length < 1) { 664 $('>: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>'); 665 } 666 }); 667 } 668 669 if (toolbox_values.dtb_post_meta === '1') { 670 $(".dtb-blog.et_pb_module .post-meta, .archive #left-area .et_pb_post .post-meta, .blog #left-area .et_pb_post .post-meta, .dtb-blog.et_pb_module .et_pb_title_meta_container").html(function () { 671 return $(this).html().replace(/\|/g, '').replace('by', '').replace('por', '').replace('...', '').replace(/,/g, ''); 672 }); 673 } 674 675 if (toolbox_values.dtb_sidebar_search !== '') { 676 $('.et_pb_widget_area #searchsubmit, #sidebar #searchsubmit, .dtb-sidebar #searchsubmit').before('<span class="icon"></span>'); 677 } 678 679 $('#top-menu-nav #top-menu li a, .dtb-menu ul.et-menu li a, #et-secondary-nav li.cta-link a').each(function () { 680 if ($('>span', this).length < 1) { 681 $(this).wrapInner('<span></span>'); 682 } 683 }); 684 685 if (toolbox_values.dtb_cta_link === '1') { 686 if (toolbox_values.dtb_cta_link_type === 'first_item') { 687 $('#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'); 688 } 689 if (toolbox_values.dtb_cta_link_type === 'last_item') { 690 $('#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'); 691 } 692 if (toolbox_values.dtb_cta_link_type === 'custom_class') { 693 $('#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'); 694 } 695 $('#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); 696 } 697 698 699 if ((toolbox_values.dtb_social_mobile_add === '1') && (toolbox_values.dtb_social_enable === '1')) { 700 $('body>.et-social-icons').detach().appendTo('[id^="mobile_menu"], .dtb-menu .et_mobile_menu'); 701 } 702 } 703 704 $(document).ajaxComplete(function() { 705 dtb_Ajax_Fn2(); 706 }); 707 dtb_Ajax_Fn2(); 708 709 710 if ($('.custom_hamburger_icon').length > 0) { 711 var iconName = 'hamburger_menu_icon', 712 toggledName = iconName + '-toggled'; 713 $('.mobile_menu_bar').addClass(iconName).html('<div class="dtb-hamburger"><div class="dtb-hamburger-box"><div class="dtb-hamburger-inner"></div></div></div>'); 714 715 $('.' + iconName).on('click', function (e) { 716 e.preventDefault(); 717 $(this).toggleClass(toggledName); 718 $('.et_slide_in_menu_container .mobile_menu_bar').toggleClass(toggledName); 719 }); 720 721 $('.et_slide_in_menu_container .mobile_menu_bar').click(function(){ 722 $('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled'); 723 }); 724 } 725 726}); 727 728 729 730 731jQuery(document).ready(function($) { 732 733 734 function CustomMobileMenu() { 735 736 737 if ((toolbox_values.dtb_enable_custom_m_menu !== '') && (toolbox_values.dtb_mobile_enable !== '')) { 738 $('#dtb-m-menu').detach().insertAfter('#page-container'); 739 //if (toolbox_values.dtb_m_m_hamburger_show !== '') { 740 $('#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'); 741 //} 742 743 if ((toolbox_values.dtb_custom_m_menu === '') && ($('.et_pb_module.dtb-menu').length > 0) ){ 744 $('#dtb-m-menu ul').detach(); 745 //if (toolbox_values.dtb_m_m_hamburger_show !== '') { 746 $('.et_pb_module.dtb-menu .mobile_menu_bar').clone().prependTo('#dtb-m-menu .nav-wrapper'); 747 //} 748 $('.et_pb_module.dtb-menu .et_mobile_menu').detach().appendTo('#dtb-m-menu .nav-wrapper').removeClass('et_mobile_menu').addClass('dtb-mobile-menu'); 749 750 751 } 752 if ((toolbox_values.dtb_custom_m_menu !== '') && ($('.et_pb_module.dtb-menu').length > 0) /*&& (toolbox_values.dtb_m_m_hamburger_show !== '') */){ 753 $('.et_pb_module.dtb-menu .mobile_menu_bar').clone().prependTo('#dtb-m-menu .nav-wrapper'); 754 755 756 } 757 if ((toolbox_values.dtb_m_m_animation_page !== '') && (toolbox_values.dtb_vb_enabled !== '1')) { 758 759 $('#page-container, #dtb-m-menu').wrapAll('<div class="dtb-body-wrapper"/>'); 760 $('#page-container').wrap('<div class="dtb-page-container noanimation"/>'); 761 var dtbMenuHeight = $('#dtb-m-menu').height(); 762 var dtbAdminBar = $('#wpadminbar').height(); 763 var dtbMenuOffset = -1*(dtbMenuHeight-dtbAdminBar); 764 var dtbMenucontainer = $('#dtb-m-menu'); 765 var dtbMenuAnimation = toolbox_values.dtb_m_m_animation_type; 766 if (dtbMenuAnimation === 'move_bottom') { 767 dtbMenucontainer.css('top', dtbMenuOffset); 768 } 769 if (dtbMenuAnimation === 'move_top') { 770 dtbMenucontainer.css('bottom', -dtbMenuHeight); 771 } 772 dtbMenucontainer.addClass('dtb-mobile-opacity'); 773 } 774 775 776 $('.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(){ 777 $('#dtb-m-menu .mobile_menu_bar').toggleClass('hamburger_menu_icon-toggled'); 778 $('#dtb-m-menu').addClass('dtb-in'); 779 $('#dtb-m-menu').toggleClass('dtb-out'); 780 $('body').toggleClass('dtb-m-mobile-open stopscroll'); 781 $('.dtb-page-container').removeClass('noanimation'); 782 if (toolbox_values.dtb_m_m_animation_page !== '') { 783 784 var dtbMenuAnimation = toolbox_values.dtb_m_m_animation_type; 785 var dtbMenuOpened = $('body').hasClass('dtb-m-mobile-open'); 786 var dtbPagecontainer = $('.dtb-page-container'); 787 var dtbMenucontainer = $('#dtb-m-menu'); 788 var dtbMenuHeight = $('#dtb-m-menu').height(); 789 if ( $('#wpadminbar').length ) { 790 var dtbAdminBar = $('#wpadminbar').height(); 791 } else { 792 var dtbAdminBar = 0 }; 793 var dtbMenuOffset = dtbMenuHeight-dtbAdminBar; 794 795 if (toolbox_values.dtb_m_m_width !== '') { 796 var dtbMenuWidth = '100%'; 797 } else { 798 var dtbMenuWidth = toolbox_values.dtb_m_m_width_max + 'px'; 799 } 800 if (dtbMenuAnimation === 'move_left') { 801 802 if (dtbMenuOpened) { 803 dtbPagecontainer.animate({right: dtbMenuWidth}, 500 ); 804 dtbMenucontainer.animate({right: "0"}, 500 ); 805 } 806 if (!dtbMenuOpened) { 807 dtbPagecontainer.animate({right: "0"}, 500 ); 808 dtbMenucontainer.animate({right: '-'+dtbMenuWidth}, 500 ); 809 } 810 } 811 if (dtbMenuAnimation === 'move_right') { 812 813 if (dtbMenuOpened) { 814 dtbPagecontainer.animate({left: dtbMenuWidth}, 500 ); 815 dtbMenucontainer.animate({left: "0"}, 500 ); 816 } 817 if (!dtbMenuOpened) { 818 dtbPagecontainer.animate({left: "0"}, 500 ); 819 dtbMenucontainer.animate({left: '-'+dtbMenuWidth}, 500 ); 820 } 821 } 822 if (dtbMenuAnimation === 'move_bottom') { 823 824 if (dtbMenuOpened) { 825 dtbPagecontainer.animate({top: dtbMenuHeight}, 500 ); 826 dtbMenucontainer.animate({top: dtbAdminBar}, 500 ); 827 } 828 if (!dtbMenuOpened) { 829 dtbPagecontainer.animate({top: "0"}, 500 ); 830 dtbMenucontainer.animate({top: '-'+dtbMenuOffset}, 500 ); 831 } 832 } 833 if (dtbMenuAnimation === 'move_top') { 834 835 if (dtbMenuOpened) { 836 dtbPagecontainer.animate({bottom: dtbMenuHeight}, 500 ); 837 dtbMenucontainer.animate({bottom: 0}, 500 ); 838 } 839 if (!dtbMenuOpened) { 840 dtbPagecontainer.animate({bottom: "0"}, 500 ); 841 dtbMenucontainer.animate({bottom: '-'+dtbMenuHeight}, 500 ); 842 } 843 } 844 } 845 846 }); 847 848 849 if (toolbox_values.dtb_m_mobile_trigger !== '') { 850 $('#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(); 851 } 852 853 854 $('#dtb-m-menu .mobile_menu_bar, #dtb-m-menu li.menu-item a[href*="#"]:not([href$="#"])').click(function(){ 855 $('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled'); 856 }); 857 858 859 } 860 861 } 862 863 CustomMobileMenu(); 864 865 if (toolbox_values.dtb_m_m_animation_page !== '') { 866 $(window).on('resize', function(event){ 867 var dtbMenuOpened = $('body').hasClass('dtb-m-mobile-open'); 868 var dtbMenuHeight = $('#dtb-m-menu').height(); 869 if ( $('#wpadminbar').length ) { 870 var dtbAdminBar = $('#wpadminbar').height(); 871 } else { 872 var dtbAdminBar = 0 }; 873 var dtbMenuOffset = -1*(dtbMenuHeight-dtbAdminBar); 874 var dtbMenucontainer = $('#dtb-m-menu'); 875 var dtbMenuAnimation = toolbox_values.dtb_m_m_animation_type; 876 if (!dtbMenuOpened) { 877 878 879 if (dtbMenuAnimation === 'move_bottom') { 880 dtbMenucontainer.css('top', dtbMenuOffset); 881 } 882 if (dtbMenuAnimation === 'move_top') { 883 dtbMenucontainer.css('bottom', -dtbMenuHeight); 884 } 885 } 886 }); 887 } 888 889 if ($('.page-template-page-template-blank .dtb-menu').length == 0) { 890 $('.page-template-page-template-blank #dtb-m-menu, .page-template-page-template-blank .dtb-m-menu-trigger').detach() 891 } 892}
892); 893 894 895function dtbHideCachedMenu() { 896 jQuery('body').removeClass('dtb-m-mobile-open stopscroll'); 897 jQuery('#dtb-m-menu').removeClass('dtb-in').addClass('dtb-out').attr('style', ''); 898 jQuery('.dtb-page-container').attr('style', ''); 899 jQuery('.hamburger_menu_icon-toggled').removeClass('hamburger_menu_icon-toggled'); 900} 901window.addEventListener("pageshow", function() { 902 dtbHideCachedMenu(); 903});
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.