text: (function($) {
      "use strict";
  	
  	//______________headerfixed
  	$(window).on("scroll", function(e){
  		if ($(window).scrollTop() >= 70) {
  			$('.hor-menu').addClass('fixed-header');
  			$('.hor-menu').addClass('visible-title');
  		}
  		else {
  			$('.hor-menu').removeClass('fixed-header');
  			$('.hor-menu').removeClass('visible-title');
  		}
      });
  	
  	// ______________Full Screen
  	$(document).on("click","#fullscreen-button", function toggleFullScreen() {
  		if ((document.fullScreenElement !== undefined && document.fullScreenElement === null) || (document.msFullscreenElement !== undefined && document.msFullscreenElement === null) || (document.mozFullScreen !== undefined && !document.mozFullScreen) || (document.webkitIsFullScreen !== undefined && !document.webkitIsFullScreen)) {
  			if (document.documentElement.requestFullScreen) {
  			  document.documentElement.requestFullScreen();
  			} else if (document.documentElement.mozRequestFullScreen) {
  			  document.documentElement.mozRequestFullScreen();
  			} else if (document.documentElement.webkitRequestFullScreen) {
  			  document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
  			} else if (document.documentElement.msRequestFullscreen) {
  			  document.documentElement.msRequestFullscreen();
  			}
  		} else {
  			if (document.cancelFullScreen) {
  			  document.cancelFullScreen();
  			} else if (document.mozCancelFullScreen) {
  			  document.mozCancelFullScreen();
  			} else if (document.webkitCancelFullScreen) {
  			  document.webkitCancelFullScreen();
  			} else if (document.msExitFullscreen) {
  			  document.msExitFullscreen();
  			}
  		}
  	})
  	
  	// ______________Active Class
  	$(".app-sidebar a").each(function() {
  		var pageUrl = window.location.href.split(/[?#]/)[0];
  		if (this.href == pageUrl) {
  			$(this).addClass("active");
  			$(this).parent().addClass("active"); // add active to li of the current link
  			$(this).parent().parent().prev().addClass("active"); // add active class to an anchor
  			$(this).parent().parent().prev().click(); // click the item to make it drop
  		}
  	});
  
  	// ______________ PAGE LOADING
  	$(window).on("load", function(e) {
  		$("#global-loader").fadeOut("slow");
  		
  	// ______________ countUp
  	$('.counter').countUp();
  		
  	})
  	// ______________ BACK TO TOP BUTTON
  
  	$(window).on("scroll", function(e) {
      	if ($(this).scrollTop() > 300) {
              $('#back-to-top').fadeIn('slow');
          } else {
              $('#back-to-top').fadeOut('slow');
          }
      });
  
      $("#back-to-top").on("click", function(e){
          $("html, body").animate({
              scrollTop: 0
          }, 600);
          return false;
      });
  	var ratingOptions = {
  		selectors: {
  			starsSelector: '.rating-stars',
  			starSelector: '.rating-star',
  			starActiveClass: 'is--active',
  			starHoverClass: 'is--hover',
  			starNoHoverClass: 'is--no-hover',
  			targetFormElementSelector: '.rating-value'
  		}
  	};
  	$(".vscroll").mCustomScrollbar();
  	$(".app-sidebar").mCustomScrollbar({
  		theme:"minimal",
  		autoHideScrollbar: true
  	});
  	$(".rating-stars").ratingStars(ratingOptions);
  	
  	//Increment & Decrement
  	var quantitiy=0;
  	$('.quantity-right-plus').on('click', function(e){
  		// Stop acting like a button
  		e.preventDefault();
  		// Get the field name
  		var quantity = parseInt($('#quantity').val());// If is not undefined
  		$('#quantity').val(quantity + 1);// Increment
  
  	});
  	$('.quantity-left-minus').on('click', function(e){
  		// Stop acting like a button
  		e.preventDefault();
  		// Get the field name
  		var quantity = parseInt($('#quantity').val());// If is not undefined
  		// Increment
  		if(quantity>0){
  			$('#quantity').val(quantity - 1);
  		}
  	});
  	
  	//horizontal scrollbar
  	$("#content-5").mCustomScrollbar({
  		axis:"x",
  		theme:"dark-thin",
  		autoExpandScrollbar:true,
  		advanced:{autoExpandHorizontalScroll:true}
  	});
  	
  	//horizontalmenu
  	$("a[data-theme]").on("click", function(e) {
  		$("head link#theme").attr("href", $(this).data("theme"));
  		$(this).toggleClass('active').siblings().removeClass('active');
  	});
  	$("a[data-effect]").on("click", function(e) {
  		$("head link#effect").attr("href", $(this).data("effect"));
  		$(this).toggleClass('active').siblings().removeClass('active');
  	});	
  	
  	//calender2
  	$('#calendar').tuiCalendar;
  	
  })(jQuery);
  
  $(function(e) {
  		  /** Constant div card */
  	  const DIV_CARD = 'div.card';
  	  /** Initialize tooltips */
  	  $('[data-toggle="tooltip"]').tooltip();
  
  	  /** Initialize popovers */
  	  $('[data-toggle="popover"]').popover({
  		html: true
  	  });
  			 /** Function for remove card */
  	  $('[data-toggle="card-remove"]').on('click', function(e) {
  		let $card = $(this).closest(DIV_CARD);
  
  		$card.remove();
  
  		e.preventDefault();
  		return false;
  	  });
  
  	  /** Function for collapse card */
  	  $('[data-toggle="card-collapse"]').on('click', function(e) {
  		let $card = $(this).closest(DIV_CARD);
  
  		$card.toggleClass('card-collapsed');
  
  		e.preventDefault();
  		return false;
  	  });
  	  $('[data-toggle="card-fullscreen"]').on('click', function(e) {
  		let $card = $(this).closest(DIV_CARD);
  
  		$card.toggleClass('card-fullscreen').removeClass('card-collapsed');
  
  		e.preventDefault();
  		return false;
  	  });
    });
  
  
  