footer.php
4.46 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<footer id="new-footer">
<div id="footer-sidebar" class="secondary clear">
<div id="footer-sidebar1">
<?php
if (is_active_sidebar('footer-sidebar-1')) {
dynamic_sidebar('footer-sidebar-1');
}
?>
</div>
<div id="footer-sidebar2">
<?php
if (is_active_sidebar('footer-sidebar-2')) {
dynamic_sidebar('footer-sidebar-2');
}
?>
</div>
<div id="footer-sidebar3">
<?php
if (is_active_sidebar('footer-sidebar-3')) {
dynamic_sidebar('footer-sidebar-3');
}
?>
</div>
</div>
<!-- Change cookie name for new banner -->
<script type='text/javascript'>
jQuery( document ).ready(function($) {
if(getCookie('CWL-viewed-COVID-19-current-policy')){
$('#COVID-19-home-info-bar').addClass('hide');
}else{
$('#COVID-19-home-info-bar').removeClass('hide');
setTimeout(function() {
$('#COVID-19-home-info-bar').addClass('expand');
}, 100);
}
$(document).on("click",".closeHomeBanner , .readHomeBanner", function() {
setCookie('viewed-home-COVID-19-current-policy', true, 1);
$('#COVID-19-home-info-bar').addClass('hide');
});
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays * 60 * 60 * 1000));
var expires = "expires="+d.toUTCString();
var host = window.location.hostname;
var domain_only = host.substr(host.indexOf("."))
if(domain_only == ".ca" || domain_only == ".com" || domain_only == ".test") {
domain_only = "."+window.location.hostname;
}
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/;Domain="+domain_only;
}
function getCookie(c_name) {
var c_value = document.cookie,
c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1) c_start = c_value.indexOf(c_name + "=");
if (c_start == -1) {
c_value = null;
} else {
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1) {
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start, c_end));
}
return c_value;
}
});
</script>
</footer>
</div><!-- end of content-wrap -->
<script type='text/javascript'>
function scrollScripts() {
if(!jQuery('#content-wrap').hasClass('retract')) {
if(jQuery(window).scrollTop() >= 100) {
jQuery('#content-wrap').addClass('retract');
jQuery('.sidenav').addClass('retract');
}
} else {
if(jQuery(window).scrollTop() < 100) {
jQuery('#content-wrap').removeClass('retract');
jQuery('.sidenav').removeClass('retract');
}
}
}
var scrolling = false;
jQuery( window ).scroll( function() {
scrolling = true;
});
jQuery('#side-window').scroll(function() {
scrolling = true;
});
setInterval( function() {
if ( scrolling ) {
scrolling = false;
scrollScripts();
}
}, 250 );
// or for modern browsers
document.addEventListener( 'wheel', function( evt ) {
scrolling = true;
}, { capture: false, passive: true });
scrollScripts();
</script>
<div class="modal fade" id="contact-modal" tabindex="-1" role="dialog" aria-labelledby="contact-modalTitle" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h5 class="modal-title" id="contact-modalTitle">Thank you for your request.</h5>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<?php wp_footer() ?>
</body>
</html>