PageSourceSearch

https://mouxenmorvan.fr/valera/js/custom.js

js mouxenmorvan.fr collected 2026-10-02 13:49:40 UTC 5,249 bytes, 169 lines download raw bytes

1/*global jQuery:false */
2(function ($) {
3
4
5	$(window).load(function(){
6      $("#navigation").sticky({ topSpacing: 0 });
7    });
8	
9
10	wow = new WOW(
11      {
12        animateClass: 'animated',
13        offset:       0
14      }
15    );
16    wow.init();
17
18	$('ul.nav li.dropdown').hover(function() {
19	  $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
20	}, function() {
21	  $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
22	});	
23
24	
25	//jQuery to collapse the navbar on scroll
26	$(window).scroll(function() {
27		if ($(".navbar").offset().top > 50) {
28			$(".navbar-fixed-top").addClass("top-nav-collapse");
29		} else {
30			$(".navbar-fixed-top").removeClass("top-nav-collapse");
31		}
32	});
33	
34	//jQuery for page scrolling feature - requires jQuery Easing plugin
35	$(function() {
36		$('.navbar-nav li a').bind('click', function(event) {
37			var $anchor = $(this);
38			var nav = $($anchor.attr('href'));
39			if (nav.length) {
40			$('html, body').stop().animate({				
41				scrollTop: $($anchor.attr('href')).offset().top				
42			}, 1500, 'easeInOutExpo');
43			
44			event.preventDefault();
45			}
46		});
47		$('a.totop,a#btn-scroll,a.btn-slide').bind('click', function(event) {
48			var $anchor = $(this);
49			$('html, body').stop().animate({
50				scrollTop: $($anchor.attr('href')).offset().top
51			}, 1500, 'easeInOutExpo');
52			event.preventDefault();
53		});
54	});
55	
56	//home slider
57	jQuery('#valera-slippry').slippry({
58	pager: false
59	
60	});
61	
62	$('.testimonialslide').flexslider({
63	animation: "slide",
64	slideshow: false,
65	directionNav:false,
66	controlNav: true
67	});
68	
69	//owl carousel
70	$('#owl-works').owlCarousel({
71            items : 4,
72            itemsDesktop : [1199,5],
73            itemsDesktopSmall : [980,5],
74            itemsTablet: [768,5],
75            itemsTabletSmall: [550,2],
76            itemsMobile : [480,2],
77        });
78	
79	//nivo lightbox
80	$('.owl-carousel .item a').nivoLightbox({
81		effect: 'fadeScale',                             // The effect to use when showing the lightbox
82		theme: 'default',                           // The lightbox theme to use
83		keyboardNav: true,                          // Enable/Disable keyboard navigation (left/right/escape)
84		clickOverlayToClose: true,                  // If false clicking the "close" button will be the only way to close the lightbox
85		onInit: function(){},                       // Callback when lightbox has loaded
86		beforeShowLightbox: function(){},           // Callback before the lightbox is shown
87		afterShowLightbox: function(lightbox){},    // Callback after the lightbox is shown
88		beforeHideLightbox: function(){},           // Callback before the lightbox is hidden
89		afterHideLightbox: function(){},            // Callback after the lightbox is hidden
90		onPrev: function(element){},                // Callback when the lightbox gallery goes to previous item
91		onNext: function(element){},                // Callback when the lightbox gallery goes to next item
92		errorMessage: 'The requested content cannot be loaded. Please try again later.' // Error message when content can't be loaded
93	});
94	
95
96	jQuery('.appear').appear();
97	jQuery(".appear").on("appear", function(data) {
98			var id = $(this).attr("id");
99			jQuery('.nav li').removeClass('active');
100			jQuery(".nav a[href='#" + id + "']").parent().addClass("active");					
101		});
102		
103		//stats
104		var runOnce = true;
105		jQuery(".stats").on("appear", function(data) {
106			var counters = {};
107			var i = 0;
108			if (runOnce){
109				jQuery('.number').each(function(){
110					counters[this.id] = $(this).html();
111					i++;
112				});
113				jQuery.each( counters, function( i, val ) {
114					//console.log(i + ' - ' +val);
115					jQuery({countNum: 0}).animate({countNum: val}, {
116					  duration: 3000,
117					  easing:'linear',
118					  step: function() {
119						jQuery('#'+i).text(Math.floor(this.countNum));
120					  }
121					});
122				});
123				runOnce = false;
124			}
125		});
126		
127		//parallax
128        if ($('#parallax1').length  || $('#parallax2').length)
129        {
130			$(window).stellar({
131				responsive:true,
132                scrollProperty: 'scroll',
133                parallaxElements: false,
134                horizontalScrolling: false,
135                horizontalOffset: 0,
136                verticalOffset: 0
137            });
138
139        }
140		
141		//video bg
142		$(".bg-player").mb_YTPlayer();
143		
144	$("#js-rotating").Morphext({
145		// Animation type (refer to Animate.css for a list of available animations)
146		animation: "fadeInDown",
147		// An array of words to rotate are created based on this separator. Change it if you wish to 
147separate the words differently (e.g. So Simple | Very Doge | Much Wow | Such Cool)
148		separator: ",",
149		// The delay between each word in milliseconds
150		speed: 3000
151	});
152		
153	//nicescroll
154	$("html").niceScroll({zindex:999,cursorborder:"",cursorborderradius:"0px",cursorwidth:"10px",cursorcolor:"#555",cursoropacitymin:.5});
155	function initNice() {
156		if($(window).innerWidth() <= 960) {
157			$('html').niceScroll().remove();
158		} else {
159			$("html").niceScroll({zindex:999,cursorborder:"",cursorborderradius:"2px",cursorcolor:"#555",cursoropacitymin:.1});
160		}
161	}
162	$(window).load(initNice);
163	$(window).resize(initNice);
164	
165})(jQuery);
166$(window).load(function() {
167	$(".loader").delay(300).fadeOut();
168	$("#page-loader").delay(500).fadeOut("slow");
169});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.