@@ -83,6 +83,75 @@ <h2 class="vert-section-title">Sound interesting?</h2>
83
83
84
84
{% include blog-related.html %}
85
85
86
- {% include footer.html extrascripts=page.extrascripts %}
86
+ {% include footer.html %}
87
+
88
+ < script >
89
+ // Health - change header colour
90
+ var healthHeaderContainer = $ ( '.health .gbl-head' ) ;
91
+ if ( healthHeaderContainer . length > 0 ) {
92
+ var healthPatient ;
93
+ var healthResearch ;
94
+ var healthInnovation ;
95
+ var healthContact ;
96
+
97
+ var scrollPositions = function ( ) {
98
+ healthPatient = $ ( '#patientcentricity' ) ;
99
+ healthResearch = $ ( '#smartresearch' ) ;
100
+ healthInnovation = $ ( '#bottomupinnovation' ) ;
101
+ healthContact = $ ( '#vertcontact' ) ;
102
+ } ;
103
+
104
+ var headerBG = function ( ) {
105
+ var windowTop = $ ( window ) . scrollTop ( ) ;
106
+ if ( windowTop > healthInnovation . offset ( ) . top - 100 || healthInnovation . offset ( ) . bottom ) {
107
+ healthHeaderContainer . css ( { 'background-color' :'#37bec0' } ) ;
108
+ } else if ( windowTop > healthResearch . offset ( ) . top - 100 || healthResearch . offset ( ) . bottom ) {
109
+ healthHeaderContainer . css ( { 'background-color' :'#9b5ca4' } ) ;
110
+ } else if ( windowTop > healthPatient . offset ( ) . top - 100 || healthPatient . offset ( ) . bottom ) {
111
+ healthHeaderContainer . css ( { 'background-color' :'#0ea2dc' } ) ;
112
+ } else {
113
+ healthHeaderContainer . css ( { 'background-color' :'#37bec0' } ) ;
114
+ }
115
+ } ;
116
+
117
+ $ ( window ) . resize ( scrollPositions ) . scroll ( headerBG ) ;
118
+ scrollPositions ( ) ;
119
+ headerBG ( ) ;
120
+ }
121
+
122
+ // Transport - change header colour
123
+ var transportHeaderContainer = $ ( '.transport .gbl-head' ) ;
124
+ if ( transportHeaderContainer . length > 0 ) {
125
+ var transportRail ;
126
+ var transportTech ;
127
+ var transportFuture ;
128
+ var transportContact ;
129
+
130
+ var scrollPositions = function ( ) {
131
+ transportRail = $ ( '#railservice' ) ;
132
+ transportTech = $ ( '#transporttechnology' ) ;
133
+ transportFuture = $ ( '#imaginingthefuture' ) ;
134
+ transportContact = $ ( '#vertcontact' ) ;
135
+ } ;
136
+
137
+ var headerBG = function ( ) {
138
+ var windowTop = $ ( window ) . scrollTop ( ) ;
139
+ if ( windowTop > transportFuture . offset ( ) . top - 100 || transportFuture . offset ( ) . bottom ) {
140
+ transportHeaderContainer . css ( { 'background-color' :'#9b5ca4' } ) ;
141
+ } else if ( windowTop > transportTech . offset ( ) . top - 100 || transportTech . offset ( ) . bottom ) {
142
+ transportHeaderContainer . css ( { 'background-color' :'#a4ce4e' } ) ;
143
+ } else if ( windowTop > transportRail . offset ( ) . top - 100 || transportRail . offset ( ) . bottom ) {
144
+ transportHeaderContainer . css ( { 'background-color' :'#37bec0' } ) ;
145
+ } else {
146
+ transportHeaderContainer . css ( { 'background-color' :'#0ea2dc' } ) ;
147
+ }
148
+ } ;
149
+
150
+ $ ( window ) . resize ( scrollPositions ) . scroll ( headerBG ) ;
151
+ scrollPositions ( ) ;
152
+ headerBG ( ) ;
153
+ }
154
+ </ script >
155
+
87
156
</ body >
88
157
</ html>
0 commit comments