1var jQ = jQuery.noConflict(); 2 3jQ(document).ready(function () { 4 /*function accord() { 5 setTimeout(function(){ 6 jQ('a[aria-expanded="false"]').removeClass('stop'); 7 jQ('a[aria-expanded="true"]').addClass('stop'); 8 }, 500); 9}*/ 10 /*var targ = jQ('#accordion .panel-heading').first().find('a').attr('href'); 11 12 jQ('#accordion .panel-heading').first().find('a').attr('href',' '); 13 14 jQ('#accordion .panel-heading a').click(function(e){ 15 jQ('#accordion .panel-heading a[aria-expanded="true"]').attr('href',targ); 16 var targ = jQ(this).attr('href'); 17 jQ(this).attr('href',' '); 18 });*/ 19 20 /*START Include Dropdown Button--------------------*/ 21 22 var itemBtn = 23 '<button class="dropdown-toggle dropdown-btn"><span class="caret"></span></button>'; 24 25 jQ("header #navigation .nav .dropdown a").after(itemBtn); 26 27 jQ( 28 "#menu-cleaner-commute .dropdown a:not(#menu-cleaner-commute .dropdown .dropdown-menu a)" 29 ).after(itemBtn); 30 31 jQ( 32 "#menu-greenfest .dropdown a:not(#menu-greenfest .dropdown .dropdown-menu a)" 33 ).after(itemBtn); 34 35 jQ( 36 "#menu-run-for-clean-air .dropdown a:not(#menu-run-for-clean-air .dropdown .dropdown-menu a)" 37 ).after(itemBtn); 38 39 jQ( 40 "#menu-dine-out-for-the-environment .dropdown a:not(#menu-dine-out-for-the-environment .dropdown .dropdown-menu a)" 41 ).after(itemBtn); 42 43 /*END Include Dropdown Button--------------------*/ 44 45 function leftArrowPressed() { 46 // alert("it works in"); 47 jQ(".dropdown-menu, .menu-item").removeClass("parent-menu"); 48 var focused = document.activeElement; 49 var dropdown_menu = jQ(focused).parent().hasClass("dropdown-menu"); 50 var menu_item = jQ(focused).parent().hasClass("menu-item"); 51 var dropdown_menu_p2 = jQ(focused) 52 .parent() 53 .parent() 54 .hasClass("dropdown-menu"); 55 var menu_item_p2 = jQ(focused).parent().parent().hasClass("menu-item"); 56 var dropdown_menu_p3 = jQ(focused) 57 .parent() 58 .parent() 59 .parent() 60 .hasClass("dropdown-menu"); 61 var menu_item_p3 = jQ(focused) 62 .parent() 63 .parent() 64 .parent() 65 .hasClass("menu-item"); 66 var dropdown_menu_p4 = jQ(focused) 67 .parent() 68 .parent() 69 .parent() 70 .hasClass("dropdown-menu"); 71 var menu_item_p4 = jQ(focused) 72 .parent() 73 .parent() 74 .parent() 75 .hasClass("menu-item"); 76 var dropdown_menu_p5 = jQ(focused) 77 .parent() 78 .parent() 79 .parent() 80 .hasClass("dropdown-menu"); 81 var menu_item_p5 = jQ(focused) 82 .parent() 83 .parent() 84 .parent() 85 .hasClass("menu-item"); 86 if ( 87 dropdown_menu || 88 menu_item || 89 dropdown_menu_p2 || 90 menu_item_p2 || 91 dropdown_menu_p3 || 92 menu_item_p3 || 93 dropdown_menu_p4 || 94 menu_item_p4 || 95 dropdown_menu_p5 || 96 menu_item_p5 97 ) { 98 // alert("it works in"); 99 jQ(focused).parent().addClass("parent-menu"); 100 jQ(focused).parent().parent().addClass("parent-menu"); 101 jQ(focused).parent().parent().parent().addClass("parent-menu"); 102 jQ(focused).parent().parent().parent().parent().addClass("parent-menu"); 103 jQ(focused) 104 .parent() 105 .parent() 106 .parent() 107 .parent() 108 .parent() 109 .addClass("parent-menu"); 110 } 111 } 112 // function upArrowPressed() { 113 // var focused = document.activeElement; 114 // jQ(focused).parent().parent().addClass('parent-menu'); 115 // } 116 function rightArrowPressed() { 117 jQ(".dropdown-menu, .menu-item").removeClass("parent-menu"); 118 var focused = document.activeElement; 119 var dropdown_menu = jQ(focused).parent().hasClass("dropdown-menu"); 120 var menu_item = jQ(focused).parent().hasClass("menu-item"); 121 var dropdown_menu_p2 = jQ(focused) 122 .parent() 123 .parent() 124 .hasClass("dropdown-menu"); 125 var menu_item_p2 = jQ(focused) 126 .parent() 127 .parent() 128 .parent() 129 .hasClass("menu-item"); 130 var dropdown_menu_p3 = jQ(focused) 131 .parent() 132 .parent() 133 .parent() 134 .hasClass("dropdown-menu"); 135 var menu_item_p3 = jQ(focused) 136 .parent() 137 .parent() 138 .parent() 139 .hasClass("menu-item"); 140 var dropdown_menu_p4 = jQ(focused) 141 .parent() 142 .parent() 143 .parent() 144 .hasClass("dropdown-menu"); 145 var menu_item_p4 = jQ(focused) 146 .parent() 147 .parent() 148 .parent() 149 .hasClass("menu-item"); 150 var dropdown_menu_p5 = jQ(focused) 151 .parent() 152 .parent() 153 .parent() 154 .hasClass("dropdown-menu"); 155 var menu_item_p5 = jQ(focused) 156 .parent() 157 .parent() 158 .parent() 159 .hasClass("menu-item"); 160 if ( 161 dropdown_menu || 162 menu_item || 163 dropdown_menu_p2 || 164 menu_item_p2 || 165 dropdown_menu_p3 || 166 menu_item_p3 || 167 dropdown_menu_p4 || 168 menu_item_p4 || 169 dropdown_menu_p5 || 170 menu_item_p5 171 ) { 172 // alert("it works in"); 173 jQ(focused).parent().addClass("parent-menu"); 174 jQ(focused).parent().parent().addClass("parent-menu"); 175 jQ(focused).parent().parent().parent().addClass("parent-menu"); 176 jQ(focused).parent().parent().parent().parent().addClass("parent-menu"); 177 jQ(focused) 178 .parent() 179 .parent() 180 .parent() 181 .parent() 182 .parent() 183 .addClass("parent-menu"); 184 } 185 } 186 // function downArrowPressed() { 187 // var focused = document.activeElement; 188 // jQ(focused).parent().parent().addClass('parent-menu'); 189 // } 190 document.onkeydown = function (evt) { 191 evt = evt || window.event; 192 switch (evt.keyCode) { 193 case 37: 194 leftArrowPressed(); 195 break; 196 // case 38: 197 // upArrowPressed(); 198 // break; 199 case 39: 200 rightArrowPressed(); 201 break; 202 // case 40: 203 // downArrowPressed(); 204 // break; 205 } 206 }; 207 208 /*START Font Resize--------------------*/ 209 jQ(".font-resizer p").click(function () { 210 jQ(".font-resizer").toggleClass("active"); 211 }); 212 213 jQ("#small").click(function (event) { 214 event.preventDefault();
215 curSize = parseInt(jQ("html,body").css("font-size")) - 2; 216 if (curSize >= 12) jQ("html,body").css("font-size", curSize); 217 }); 218 jQ("#large").click(function (event) { 219 event.preventDefault(); 220 curSize = parseInt(jQ("html,body").css("font-size")) + 2; 221 if (curSize <= 25) jQ("html,body").css("font-size", curSize); 222 }); 223 224 jQ("#medium").click(function (event) { 225 event.preventDefault(); 226 jQ("html,body").animate({ "font-size": "14px" }); 227 }); 228 /*END Font Resize--------------------*/ 229 230 /*START Search--------------------*/ 231 232 jQ("header #searchform").after('<a class="fa fa-search"></a>'); 233 //jQ( 'header #s').before('<a class="fa fa-times"></a>'); 234 235 jQ("header .fa-search").click(function (event) { 236 event.preventDefault(); 237 jQ("header #searchform").toggleClass("show"); 238 jQ(this).toggleClass("fa-times"); 239 }); 240 /* jQ('header .fa-times').click(function(event) { 241 event.preventDefault(); 242 jQ( 'header #searchform').removeClass('show'); 243 jQ('header .fa-search').removeClass('hide'); 244 });*/ 245 /*END Search--------------------*/ 246 247 /*START Activate Bootstrap Slider--------------------*/ 248 249 jQ("#news-slider .item").first().addClass("active"); 250 jQ("#sponsors-slider .item").first().addClass("active"); 251 jQ("#testimonials-slider .item").first().addClass("active"); 252 253 /*END Activate Bootstrap Slider--------------------*/ 254 255 /*START Slider Touchable--------------------*/ 256 257 jQ("#home-slider").swiperight(function () { 258 jQ(this).carousel("prev"); 259 }); 260 261 jQ("#home-slider").swipeleft(function () { 262 jQ(this).carousel("next"); 263 }); 264 265 // START Home Slider 266 itemswrap("#home-slider .slider-box", 1, '<div class="item"></div>'); 267 /*START Carousel Indicators--------------------*/ 268 var indicators = jQ("#home-slider .item").size(); 269 270 var row = jQ('<li data-target="#home-slider"></li>'); 271 272 for (var i = 0; i < indicators; i++) { 273 jQ("#home-slider .carousel-indicators").append(row.clone()); 274 } 275 276 var counter = -1; 277 jQ("#home-slider .carousel-indicators li").each(function () { 278 counter++; 279 var self = jQ(this); 280 self.attr("data-slide-to", counter); 281 }); 282 283 jQ("#home-slider .carousel-indicators li").first().addClass("active"); 284 285 /*---------------------*/ 286 287 288 /*START Dropdown Main Menu Animation--------------------*/ 289 /* 290 jQ('.dropdown, .dropdown-menu').hover(function(){ 291 jQ(this).children('.dropdown-menu').stop(true, true).slideDown("slow"); 292 }, function(){ 293 jQ(this).children('.dropdown-menu').stop(true, true).slideUp("fast"); 294 }); 295*/ 296 jQ(".dropdown-btn").click(function () { 297 jQ(this).next().slideToggle("fast"); 298 }); 299 300 /*jQ('.navbar-toggle').click(function () { 301 jQ('.navbar-brand').slideToggle('fast'); 302 });*/ 303 304 /*END Dropdown Main Menu Animation--------------------*/ 305 /*START Show and hide boxes */ 306 307 jQ(".c .right .programs").first().css("display", "block"); 308 309 jQ(".c .left .info a").click(function (event) { 310 event.preventDefault(); 311 var goTo = jQ(this).attr("data-target"); 312 console.log(goTo); 313 jQ(".c .right .programs").slideUp(); 314 jQ("#" + goTo).slideDown(); 315 }); 316 317 var programContainer = jQ(".c .left").height(); 318 319 jQ(".c .right").css("min-height", programContainer); 320 321 /*START Carousel Indicators News--------------------*/ 322 var indicators = jQ("#news-slider .item").size(); 323 324 var row = jQ('<li data-target="#news-slider"></li>'); 325 326 for (var i = 0; i < indicators; i++) { 327 jQ("#news-slider .carousel-indicators").append(row.clone()); 328 } 329 330 var counter = -1; 331 jQ("#news-slider .carousel-indicators li").each(function () { 332 counter++; 333 var self = jQ(this); 334 self.attr("data-slide-to", counter); 335 }); 336 337 jQ("#news-slider .carousel-indicators li").first().addClass("active"); 338 339 /*START Carousel Indicators Testimonials--------------------*/ 340 var indicators = jQ("#testimonials-slider .item").size(); 341 342 var row = jQ('<li data-target="#testimonials-slider"></li>'); 343 344 for (var i = 0; i < indicators; i++) { 345 jQ("#testimonials-slider .carousel-indicators").append(row.clone()); 346 } 347 348 var counter = -1; 349 jQ("#testimonials-slider .carousel-indicators li").each(function () { 350 counter++; 351 var self = jQ(this);
352 self.attr("data-slide-to", counter); 353 }); 354 355 jQ("#testimonials-slider .carousel-indicators li").first().addClass("active"); 356 357 /*START Sign Up (Change word of submit button)--------------------*/ 358 359 jQ(".sign-up-widget .salsa-form #salsa-submit").attr("value", "submit"); 360 jQ(".sign-up-widget .salsa-form #salsa-submit") 361 .parent(".salsa-input") 362 .addClass("send"); 363 jQ(".sign-up-widget .salsa-form #Email").attr( 364 "placeholder", 365 "Your Email Here..." 366 ); 367 368 /*START Special color interior top title --------------------*/ 369 370 /*jQ('.interior-top h1').html(function (i, html) { 371 return html.replace(/(\w+\s\w+)/, '<span>$1</span><br/>') 372 });*/ 373 374 /*jQ('.d h2').html(function (i, html) { 375 return html.replace(/(\w++\s)/, '<span>$1</span>') 376 });*/ 377 378 /*START Same height boxes--------------------*/ 379 380 var imgBox = 0; 381 jQ(".b .bottom .box-1").each(function () { 382 if (jQ(this).height() > imgBox) { 383 imgBox = jQ(this).height(); 384 } 385 }); 386 jQ(".b .bottom .box-1").height(imgBox); 387 388 var dBox = 0; 389 jQ(".d").each(function () { 390 if (jQ(this).height() > dBox) { 391 dBox = jQ(this).height(); 392 } 393 }); 394 jQ(".d .d-left").height(dBox + 38); 395 jQ(".d .d-right").height(dBox + 40); 396 397 var sponsorHeight = jQ("#sponsors-slider").height(); 398 399 jQ("#sponsors-slider .item").height(sponsorHeight); 400 401 /*START ARROW DOWN*/ 402 jQ("a.slide-down").click(function () { 403 if ( 404 location.pathname.replace(/^\//, "") == 405 this.pathname.replace(/^\//, "") && 406 location.hostname == this.hostname 407 ) { 408 var target = jQ(this.hash); 409 target = target.length ? target : jQ("[name=" + this.hash.slice(1) + "]"); 410 if (target.length) { 411 jQ("html,body").animate( 412 { 413 scrollTop: target.offset().top, 414 }, 415 750 416 ); 417 return false; 418 } 419 } 420 }); 421 /*START less window width--------------------*/ 422 423 if (jQ(window).width() < 992) { 424 /*START Search--------------------*/ 425 426 /* jQ('header .fa-search').click(function(event) { 427 event.preventDefault(); 428 jQ( 'header .translate').addClass('hide'); 429 jQ( 'header .font-resizer').addClass('hide'); 430 jQ( 'header #searchform').addClass('show'); 431 jQ(this).addClass('hide'); 432 }); 433 jQ('header .fa-times').click(function(event) { 434 event.preventDefault(); 435 jQ( 'header .translate').removeClass('hide'); 436 jQ( 'header .font-resizer').removeClass('hide'); 437 jQ( 'header #searchform').removeClass('show'); 438 jQ('header .fa-search').removeClass('hide'); 439 }); 440*/ 441 /*END Search--------------------*/ 442 443 jQ(".c .left .info a").unbind(); 444 jQ(function () { 445 jQ(".c .left .info a").click(function () { 446 if ( 447 location.pathname.replace(/^\//, "") == 448 this.pathname.replace(/^\//, "") && 449 location.hostname == this.hostname 450 ) { 451 var target = jQ(this.hash); 452 target = target.length 453 ? target 454 : jQ("[name=" + this.hash.slice(1) + "]"); 455 if (target.length) { 456 jQ("html,body").animate( 457 { 458 scrollTop: target.offset().top - 50, 459 }, 460 1500 461 ); 462 return false; 463 } 464 } 465 }); 466 }); 467 } 468 if (jQ(window).width() < 767) { 469 /*START Dropdown Main Menu Animation--------------------*/ 470 jQ("header #navigation .nav .dropdown .dropdown-menu").css( 471 "display", 472 "none" 473 ); 474 jQ("#menu-cleaner-commute .dropdown .dropdown-menu").css("display", "none"); 475 jQ("#menu-greenfest .dropdown .dropdown-menu").css("display", "none"); 476 jQ("#menu-run-for-clean-air .dropdown .dropdown-menu").css( 477 "display", 478 "none" 479 ); 480 jQ("#menu-dine-out-for-the-environment .dropdown .dropdown-menu").css( 481 "display", 482 "none" 483 ); 484 // jQ(".dropdown, .dropdown-menu .dropdown").unbind(); 485 486 /* jQ(".navbar-header button.navbar-toggle").click(function(event) { 487 event.preventDefault(); 488 jQ("#navigation .dropdown-menu").css('display', 'none');; 489 });*/ 490 /*END Dropdown Main Menu Animation--------------------*/ 491 492 jQ("header .fa-search").click(function () { 493 jQ(".top-right .btn-donate").toggleClass("hide"); 494 }); 495 } 496 497 /*END less window width--------------------*/ 498}); 499 500/*FUNCTION SLOW ANIMATION ANCHOR LINKS-------------------------------*/ 501 502/* 503 jQ(function() { 504 jQ('a[href*="#"]').click(function() { 505 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 506 507 var target = jQ(this.hash); 508 target = target.length ? target : jQ('[name=' + this.hash.slice(1) +']'); 509 if (target.length) { 510 jQ('html,body').animate({ 511 scrollTop: target.offset().top 512 }, 2000); 513 return false;
514 } 515 } 516 }); 517 }); 518 */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.