1//RESIZER.JS// 2 3function resizer() { 4 5 var windowWidth = parseInt($(window).width()); 6 7 if (windowWidth<320) 8 { 9 windowWidth = 320; 10 } 11 12 var menuWidth = parseInt($(window).width() * 0.8); 13 14 if (windowWidth < 640) { 15 16 if ($(".page-content").css('margin-left') != '0px' && !$(".page-content").is(':animated')) { 17 $('.mobile-menu').css('width', menuWidth + 'px'); 18 $('.mobile-menu-edge').css('left', menuWidth + 'px'); 19 openLeftMenu(0); 20 } 21 else { 22 $('.mobile-menu').css('width', menuWidth + 'px'); 23 $('.mobile-menu').css('left', '-' + menuWidth + 'px'); 24 $('.mobile-menu-edge').css('left', menuWidth + 'px'); 25 } 26 } 27 else { 28 closeLeftMenu(); 29 } 30 31 //REGEN PROJECT LOCATION MAPS// 32 33 $('#chinaMap').attr( 'src', function ( i, val ) { return val; }); 34 $('#thailandMap').attr( 'src', function ( i, val ) { return val; }); 35 36 //REGEN PROJECT MAPS// 37 38 if ((windowWidth <= 640 && $('#projects-map').height() == 3000) || (windowWidth > 640 && $('#projects-map').height() == 2000)) { 39 setTimeout(function(){genertateMap();}, 10); 40 } 41 42 if (windowWidth <= 640) { 43 $(".device-wrapper").attr("id","mobile"); 44 } 45 else if (windowWidth <= 1024) { 46 $(".device-wrapper").attr("id","tablet"); 47 } 48 else { 49 $(".device-wrapper").attr("id","desktop") 50 } 51 52
53 //FOOTER LANGUAGE CENTER 54 55 $(".footer-language").css("margin-left","0px"); 56 57 var thisWidth = $('.footer-language').outerWidth(); 58 var thisParentWidth = $(".footer-language-container").outerWidth(); 59 60 var thisMargin = (thisParentWidth/2) - (thisWidth/2) ; 61 62 $(".footer-language").css("margin-left",thisMargin + "px"); 63 64 //ROTATOR CONTENT CENTER 65 66 $('.rotator-content-flag').removeAttr('style'); 67 68 $('.rotator-content-flag').each(function(i, obj) { 69 70 if (windowWidth <= 1024) { 71 72 $(this).css("margin-top","0px"); 73 74 var rotatorHeight = $(".rotator").height(); 75 var thisHeight = $(this).parent().parent().height(); 76 var newMargin = (rotatorHeight/2) - (thisHeight/2); 77 78 $(this).css("margin-top",newMargin + "px"); 79 } 80 }); 81 82 //STORY BOXES 83 84 if (windowWidth > 640 && windowWidth < 900) { 85 $(".story-box").css("width","33.33333%"); 86 $(".story-boxes-ribbon-3").css("display","block"); 87 $(".story-boxes-ribbon-4").css("display","none"); 88 } 89 else if (windowWidth <= 640) { 90 $(".story-box").css("width","96%"); 91 $(".story-boxes-ribbon-3").css("display","none"); 92 $(".story-boxes-ribbon-4").css("display","none"); 93 } 94 else 95 { 96 $(".story-box").css("width","25%"); 97 $(".story-boxes-ribbon-3").css("display","none"); 98 $(".story-boxes-ribbon-4").css("display","block"); 99 } 100 101 //NEWS BOXES 102 103 if (windowWidth > 640 && windowWidth < 850) { 104 $(".news-box").css("width","47%"); 105 } 106 else if (windowWidth <= 640) { 107 $(".news-box").css("width","96%"); 108 } 109 else 110 { 111 $(".news-box").css("width","30.6666666666%"); 112 } 113 114 //BLOG BOXES 115 116 if (windowWidth > 640 && windowWidth < 850) { 117 $(".blog-box").css("width","47%"); 118 } 119 else if (windowWidth <= 640) { 120 $(".blog-box").css("width","96%"); 121 } 122 else 123 { 124 $(".blog-box").css("width","30.6666666666%") 125 } 126 127 //TG PAGE IMAGES 128 129 $(".totalgiving-page-image").css("height","0px"); 130 131 var thisWidth = $('.totalgiving-page-image').width(); 132 var thisHeight = thisWidth / 3.164556962025316 ; 133 134 $(".totalgiving-page-image").css("height",thisHeight + "px"); 135 136 //WHITE CONTENT BANNER 137 138 $(".white-content-banner").css("height","0px"); 139 140 var thisWidth = $('.white-content-banner').width(); 141 var thisHeight = thisWidth / 3.164556962025316 ; 142 143 $(".white-content-banner").css("height",thisHeight + "px"); 144 145 //MAP HEIGHT 146 147 $("#map-canvas").css("height","0px"); 148 149 var thisWidth = $("#map-canvas").width(); 150 var thisHeight = thisWidth / 1.65; 151 152 $("#map-canvas").css("height",thisHeight + "px"); 153 154 //HOME PROJECT BOX IMAGES 155 156 $(".home-project-box-image").css("height","0px"); 157 158 var thisWidth = $('.home-project-box').width(); 159 var thisHeight = thisWidth / 1.80456 ; 160 161 $(".home-project-box-image").css("height",thisHeight + "px"); 162 163 //HOME PROJECT BOX HEIGHTS 164 165 if (windowWidth > 640) { 166 167 $(".home-project-box").css("height","auto"); 168 169 var maxHeight = 0; 170 171 $('.home-project-box').each(function(i, obj) { 172 var thisHeight = $(this).height(); 173 if (thisHeight > maxHeight) 174 { 175 maxHeight = thisHeight; 176 } 177 }); 178 179 $(".home-project-box").css("height",maxHeight + "px"); 180 } 181 else 182 { 183 $(".home-project-box").css("height","auto"); 184 } 185 186 //HOME PROJECT BOX BUTTON CENTER 187 188 $(".home-project-box-button").css("margin-left","0px"); 189 190 var thisParentWidth = $('.home-project-box').width(); 191 var thisWidth = $(".home-project-box-button").width(); 192 193 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 194 195 $(".home-project-box-button").css("margin-left",thisMargin + "px"); 196 197 //HOME PROJECT BOX BUTTON CENTER 198 199 $("#tablet .header-links").css("margin-right","0px"); 200 201 var thisParentWidth = $('.header-top-inner').width(); 202 var thisWidth = $("#tablet .header-links").width(); 203 204 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 205 206 $("#tablet .header-links").css("margin-right",thisMargin + "px"); 207 208 //DONATE BUTTONS CENTER 209 210 $("#content-donate-button-1").css("margin-left","0px"); 211 212 var thisParentWidth = $('#donate-form').width(); 213 var thisWidth = $("#content-donate-button-1").width(); 214 215 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 216 217 $("#content-donate-button-1").css("margin-left",thisMargin + "px"); 218 219 $("#content-donate-button-2").css("margin-left","0px"); 220 221 var thisParentWidth = $('#donate-form').width(); 222 var thisWidth = $("#content-donate-button-2").width(); 223 224 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 225 226 $("#content-donate-button-2").css("margin-left",thisMargin + "px"); 227 228 $("#content-donate-button-3").css("margin-left","0px"); 229 230 var thisParentWidth = $('#donate-form').width(); 231 var thisWidth = $("#content-donate-button-3").width(); 232 233 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 234 235 $("#content-donate-button-3").css("margin-left",thisMargin + "px"); 236 237 //WHITE CONTENT BUTTON CENTER 238 239 $('.white-content-button').each(function(i, obj) { 240 241 $(this).css("margin-left","0px"); 242 243 var thisParentWidth = $('.white-content-inner').width(); 244 var thisWidth = $(this).width(); 245 246 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 247 248 $(this).css("margin-left",thisMargin + "px"); 249 250 }); 251 252 //GREY CONTENT BUTTON CENTER 253 254 $('.grey-content-button').each(function(i, obj) { 255 256 $(this).css("margin-left","0px"); 257 258 var thisParentWidth = $('.grey-content-inner').width(); 259 var thisWidth = $(this).width(); 260 261 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 262 263 $(this).css("margin-left",thisMargin + "px"); 264 265 }); 266 267 //WHITE CONTENT BUTTON CONTAINER CENTER 268 269 $('.white-content-buttons').each(function(i, obj) { 270 271 $(this).css("margin-left","0px"); 272 273 var thisParentWidth = $('.white-content-inner').width(); 274 var thisWidth = $(this).width(); 275 276 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 277 278 $(this).css("margin-left",thisMargin + "px"); 279 280 }); 281 282 //SIGNUP FORM CENTER 283 284 $('.signup-newsletter').each(function(i, obj) { 285 286 $(this).css("margin-left","0px"); 287 288 var thisParentWidth = $('.white-content-inner').width(); 289 var thisWidth = $(this).width(); 290 291 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 292 293 $(this).css("margin-left",thisMargin + "px"); 294 295 }); 296 297 //GREY CONTENT BUTTON CONTAINER CENTER 298 299 $('.grey-content-buttons').each(function(i, obj) { 300 301 $(this).css("margin-left","0px"); 302 303 var thisParentWidth = $('.grey-content-inner').width(); 304 var thisWidth = $(this).width(); 305 306 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 307 308 $(this).css("margin-left",thisMargin + "px"); 309 310 }); 311 312 //ARTICLE BUTTON CENTER 313 314 $('.article-button-container a').each(function(i, obj) { 315 316 $(this).css("margin-left","0px"); 317 318 var thisParentWidth = $('.article-button-container').width(); 319 var thisWidth = $(this).width() + 40; 320 321 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 322 323 $(this).css("margin-left",thisMargin + "px"); 324 325 }); 326 327 //DOCUMENT BUTTON CENTER 328 329 $('.article-document p a').each(function(i, obj) { 330 331 $(this).css("margin-left","0px"); 332 333 var thisParentWidth = $('.article-document').width(); 334 var thisWidth = $(this).width() + 40; 335 336 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 337 338 $(this).css("margin-left",thisMargin + "px"); 339 340 }); 341 342 //CONTACT BUTTON CENTER 343 344 if (windowWidth <= 1024) { 345 346 $(".contact-form-button").css("margin-left","0px"); 347 348 var thisParentWidth = $('.contact-form').width(); 349 var thisWidth = $(".contact-form-button").width(); 350 351 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 352 353 $(".contact-form-button").css("margin-left",thisMargin + "px"); 354 } 355 else 356 { 357 $(".contact-form-button").css("margin-left","0px"); 358 } 359 360 //NEWSLETTER BUTTON CENTER 361 362 $(".newsletter-form-button").css("margin-left","0px"); 363 364 var thisParentWidth = $('.grey-content-inner').width(); 365 var thisWidth = $(".newsletter-form-button").width(); 366 367 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 368 369 $(".newsletter-form-button").css("margin-left",thisMargin + "px"); 370 371 //NEWSLETTER INPUT CENTER 372 373 $("#NewsletterEmail").css("margin-left","0px"); 374 375 var thisParentWidth = $('.grey-content-inner').width(); 376 var thisWidth = $("#NewsletterEmail").width(); 377 378 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 10; 379 380 $("#NewsletterEmail").css("margin-left",thisMargin + "px"); 381 382 //HOME NEWS BOX IMAGES 383 384 $(".preview-news-box-image").css("height","0px"); 385 386 var thisWidth = $('.preview-news-box').width(); 387 var thisHeight = thisWidth / 1.93048 ; 388 389 $(".preview-news-box-image").css("height",thisHeight + "px"); 390 391 //HOME BLOG BOX IMAGES 392 393 $(".preview-blog-box-image").css("height","0px"); 394 395 var thisWidth = $('.preview-blog-box').width(); 396 var thisHeight = thisWidth / 1.93048; 397 398 $(".preview-blog-box-image").css("height",thisHeight + "px"); 399 400 //HOME NEWS BOX HEIGHTS 401 402 if (windowWidth > 640) { 403 404 $(".preview-news-box").css("height","auto"); 405 406 var maxHeight = 0; 407 408 $('.preview-news-box').each(function(i, obj) { 409 var thisHeight = $(this).height(); 410 if (thisHeight > maxHeight) 411 { 412 maxHeight = thisHeight; 413 } 414 }); 415 416 $(".preview-news-box").css("height",maxHeight + "px"); 417 } 418 else 419 { 420 $(".preview-news-box").css("height","auto"); 421 } 422 423 //HOME BLOG BOX HEIGHTS 424 425 if (windowWidth > 640) { 426 427 $(".preview-blog-box").css("height","auto"); 428 429 var maxHeight = 0; 430 431 $('.preview-blog-box').each(function(i, obj) { 432 var thisHeight = $(this).height(); 433 if (thisHeight > maxHeight) 434 { 435 maxHeight = thisHeight; 436 } 437 }); 438 439 $(".preview-blog-box").css("height",maxHeight + "px"); 440 } 441 else 442 { 443 $(".preview-blog-box").css("height","auto"); 444 } 445 446 //NEWS BOX IMAGES 447 448 $(".news-box-image").css("height","0px"); 449 450 var thisWidth = $('.news-box').width(); 451 var thisHeight = thisWidth / 1.73913 ; 452 453 $(".news-box-image").css("height",thisHeight + "px"); 454 455 //BLOG BOX IMAGES 456 457 $(".blog-box-image").css("height","0px"); 458 459 var thisWidth = $('.blog-box').width(); 460 var thisHeight = thisWidth / 1.73913 461 462 $(".blog-box-image").css("height",thisHeight + "px"); 463 464 //SPLIT CONTENT HEIGHTS 465 466 if (windowWidth > 640) { 467 468 $(".split-content-left").css("height","auto");
469 $(".split-content-right").css("height","auto"); 470 471 var maxHeight = 0; 472 473 var heightLeft = $(".split-content-left").height(); 474 var heightRight = $(".split-content-right").height(); 475 476 if (heightLeft > heightRight) 477 { 478 maxHeight = heightLeft; 479 } 480 else 481 { 482 maxHeight = heightRight; 483 } 484 485 $(".split-content-left").css("height",maxHeight + "px"); 486 $(".split-content-right").css("height",maxHeight + "px"); 487 } 488 else 489 { 490 $(".split-content-left").css("height","auto"); 491 $(".split-content-right").css("height","auto"); 492 } 493 494 //NEWS BOX TITLES 495 496 if (windowWidth > 640) { 497 498 $('.news-box-title').css("padding-top","6px"); 499 $('.news-box-title').css("padding-bottom","6px"); 500 501 $('.news-box-title').each(function(i, obj) { 502 var thisHeight = $(this).height(); 503 var thisLineHeight = $(this).css("line-height").replace("px", ""); 504 var numLines = Math.round(thisHeight/parseInt(thisLineHeight)); 505 506 var thisPaddingTop = 6 507 var thisPaddingBottom = 6 508 509 if (numLines==1) 510 { 511 $(this).css("padding-top",parseInt(thisPaddingTop) + parseInt(thisLineHeight/2) + 'px'); 512 $(this).css("padding-bottom",parseInt(thisPaddingBottom) + parseInt(thisLineHeight/2) + 'px'); 513 } 514 515 }); 516 } 517 else 518 { 519 $('.news-box-title').css("padding-top","6px"); 520 $('.news-box-title').css("padding-bottom","6px"); 521 } 522 523 //BLOG BOX TITLES 524 525 if(windowWidth > 640) { 526 $('.blog-box-title').css("padding-top","6px"); 527 $('.blog-box-title').css("padding-bottom","6px") 528 529 $('.blog-box-title').each(function(i, obj) { 530 var thisHeight = $(this).height(); 531 var thisLineHeight = $(this).css("line-height").replace("px", ""); 532 var numLines = Math.round(thisHeight/parseInt(thisLineHeight)); 533 534 var thisPaddingTop = 6 535 var thisPaddingBottom = 6 536 537 if (numLines==1) 538 { 539 $(this).css("padding-top",parseInt(thisPaddingTop) + parseInt(thisLineHeight/2) + 'px'); 540 $(this).css("padding-bottom",parseInt(thisPaddingBottom) + parseInt(thisLineHeight/2) + 'px'); 541 } 542 543 }); 544 } 545 else 546 { 547 $('.blog-box-title').css("padding-top","6px"); 548 $('.blog-box-title').css("padding-bottom","6px"); 549 } 550 551 //HOME NEWS BOX BUTTON CENTER 552 553 $(".preview-news-box-button").css("margin-left","0px"); 554 555 var thisParentWidth = $('.preview-news-box').width(); 556 var thisWidth = $(".preview-news-box-button").width(); 557 558 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 559 560 $(".preview-news-box-button").css("margin-left",thisMargin + "px"); 561 562 //HOME BLOG BOX BUTTON CENTER 563 564 $(".preview-blog-box-button").css("margin-left","0px"); 565 566 var thisParentWidth = $('.preview-blog-box').width(); 567 var thisWidth = $(".preview-blog-box-button").width(); 568 569 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 570 571 $(".preview-blog-box-button").css("margin-left",thisMargin + "px"); 572 573 //NEWS BOX BUTTON CENTER 574 575 $(".news-box-button").css("margin-left","0px"); 576 577 var thisParentWidth = $('.news-box').width(); 578 var thisWidth = $(".news-box-button").width(); 579 580 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 581 582 $(".news-box-button").css("margin-left",thisMargin + "px"); 583 584 //BLOG BOX BUTTON CENTER 585 586 $(".blog-box-button").css("margin-left","0px"); 587 588 var thisParentWidth = $('.blog-box').width(); 589 var thisWidth = $(".blog-box-button").width(); 590 591 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 592 593 $(".blog-box-button").css("margin-left",thisMargin + "px"); 594 595 //IMAGE CONTENT BUTTON 596 597 if (windowWidth <= 640) { 598 599 $(".image-content-button").css("margin-left","2%"); 600 601 var thisParentWidth = $('.image-content').width(); 602 var thisWidth = $(".image-content-button").width(); 603 604 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 605 606 $(".image-content-button").css("margin-left",thisMargin + "px"); 607 } 608 else 609 { 610 $(".image-content-button").css("margin-left","2%"); 611 } 612 613 //DONATE BUTTON 614 615 if (windowWidth <= 1024) { 616 617 $("#donate-button").css("margin-left","2%"); 618 619 var thisParentWidth = $('.image-content').width(); 620 var thisWidth = $(".image-content-button").width(); 621 622 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 623 624 $("#donate-button").css("margin-left",thisMargin + "px"); 625 } 626 else 627 { 628 $("#donate-button").css("margin-left","2%"); 629 } 630 631 //LOCATION BOX BUTTON CENTER 632 633 $(".location-box-button").css("margin-left","0px"); 634 635 var thisParentWidth = $('.location-box').width(); 636 var thisWidth = $(".location-box-button").width(); 637 638 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 639 640 $(".location-box-button").css("margin-left",thisMargin + "px"); 641 642 //LOCATION BOX IMAGES 643 644 $(".location-box-image").css("height","0px"); 645 646 var thisWidth = $('.location-box').width(); 647 var thisHeight = thisWidth / 1.33432 ; 648 649 $(".location-box-image").css("height",thisHeight + "px"); 650 651 //REPORT BOX BUTTON CENTER 652 653 $(".report-box-button").css("margin-left","0px"); 654 655 var thisParentWidth = $('.report-box').width(); 656 var thisWidth = $(".report-box-button").width(); 657 658 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 659 660 $(".report-box-button").css("margin-left",thisMargin + "px"); 661 662 //REPORT BOX IMAGES 663 664 $(".report-box-image").css("height","0px"); 665 666 var thisWidth = $('.report-box').width(); 667 var thisHeight = thisWidth / 1.204793 ; 668 669 $(".report-box-image").css("height",thisHeight + "px"); 670 671 //STAFF BOX IMAGES 672 673 $(".staff-box-image").css("height","0px"); 674 675 var thisWidth = $('.staff-box').width(); 676 var thisHeight = (thisWidth-1); 677 678 $(".staff-box-image").css("height",thisHeight + "px"); 679 680 //STORY BOX IMAGES 681 682 $(".story-box-image").css("height","0px"); 683 684 var thisWidth = $('.story-box').width(); 685 var thisHeight = thisWidth; 686 687 $(".story-box-image").css("height",thisHeight + "px"); 688 689 //STORY BOX BUTTON CENTER 690 691 $(".story-box-button").css("margin-left","0px"); 692 693 var thisParentWidth = $('.story-box').width(); 694 var thisWidth = $(".story-box-button").width(); 695 696 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 697 698 $(".story-box-button").css("margin-left",thisMargin + "px"); 699 700 //AREAS BOX 701 702 $(".areas-box-inner").css("height","0px"); 703 704 var thisWidth = $('.areas-box-inner').width(); 705 var thisHeight = thisWidth / 1.904761 ; 706 707 $(".areas-box-inner").css("height",thisHeight + "px"); 708 709 //SPLIT VIDEO HEIGHT 710 711 $(".split-video iframe").css("height","auto"); 712 $(".split-video iframe").each(function(i, obj) { 713 var thisWidth = $(this).width(); 714 var newHeight = thisWidth * (9/16) - 1; 715 $(this).css("height",newHeight + "px"); 716 }); 717 718 //SPLIT VIDEO TABS CENTER 719 720 $(".split-video-tabs").css("margin-left","0px"); 721 722 var thisParentWidth = $('.split-videos').width(); 723 var thisWidth = $(".split-video-tabs").width(); 724 725 var thisMargin = (thisParentWidth/2) - (thisWidth/2); 726 727 $(".split-video-tabs").css("margin-left",thisMargin + "px"); 728 729 //CONNECT VIDEO HEIGHT 730 731 $("#connect-video").css("height","auto"); 732 733 var thisWidth = $("#connect-video").width(); 734 var newHeight = thisWidth * (9/16) - 1; 735 736 $("#connect-video").css("height",newHeight + "px"); 737 738 //HOME VIDEO HEIGHT 739 740 $("#home-video").css("height","auto"); 741 742 var thisWidth = $("#home-video").width(); 743 var newHeight = thisWidth * (9/16) - 1; 744 745 $("#home-video").css("height",newHeight + "px"); 746 747 //WHAT WE DO VIDEO HEIGHT 748 749 $("#what-we-do-video").css("height","auto"); 750 751 var thisWidth = $("#what-we-do-video").width(); 752 var newHeight = thisWidth * (9/16) - 1; 753 754 $("#what-we-do-video").css("height",newHeight + "px"); 755 756 //ARTICLE VIDEO 757 758 var videoWidth = $(".article-video").width(); 759 if (videoWidth > 1170) 760 { 761 videoWidth = 1170; 762 } 763 764 var videoHeight = videoWidth * (9/16); 765 766 $(".article-video-inner").css("width",videoWidth + "px"); 767 $(".article-video-inner").css("height",videoHeight + "px"); 768 769 //PROJECTS MAP 770
771 var setWidth 772 var setMargin 773 774 if (windowWidth <= 640) 775 { 776 setWidth = 640; 777 setMargin = 1235; 778 } 779 else 780 { 781 setWidth = 2000; 782 setMargin = 1337; 783 } 784 785 var widthDifference = setWidth - windowWidth; 786 var newMargin = setMargin + (widthDifference/2); 787 788 $('#projects-map').css("margin-left","-" + newMargin + "px"); 789 790 //MINI GALLERY 791 792 $('.mini-gallery-image').css("height","0px"); 793 $('.mini-gallery-image').css("margin-top","0px"); 794 $('.mini-gallery-image').css("margin-bottom","0px"); 795 796 $(".mini-gallery-image").each(function(i, obj) { 797 798 var thisWidth = $(".mini-gallery-image").width(); 799 var newHeight = thisWidth; 800 $(".mini-gallery-image").css("height",newHeight + "px"); 801 802 var thisMargin = $(".mini-gallery-image").css("margin-left").replace("px", ""); 803 var newMargin = thisMargin; 804 $(".mini-gallery-image").css("margin-top",newMargin + "px"); 805 $(".mini-gallery-image").css("margin-bottom",newMargin + "px"); 806 }); 807 808 //QUOTE HALF 809 810 $('#quote-half-1').removeAttr("style"); 811 812 if ($('.quote-half').length) 813 { 814 815 if (windowWidth > 1024) { 816 var maxHeight = $('#quote-half-2').outerHeight(); 817 var minHeight = $('#quote-half-1').outerHeight(); 818 819 var newMargin = (maxHeight - minHeight) / 2; 820 821 $('#quote-half-1').css("margin-top",newMargin + "px"); 822 } 823 } 824 825 //CURRENCY DROP DOWN 826 827 $("#ContentCurrency2").css("margin-left","0px"); 828 829 var thisWidth = $("#ContentCurrency1").outerWidth(); 830 var thisMargin = (thisWidth + 11) * -1 ; 831 832 $("#ContentCurrency2").css("margin-left",thisMargin + "px"); 833 834 //ROTATOR BUTTON 835 836 $(".rotator-content-button-dark").css("margin-left","0px"); 837 838 if (windowWidth > 640) { 839 840 var thisWidth = $(".rotator-content-button-dark").outerWidth() - 50; 841 var thisParentWidth = $('.rotator-content-button-dark').parent().parent().outerWidth(); 842 843 var thisMargin = (thisParentWidth/2) - (thisWidth/2) ; 844 845 $(".rotator-content-button-dark").css("margin-left",thisMargin + "px"); 846 847 } 848 849 //2016 TIMELINE 850 851 $(".timeline-2016-text").removeAttr("style"); 852 853 if (windowWidth > 1024) { 854 $(".timeline-2016-text").each(function(i, obj) { 855 856 var parentWidth = $(this).parent().width(); 857 var iconWidth = $(this).parent().find($(".timeline-2016-icon")).width(); 858 859 var newWidth = (parentWidth - iconWidth) - 1; 860 $(this).css("width",newWidth + "px"); 861 862 var thisHeight = $(this).outerHeight(); 863 var iconHeight = $(this).parent().find($(".timeline-2016-icon")).outerHeight(); 864 var newMargin = (iconHeight - thisHeight)/2 865 866 $(this).css("margin-top",newMargin + "px"); 867 868 }); 869 } 870 871 //DONATE FORM 872 873 $("#donate-form").css("margin-left","0px"); 874 875 if (windowWidth > 640) { 876 877 var thisParentWidth = $('.dark-content-inner').outerWidth(); 878 var thisWidth = $("#donate-form").outerWidth(); 879 880 var thisMargin = (thisParentWidth/2) - (thisWidth/2) ; 881 882 $("#donate-form").css("margin-left",thisMargin + "px"); 883 884 } 885 886 if (windowWidth > 640 && windowWidth <= 1024) 887 { 888 $('#ContentType option[value=""]').text('Type...'); 889 $('#ContentCurrency2 option[value=""]').text('Currency...'); 890 891 $("#ContentAmount").removeNumeric(); 892 893 if ($("#ContentAmount").val() == 'Enter Amount...') 894 { 895 896 $("#ContentAmount").val('Amount...'); 897 } 898 899 $("#ContentAmount").numeric(); 900 } 901 else 902 { 903 $('#ContentType option[value=""]').text('Type...'); 904 $('#ContentCurrency2 option[value=""]').text('Currency...'); 905 906 $("#ContentAmount").removeNumeric(); 907 908 if ($("#ContentAmount").val() == 'Amount...') 909 { 910 $("#ContentAmount").val('Amount...'); 911 } 912 913 $("#ContentAmount").numeric(); 914 } 915 916 //DROP DOWN CONTAINER 917 918 $('.drop-down-container').each(function(i, obj) { 919 var id = $(this).attr("id"); 920 var linkId = id.replace("drop-down-container","header-link") 921 if ($("#" + linkId).length) 922 { 923 var linkPosition = $("#" + linkId).position().left; 924 $("#" + id).css("left",(linkPosition - 5) + "px") 925 } 926 }); 927 928 //INNOVATE BUTTON CENTER 929 930 $(".innovate-form-button").css("margin-left","0px"); 931 932 var thisParentWidth = $('.innovate-form').width(); 933 var thisWidth = $(".innovate-form-button").width(); 934 935 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 936 937 $(".innovate-form-button").css("margin-left",thisMargin + "px"); 938 939 //UPDATE BUTTON CENTER 940 941 $(".update-form-button").css("margin-left","0px"); 942 943 var thisParentWidth = $('.update-form').width(); 944 var thisWidth = $(".update-form-button").width(); 945 946 var thisMargin = (thisParentWidth/2) - (thisWidth/2) - 20; 947 948 $(".update-form-button").css("margin-left",thisMargin + "px"); 949 950 //SOCIAL ICONS BUTTON CENTER 951 952 $(".social-container").removeAttr("style") 953 if (windowWidth > 1024) 954 { 955 var thisParentHeight = parseInt($(window).height()); 956 var thisHeight = $(".social-container").outerHeight(); 957 var thisMargin = (thisParentHeight/2) - (thisHeight/2) ; 958 $(".social-container").css("top",thisMargin + "px"); 959 } 960 961} 962 963$(document).ready(function () { 964 965 $(window).resize(function () { 966 resizer(); 967 });
968 969 resizer(); 970 971}); 972 973$(window).load(function () { 974 975 resizer(); 976 977});
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.