custom.js
1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(function ($) {
new gnMenu( document.getElementById( 'gn-menu' ) );
//jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('.gn-menu li a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
$('a.scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo');
event.preventDefault();
});
});
//nivo lightbox
$('.gallery-item a').nivoLightbox({
effect: 'fadeScale', // The effect to use when showing the lightbox
theme: 'default', // The lightbox theme to use
keyboardNav: true, // Enable/Disable keyboard navigation (left/right/escape)
clickOverlayToClose: true, // If false clicking the "close" button will be the only way to close the lightbox
onInit: function(){}, // Callback when lightbox has loaded
beforeShowLightbox: function(){}, // Callback before the lightbox is shown
afterShowLightbox: function(lightbox){}, // Callback after the lightbox is shown
beforeHideLightbox: function(){}, // Callback before the lightbox is hidden
afterHideLightbox: function(){}, // Callback after the lightbox is hidden
onPrev: function(element){}, // Callback when the lightbox gallery goes to previous item
onNext: function(element){}, // Callback when the lightbox gallery goes to next item
errorMessage: 'The requested content cannot be loaded. Please try again later.' // Error message when content can't be loaded
});
})(jQuery);