<?php 

add_action( 'wp_enqueue_scripts', 'liberis_menu_sticky', 99 );

function liberis_menu_sticky() {
	
	$mt_header_fixed = get_theme_mod( 'mt_header_fixed', 'off');
	
	if($mt_header_fixed == 'on'):
	   
   $custom_js2 = "";
   
   $custom_js2 = "(function($) {
    'use strict';
	
	$(window).on('scroll', function() {
  if ($(document).scrollTop() > 60) {
    $('.header-3, .nav-holder-1, .header-2').addClass('nav-fixed-top');
	$('.header-1').addClass('mobile-top');
  } else {
    $('.header-3, .nav-holder-1, .header-2').removeClass('nav-fixed-top');
	$('.header-1').removeClass('mobile-top');
  }
  
  });
  
	})(jQuery);";
   
   wp_add_inline_script( 'liberis-init', $custom_js2 );
	
	endif;

}