@@ -120,7 +120,7 @@ function detectmob() {
120
120
}
121
121
122
122
function setNavigation ( ) {
123
- $ ( ".nav a " ) . removeClass ( 'active' ) ;
123
+ $ ( ".nav li " ) . removeClass ( 'active' ) ;
124
124
var path = window . location . pathname ;
125
125
126
126
$ ( ".nav a" ) . each ( function ( ) {
@@ -162,13 +162,21 @@ function loadFacebook() {
162
162
}
163
163
164
164
function loadTwitterWidget ( ) {
165
- var js , fjs = document . getElementsByTagName ( "script" ) [ 0 ] ;
166
- if ( document . getElementById ( "twitter-wjs" ) ) return ;
165
+ var js , fjs = document . getElementsByTagName ( "script" ) [ 0 ] ,
166
+ t = window . twtter || { } ;
167
+ if ( document . getElementById ( "twitter-wjs" ) ) return t ;
167
168
js = document . createElement ( "script" ) ;
168
169
js . async = true ;
169
170
js . id = "twitter-wjs" ;
170
171
js . src = "//platform.twitter.com/widgets.js" ;
171
172
fjs . parentNode . insertBefore ( js , fjs ) ;
173
+
174
+ t . _e = [ ] ;
175
+ t . ready = function ( f ) {
176
+ t . _e . push ( f ) ;
177
+ } ;
178
+
179
+ return t ;
172
180
}
173
181
174
182
@@ -186,9 +194,7 @@ function reloadSocial() {
186
194
// http://www.blackfishweb.com/blog/asynchronously-loading-twitter-google-facebook-and-linkedin-buttons-and-widgets-ajax-bonus
187
195
188
196
// Twitter widget
189
- twttr . widgets . load (
190
- document . getElementById ( 'social-links' )
191
- ) ;
197
+ twttr . widgets . load ( ) ;
192
198
193
199
// Facebook
194
200
if ( typeof ( FB ) != 'undefined' ) {
@@ -199,8 +205,7 @@ function reloadSocial() {
199
205
} )
200
206
}
201
207
202
- // Google - Note that the google button will not show if you are opening the page from disk
203
- // it needs to be http(s)
208
+ // Google+; Note that google button will not show if page is opened from disk
204
209
if ( typeof ( gapi ) != 'undefined' ) {
205
210
delete gapi ;
206
211
$ . getScript ( '//apis.google.com/js/plusone.js' ) ;
0 commit comments