????JFIF??x?x????'
| Server IP : 104.21.30.238 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././home/tempvsty/./dchs84reunion.com/wp-content/themes/celebration/js/ |
Upload File : |
'use strict';
var bt_enquire = {};
bt_enquire.sizes = {};
(function( $ ) {
bt_enquire.register = function( size, handler ) {
size = parseInt( size.split( ':' )[1] );
bt_enquire.sizes[ size ] = {};
bt_enquire.sizes[ size ].handler = handler;
}
bt_enquire.handle = function() {
var width = ( window.innerWidth > 0 ) ? window.innerWidth : screen.width;
$.each( bt_enquire.sizes, function( size, obj ) {
if ( width <= size ) {
if ( obj.state != 'matched' ) {
obj.handler.match();
obj.state = 'matched';
}
} else {
if ( obj.state == 'matched' ) {
obj.handler.unmatch();
obj.state = 'unmatched';
}
}
});
}
var verticalMenuScroll = null;
$( document ).ready(function() {
var isTouchDevice = ( 'ontouchstart' in window ) || ( navigator.MaxTouchPoints > 0 ) || ( navigator.msMaxTouchPoints > 0 );
if ( isTouchDevice ) {
$( 'html' ).addClass( 'touch' );
$( 'html' ).removeClass( 'no-touch' );
} else {
$( 'html' ).addClass( 'no-touch' );
$( 'html' ).removeClass( 'touch' );
}
var hasCentralMenu = $( 'body' ).hasClass( 'btMenuCenterEnabled' );
var verticalMenuEnabled = $( 'body' ).hasClass( 'btMenuVerticalLeftEnabled' ) || $( 'body' ).hasClass( 'btMenuVerticalRightEnabled' );
var belowMenu = $( 'body' ).hasClass( 'btBelowMenu' );
var touchDevice = $( 'html' ).hasClass( 'touch' );
window.btStickyEnabled = $( 'body' ).hasClass( 'btStickyEnabled' );
window.btStickyOffset = 250;
var swapHeaderStyle = belowMenu && window.btStickyEnabled && ( $( '.btAltLogo' ).length > 0 || $( '.btTextLogo' ).length > 0 ); // If alt logo exists we will swap header skin
var skinToSwap = $( 'body' ).hasClass( 'btDarkSkin' ) ? "btLightSkin" : "btDarkSkin";
$( '.btPageWrap .btAltLogo' ).hide( );
$( '.btPageWrap .btMainLogo' ).show( );
if ( ! $( '.logo img' ).length ) {
$( '.logo' ).addClass( 'boldthemes_logo_text' );
}
function divide_menu() {
if ( ! hasCentralMenu ) return false;
var logoWidth = $( '.mainHeader .logo' ).height() * $( '.mainHeader .logo .btMainLogo' ).data( 'hw' );
if ( $( '.boldthemes_logo_text' ).length ) {
logoWidth = $( '.boldthemes_logo_text' ).width();
}
$( '.menuPort nav' ).addClass( 'leftNav' );
$( '.menuPort' ).append( '<nav class="rightNav"><ul></ul></nav>' );
var halfItems = Math.ceil( $( '.mainHeader nav.leftNav ul>li:not(li li)' ).length * .5 );
$( '.mainHeader nav.rightNav > ul' ).append( $( '.mainHeader nav.leftNav > ul > li' ).slice ( halfItems ) );
$( '.mainHeader nav.leftNav > ul > li' ).slice ( halfItems ).remove();
$( '.mainHeader .logo' ).css( 'transform', 'translateX(' + Math.round(-logoWidth * .5) + 'px)' );
$( '.mainHeader nav.leftNav' ).css( 'margin-right', Math.round(logoWidth * .5) + 'px' );
$( '.mainHeader nav.rightNav' ).css( 'margin-left', Math.round(logoWidth * .5) + 'px' );
}
function undivide_menu() {
if ( ! hasCentralMenu ) return false;
$( '.mainHeader nav.leftNav>ul:not(ul ul)' ).append( $( '.mainHeader nav.rightNav ul>li:not(li li)' ) );
$( '.mainHeader nav.rightNav' ).remove();
$( '.mainHeader .leftNav' ).removeAttr( 'style' );
$( '.menuPort nav' ).removeClass( 'leftNav' );
$( '.mainHeader .logo' ).removeAttr( 'style' );
}
/* Vertical menu setup */
function init_menu() {
if ( verticalMenuEnabled ) {
if ( $( 'body' ).hasClass( 'btMenuVerticalLeftEnabled' )) $( 'body' ).addClass( 'btMenuVerticalLeft btMenuVertical' );
if ( $( 'body' ).hasClass( 'btMenuVerticalRightEnabled' )) $( 'body' ).addClass( 'btMenuVerticalRight btMenuVertical' );
move_menu_to_vertical();
} else {
$( 'body' ).removeClass( 'btMenuVerticalLeft btMenuVerticalRight btMenuVertical btMenuVerticalOn' );
if ( $( 'body' ).hasClass( 'btMenuRightEnabled' )) $( 'body' ).addClass( 'btMenuRight btMenuHorizontal' );
if ( $( 'body' ).hasClass( 'btMenuLeftEnabled' )) $( 'body' ).addClass( 'btMenuLeft btMenuHorizontal' );
if ( $( 'body' ).hasClass( 'btMenuCenterEnabled' )) $( 'body' ).addClass( 'btMenuCenter btMenuHorizontal' );
}
}
function move_menu_to_vertical() {
$( '.menuPort' ).prependTo( 'body' );
$( '.mainHeader .logo' ).clone().prependTo( '.menuPort' );
$( '.menuPort' ).prepend( '<div class="btCloseVertical"></div>');
$( '.btCloseVertical' ).on( 'click', function() {
$( 'body' ).toggleClass( 'btMenuVerticalOn' );
});
$( '.mainHeader .topBar' ).appendTo( '.menuPort' );
$( '.mainHeader .topBarInLogoArea' ).appendTo( '.menuPort' );
$( 'body' ).removeClass( 'btStickyHeaderActive' );
if ( ! belowMenu ) $( '.btContentWrap' ).css( 'padding-top', $( '.mainHeader' ).height() +'px');
$( 'li.current-menu-ancestor, li.current_menu_item').each(function() {
$( this ).find( '.subToggler' ).first().addClass( 'on' ).next().next().show();
});
// Vertical Menu Desktop Scroll
$( '.btMenuVertical .menuPort' ).wrapInner( '<div class="menuScrollPort"></div>' );
if ( $( 'body' ).hasClass( 'btMenuVertical' ) && $( 'html' ).hasClass( 'no-touch' ) ) {
if ( verticalMenuScroll === null ) {
verticalMenuScroll = new IScroll( '.no-touch .btMenuVertical .menuPort', {
scrollbars: true,
mouseWheel: true,
click: true,
interactiveScrollbars: true,
shrinkScrollbars: 'scale',
fadeScrollbars: true
});
}
}
}
function reset_menu_to_original() {
if ( verticalMenuScroll !== null ) {
verticalMenuScroll.destroy();
verticalMenuScroll = null;
}
$('.menuPort .menuScrollPort').contents().unwrap();
init_menu();
$( '.menuPort .sub-menu' ).removeAttr( 'style' );
$( '.menuPort .logo' ).remove();
$( '.menuPort .btCloseVertical' ).remove();
if( $('.btBelowLogoArea').length == 0 ) {
$( '.menuPort' ).appendTo( '.btLogoArea' );
} else {
$( '.menuPort' ).appendTo( '.btBelowLogoArea' );
}
$( '.menuPort .topBar' ).prependTo( '.mainHeader > .port' );
$( '.mainHeader .topBarInLogoArea' ).insertAfter( '.mainHeader .logo' );
$( 'body' ).removeClass( 'btStickyHeaderActive' );
if ( ! belowMenu ) $( '.btContentWrap' ).css( 'padding-top', $( '.mainHeader' ).height() +'px');
divide_menu();
}
/* activate sticky */
window.boldthemes_activate_sticky = function() {
var fromTop = $( window ).scrollTop();
if ( window.btStickyEnabled ) {
if ( fromTop > window.btStickyOffset ) {
$( 'body' ).addClass( 'btStickyHeaderActive' );
if( swapHeaderStyle ) {
$( '.mainHeader' ).removeClass( skinToSwap );
$( '.btPageWrap .btAltLogo' ).hide( );
$( '.btPageWrap .btMainLogo' ).show( );
}
setTimeout( function() { $( 'body' ).addClass( 'btStickyHeaderOpen' ) }, 100 );
} else {
$( 'body' ).removeClass( 'btStickyHeaderOpen btStickyHeaderActive' );
if( swapHeaderStyle ) {
$( '.mainHeader' ).addClass( skinToSwap );
if ( swapHeaderStyle ) {
$( '.btPageWrap .btAltLogo' ).show( );
$( '.btPageWrap .btMainLogo' ).hide( );
}
}
}
}
}
/* Wide menu setup btMenuWideDropdown */
$('li.btMenuWideDropdown').addClass(function(){
return "btMenuWideDropdownCols-" + $(this).children('ul').children('li').length;
});
var maxChildItems = 0;
$( 'li.btMenuWideDropdown > ul > li > ul' ).each(function( index ) {
if ( $( this ).children().length > maxChildItems ) {
maxChildItems = $( this ).children().length;
}
});
$( 'li.btMenuWideDropdown > ul > li > ul' ).each(function( index ) {
var bt_menu_base_length = $( this ).children().length;
if ( bt_menu_base_length < maxChildItems ) {
for ( var i = 0; i < maxChildItems - bt_menu_base_length; i++ ) {
$( this ).append( '<li><a class="btEmptyElement"> </a></li>' );
}
}
});
/* Show hide menu */
$( '.btHorizontalMenuTrigger' ).on( 'click', function () {
$( '.mainHeader' ).toggleClass( 'btShowMenu' );
return false;
});
/* responsive menu toggler */
$( '.btVerticalMenuTrigger' ).on( 'click', function () {
$( 'body' ).toggleClass( 'btMenuVerticalOn' );
});
/* Top tools search */
$('.btTopBox .btSearchInner').prependTo('body').addClass( 'btFromTopBox' );
$( '.btSearch .btIco, .btSearchInnerClose' ).on( 'click', function () {
$( 'body' ).toggleClass( 'btTopToolsSearchOpen' );
return false;
});
/* Vertical menu setup */
init_menu();
/* Load enquire */
// turn on responsive menu for all touch devices
var responsiveResolution = '1023';
bt_enquire.register( 'screen and (max-width:' + responsiveResolution + 'px)', {
match: function() {
/* Force vertical menu */
if ( ! verticalMenuEnabled ) {
undivide_menu();
$( 'body' ).addClass( 'btMenuVerticalLeft btMenuVertical' ).removeClass( 'btMenuLeft btMenuCenter btMenuRight btMenuHorizontal btMenuVerticalRight' );
move_menu_to_vertical();
}
},
unmatch: function () {
if ( ! verticalMenuEnabled ) {
reset_menu_to_original();
}
}
});
// move content bellow menu
if ( ! belowMenu ) {
$( window ).load( function() { $( '.btContentWrap' ).css( 'padding-top', $( '.mainHeader' ).height() +'px') } );
$( window ).resize(function() {
$( '.btContentWrap' ).css( 'padding-top', $( '.mainHeader' ).height() +'px');
});
$( window ).scroll(function() {
$( '.btContentWrap' ).css( 'padding-top', $( '.mainHeader' ).height() +'px');
});
} else {
if ( swapHeaderStyle ) {
$( '.mainHeader' ).addClass( skinToSwap );
$( '.btPageWrap .btAltLogo' ).show();
$( '.btPageWrap .btMainLogo' ).hide();
}
}
/* responsive menu sub togglers */
$( '.menuPort ul ul' ).parent().prepend( '<div class="subToggler"></div>');
$( '.menuPort ul li' ).on( 'mouseover mouseout', function (e) {
if ( $( 'body' ).hasClass( 'btMenuVertical' ) || $( 'html' ).hasClass( 'touch' ) ) {
return false;
}
e.preventDefault();
$( this ).siblings().removeClass( 'on' );
$( this ).toggleClass( 'on' );
});
$( 'div.subToggler' ).on( 'click', function(e) {
var parent = $( this ).parent();
parent.siblings().removeClass( 'on' );
parent.toggleClass( 'on' );
if ( $( 'body' ).hasClass( 'btMenuVertical' ) ) {
parent.find( 'ul' ).first().slideToggle( 200 );
setTimeout(function () {
if ( verticalMenuScroll !== null ) {
verticalMenuScroll.refresh();
}
}, 280 );
}
});
/* menu split */
if ( hasCentralMenu ) divide_menu();
bt_enquire.handle();
$( window ).resize(function() {
bt_enquire.handle();
});
});
$( window ).on( 'load', function() {
if ( window.boldthemes_activate_sticky ) {
window.boldthemes_activate_sticky();
}
$( window ).scroll(function() {
if ( window.boldthemes_activate_sticky ) {
window.boldthemes_activate_sticky();
}
});
});
})( jQuery );