Newer
Older
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
jQuery(document).ready(function(){
//set sidebar height to match height of content on page
if(jQuery(".page-node-type-page .main-container section").height() > jQuery(".page-node-type-page .main-container aside").height()) {
jQuery(".page-node-type-page .main-container aside").css({'height':(jQuery(".page-node-type-page .main-container section").height()+'px')});
}
//adds fontawesome arrow to menu
//check if is iPhone
function isiPhone(){
return (
(navigator.platform.indexOf("iPhone") != -1) ||
(navigator.platform.indexOf("iPod") != -1)
);
}
//check if menu in mobile view
if (jQuery('#superfish-main-accordion')[0]){
jQuery('.sf-accordion-button .svg-inline--fa').empty().replaceWith(function(){
return jQuery("<i class='fa fa-angle-up' aria-hidden='true' />").append(jQuery(this).contents());
});
//change arrow direction on click
jQuery('.sf-accordion-button').click(function(){
if ( jQuery(this).find("svg").hasClass('fa-angle-up') ) {
jQuery(this).find("svg").addClass( 'fa-angle-right' );
} else {
jQuery(this).find("svg").removeClass( 'fa-angle-right' ).addClass( 'fa-angle-up' );
}
});
} else {
jQuery('.sf-sub-indicator').empty().replaceWith(function(){
return jQuery("<i class='fa fa-angle-right' aria-hidden='true' />").append(jQuery(this).contents());
});
}
//accordions change fontawesome character
jQuery(".panel-title").click(function(){
//jQuery(this).find("svg").toggleClass('fa-angle-up', addOrRemove);
if ( jQuery(this).find("svg").hasClass('fa-angle-down') ) {
jQuery(this).find("svg").addClass( 'fa-angle-up' );
} else {
jQuery(this).find("svg").removeClass( 'fa-angle-up' ).addClass( 'fa-angle-down' );
}
});
//add class to last accordion in group
jQuery(".paragraph--type--accordion .panel:last-child").addClass( 'yell' );
//add div wrapper to news story card for flex grid
if (jQuery(".news-row")[0]){
jQuery( ".news-row" ).wrapInner( "<div class='inner-news-grid'></div>");
}
//add div wrapper to people profile card for flex grid
if (jQuery(".people-row")[0]){
jQuery( ".people-row" ).wrapInner( "<div class='inner-people-grid'></div>");
}
jQuery(".active-search").click(function() {
jQuery(".search-block-form").toggle();
jQuery(".search-block-form input[type='text']").focus();
});
//sets bgcolor for events, news, and people sections on homepage
if (jQuery(".region-events")[0] && jQuery(".region-people")[0]) {
jQuery( ".region-events" ).addClass( "block-bg-color" );
jQuery( ".region-people" ).addClass( "block-bg-color" );
}
if (jQuery(".region-news")[0] && !jQuery(".region-events")) {
jQuery( ".region-news" ).addClass( "block-bg-color" );
}
if (jQuery(".region-events")[0] && !jQuery(".region-news")) {
jQuery( ".region-events" ).addClass( "block-bg-color" );
}
if (!jQuery(".region-events") && !jQuery(".region-news")) {
jQuery( ".region-people" ).addClass( "block-bg-color" );
}
});