// JavaScript Document jQuery(document).ready(function($) { "use strict"; $(window).on('load', function() { //parallax scripts $('section.vc_parallax').each(function(){ var opacity = $(this).data('opacity'); var size = $(this).data('size'); var position = $(this).data('position'); var repeat = $(this).data('repeat'); var attachment = $(this).data('attachment'); var width = $(this).data('width'); $(this).find('.vc_parallax-inner').css({ opacity: opacity, backgroundSize: size, backgroundPosition: position, backgroundRepeat: repeat, backgroundAttachment: attachment, width: width }); }); genemy_setup_navwidth(); /*----------------------------------------------------*/ /* Preloader /*----------------------------------------------------*/ $("#loader").delay(100).fadeOut(); $("#loader-wrapper").delay(100).fadeOut("fast"); $(window).stellar({}); }); $(window).on('scroll', function() { /*----------------------------------------------------*/ /* Navigtion Menu Scroll /*----------------------------------------------------*/ var b = $(window).scrollTop(); if( b > 72 ){ $(".navbar").addClass("scroll"); } else { $(".navbar").removeClass("scroll"); } genemy_setup_navwidth(); }); function genemy_setup_navwidth(){ $('.navbar-nav > .nav-item').addClass('nl-simple'); if( $(window).width() < 992 ) return false; var navbarWidth = $('.navbar-nav').innerWidth(); var navItemWidth = 0; var count = 1; $('.navbar-nav > .nav-item').each(function(){ navItemWidth += parseInt($(this).outerWidth(true)); if(navItemWidth > navbarWidth){ $(this).addClass('nav-item-overflowed'); var more = count-3; //$('.navbar-nav > li:gt('+more+')').wrapAll('