blob: 5c4001531ab7bf4a7660dcebd12918bce2c6f7b9 (
plain) (
blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/*-----------------------------------------------------------------------------------
/*
/* Now JS
/*
-----------------------------------------------------------------------------------*/
jQuery(document).ready(function($) {
/*----------------------------------------------------*/
/* FitText Settings
------------------------------------------------------ */
setTimeout(function() {
$('h1.responsive-headline').fitText(1, { minFontSize: '40px', maxFontSize: '90px' });
}, 100);
/*----------------------------------------------------*/
/* Make sure that #header-background-image height is
/* equal to the browser height.
------------------------------------------------------ */
$(window).on('resize', function() {
$('body').css({ 'width': $(window).width() })
});
/*----------------------------------------------------*/
/* Fade In/Out Primary Navigation
------------------------------------------------------*/
$(window).on('scroll', function() {
var h = $('header').height();
var y = $(window).scrollTop();
var nav = $('#nav-wrap');
if ( (y > h*.20) && (y < h) && ($(window).outerWidth() > 768 ) ) {
nav.fadeOut('fast');
}
else {
if (y < h*.20) {
nav.removeClass('opaque').fadeIn('fast');
}
else {
nav.addClass('opaque').fadeIn('fast');
}
}
});
});
|