jQuery(document).ready( function( $ ) { "use strict"; // Scroll to top $('.btn-to-top').on( 'click', function() { $('html, body').animate( { scrollTop: 0 }, 500 ); return false; } ); // Fitvids $('.bxslider-vid').fitVids(); // Added to avoid iframe confuse on Chrome, Safari and Opera $('iframe').each( function() { this.src = this.src; } ); // Search box focus var brnhmbx_searchDefaultVal = $('#s').val(); $('#s').on( 'focus', function() { if ( $(this).val() == brnhmbx_searchDefaultVal ) { $(this).val(''); } } ); $('#s').on( 'focusout', function() { if ( $(this).val() == '' ) { $(this).val(brnhmbx_searchDefaultVal); } } ); // Apply Slicknav var slicknav_apl = true; var slicknav_apl_check = Number( $( '#slicknav_apl' ).html() ); if ( !slicknav_apl_check ) { slicknav_apl = false; } $('#site-menu').slicknav( { label: '', prependTo: '#touch-menu', allowParentLinks: slicknav_apl, closedSymbol: '', openedSymbol: '', init: brnhmbx_appendSocialIcons, open: brnhmbx_showSocialIcons } ); // Append social icons to Slicknav & Footer function brnhmbx_appendSocialIcons() { $('#touch-menu .slicknav_menu').addClass( 'fs16 source-serif' ); if ( $('.social-accounts').html() != 'undefined' && $('.social-accounts').html() != undefined && $('.social-accounts').html() != '' ) { $('#touch-menu .slicknav_menu').append( '
' ); $('.social-accounts-touch').hide(); $('.social-accounts-touch').find( 'a' ).removeClass( 'invis' ); /* Since v.1.1 */ $('#footer-social').append( ' ' ); $('.social-accounts-footer').find( 'a' ).removeClass( 'invis' ); /* */ } } $('.slicknav_btn').on( 'click', function() { $('.social-accounts-touch').hide(); } ); function brnhmbx_showSocialIcons() { $('.social-accounts-touch').show(); } // Contact Form 7 Place Send Icon $('body').find( '.wpcf7-submit' ).parent().append( '