1jQuery.noConflict(); 2 3jQuery(document).ready(function($){ 4 var viewportWidth = $(window).width(); 5 6 var viewportWidth = window.outerWidth; 7 8 var viewportHeight = $(window).height(); 9 var headerHt=$('#masthead').height(); 10 var ftHt=$('.site-footer').height(); 11 var adminBarHt=$('#wpadminbar').height(); 12 $(this).scrollTop(0); 13 //alert("1:"+viewportWidth); 14 15 //alert("2:"+$(window).outerWidth(true)); 16 17 if (!$(".home").length) { 18 jQuery('#jsdata').html("header ht"+headerHt+"<br />vpwidth:"+viewportWidth); 19 jQuery(window).bind('scroll',function(e){ 20 parallaxScroll(); 21 22 }); 23 $('.site-main').css("min-height",(viewportHeight-headerHt-ftHt-adminBarHt)+"px"); 24 25 /* if ($("#secondary").length) { 26 var mcHt=$("#main-content").height(); 27 $("#secondary").css("min-height",mcHt+"px") 28 } */ 29 30 if($(".slide-holder").length) { 31 32 var slideArray = new Array(); 33 $('.slide_cont').each(function() { 34 var id = $(this).attr("id"); 35 if(id != undefined) { 36 slideArray.push(id); 37 } 38 }); 39 40 $slideDelay=1000; 41 42 $("#slide-left").on("click",function(){ 43 var currSlide=$(".slide-holder").find(".currentslide").attr("id").split("-")[1]; 44 $(".slide_cont").removeClass("moveright prepLnext moveintoLframe"); 45 if (currSlide==1) { 46 $("#slide-2").addClass("prepnext"); 47 $("#slide-1").addClass("moveleft"); 48 $("#slide-2").addClass("moveintoframe"); 49 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");}, $slideDelay); 50 window.setTimeout(function(){$("#slide-2").addClass("currentslide");}, $slideDelay); 51 window.setTimeout(function(){$("#slide-2").removeClass("prepnext moveintoframe");}, $slideDelay); 52 window.setTimeout(function(){$(".slide_cont").removeClass("moveleft");}, $slideDelay); 53 } 54 else if (currSlide==slideArray.length) { 55 nextSlide=1; 56 $("#slide-"+nextSlide).addClass("prepnext"); 57 $("#slide-"+currSlide).addClass("moveleft"); 58 $("#slide-"+nextSlide).addClass("moveintoframe"); 59 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");}, $slideDelay); 60 window.setTimeout(function(){$("#slide-"+nextSlide).addClass("currentslide");}, $slideDelay); 61 window.setTimeout(function(){$("#slide-"+nextSlide).removeClass("prepnext moveintoframe");}, $slideDelay); 62 window.setTimeout(function(){$(".slide_cont").removeClass("moveleft");}, $slideDelay); 63 } 64 else { 65 nextSlide=parseInt(currSlide)+1; 66 $("#slide-"+nextSlide).addClass("prepnext"); 67 $("#slide-"+currSlide).addClass("moveleft"); 68 $("#slide-"+nextSlide).addClass("moveintoframe"); 69 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");},$slideDelay); 70 window.setTimeout(function(){$("#slide-"+nextSlide).addClass("currentslide");}, $slideDelay); 71 window.setTimeout(function(){$("#slide-"+nextSlide).removeClass("prepnext moveintoframe");}, $slideDelay); 72 window.setTimeout(function(){$(".slide_cont").removeClass("moveleft");}, $slideDelay); 73 } 74 }); 75 $("#slide-right").on("click",function(){ 76 var currSlide=$(".slide-holder").find(".currentslide").attr("id").split("-")[1]; 77 $(".slide_cont").removeClass("moveleft prepnext moveintoframe"); 78 79 if (currSlide==1) { 80 nextSlide=slideArray.length; 81 $("#slide-"+nextSlide).addClass("prepLnext"); 82 $("#slide-1").addClass("moveright"); 83 $("#slide-"+nextSlide).addClass("moveintoframe"); 84 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");},$slideDelay); 85 window.setTimeout(function(){$("#slide-"+nextSlide).addClass("currentslide");}, $slideDelay); 86 window.setTimeout(function(){$("#slide-"+nextSlide).removeClass("prepLnext moveintoframe");}, $slideDelay); 87 window.setTimeout(function(){$(".slide_cont").removeClass("moveright");}, $slideDelay); 88 } 89 else if (currSlide==slideArray.length) { 90 nextSlide=parseInt(currSlide)-1; 91 $("#slide-"+nextSlide).addClass("prepLnext"); 92 $("#slide-"+currSlide).addClass("moveright"); 93 $("#slide-"+nextSlide).addClass("moveintoframe"); 94 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");}, $slideDelay); 95 window.setTimeout(function(){$("#slide-"+nextSlide).addClass("currentslide");},$slideDelay); 96 window.setTimeout(function(){$("#slide-"+nextSlide).removeClass("prepLnext moveintoframe");}, $slideDelay); 97 window.setTimeout(function(){$(".slide_cont").removeClass("moveright");}, $slideDelay); 98 } 99 else { 100 nextSlide=parseInt(currSlide)-1; 101 $("#slide-"+nextSlide).addClass("moveintoLframe"); 102 $("#slide-"+currSlide).addClass("moveright"); 103 window.setTimeout(function(){$(".slide_cont").removeClass("currentslide");}, $slideDelay); 104 window.setTimeout(function(){$("#slide-"+nextSlide).addClass("currentslide");},$slideDelay); 105 window.setTimeout(function(){$("#slide-"+nextSlide).removeClass("prepLnext moveintoLframe");}, $slideDelay); 106 window.setTimeout(function(){$(".slide_cont").removeClass("moveright");},$slideDelay); 107 } 108 }); 109 110 111 } 112 113 114 115 116 117 if($(".pubtabs").length) { 118 $(".tab").on("click",function(){ 119 $('.tab').removeClass('stick'); 120 $(this).addClass('stick'); 121 var row1=$(this).attr("id"); 122 var year1=row1.split('tab-'); 123 $('.arch_years').css({"display":"none"}); 124 $('#tyear_'+year1[1]).slideDown('slow'); 125 }); 126 var x=0; 127 $(".arch_years").each(function() { 128 if($(this).is(":visible")){ 129 x=1 130 } 131 }); 132 if (x==1) { 133 $(".arch_years").each(function() { 134 if(!$(this).is(":empty")){ 135 $(this).slideDown('slow'); 136 var myyear=$(this).attr("id").split('_')[1]; 137 $('.tab').removeClass('stick'); 138 $('#tab-'+myyear).addClass('stick'); 139 //alert(myyear); 140 return false;
141 } 142 }); 143 } 144 } 145 } 146 else { 147 var innerpgWd=$(".site-content").width(); 148 var ecWd=$(".entry-content").width(); 149 x=(innerpgWd-ecWd)/2; 150 console.log(innerpgWd); 151 console.log(ecWd); 152 $(".entry-content").find("hr").css("width",(x+ecWd)+"px"); 153 jQuery(window).bind('scroll',function(e){ 154 var scrolledH = jQuery(window).scrollTop(); 155 if (scrolledH>100) { 156 $("#masthead").addClass("darken"); 157 } 158 else { 159 $("#masthead").removeClass("darken"); 160 } 161 }); 162 163 $(".drug_progress div").each(function(index) { 164 var parentwd=$(this).parent().width(); 165 var wd=$(this).data("width")/100; 166 var newWd=parseInt(parentwd*wd); 167 $(this).animate({ 168 width: newWd+"px" 169 },200,function(){ 170 //$(this).addClass("pipeopen"); 171 }); 172 173 }); 174 175 176 } 177 178 179 function parallaxScroll(){ 180 var viewportWidth = $(window).width(); 181 var scrolled = jQuery(window).scrollTop(); 182 var docHeight=jQuery(document).height(); 183 var docWidth=jQuery(document).width(); 184 185 var viewportWidth = window.outerWidth; 186 var wHeight=jQuery(window).height(); 187 188 var navHt=jQuery("#masthead").outerHeight(true); 189 //console.log(navHt); 190 var perScr=(scrolled/wHeight); 191 192 if (viewportWidth>1440) { 193 var measurement_1=265; 194 var measurement_2=484; 195 var measurement_3=19; 196 } 197 else { 198 if (viewportWidth>1090) { 199 var measurement_1=118; 200 var measurement_2=300; 201 var measurement_3=0; 202 } 203 else { 204 if (viewportWidth>799) { 205 var measurement_1=128; 206 var measurement_1=140; 207 var measurement_2=300; 208 var measurement_3=0; 209 } 210 else { 211 var measurement_1=75; 212 var measurement_2=176; 213 var measurement_3=0; 214 } 215 } 216 } 217 if (scrolled>measurement_1) { 218 if (viewportWidth>700) { 219 jQuery(".entry-header").addClass("fixme"); 220 } 221 } 222 else { 223 jQuery(".entry-header").removeClass("fixme"); 224 } 225 226 227 if (scrolled>measurement_2) {// used for patients button soas not to cause scrolling 228 //jQuery('#home_b-3').css('left',(0+((scrolled*.25)))+'px'); 229 } 230 else { 231 if (viewportWidth>700) { 232 jQuery('#masthead').css({ 233 'height':(measurement_2-measurement_3-(scrolled))+'px', 234 'background-position-y':(-(scrolled))+'px', 235 }); 236 jQuery('#jsdata').html("scrolled"+scrolled+"<br />wpercentage:"+perScr+"<br>"+(measurement_2-measurement_3)); 237 } 238 //jQuery('.header-main .safezoneA').css('height',(325-(scrolled))+'px'); 239 240 } 241 242 if($(".page-template-pipeline").length) { 243 jQuery.fn.inView = function(){ 244 var win2 = jQuery(window); 245 obj2 = jQuery(this); 246 var scrollPosition2 = win2.scrollTop(); 247 //the end of the visible area in the page, starting from the scroll position 248 var visibleArea2 = win2.scrollTop() + win2.height(); 249 //the end of the object to check 250 var objEndPos2 = (obj2.offset().top + obj2.outerHeight()); 251 return(visibleArea2 >= objEndPos2 && scrollPosition2 <= objEndPos2 ? true : false) 252 }; 253 254 $(".drug_progress div").each(function(index) { 255 if(($(this).inView())&&(!$(this).hasClass("pipeopen"))) { 256 var parentwd=$(this).parent().width(); 257 var wd=$(this).data("width")/100; 258 var newWd=parseInt(parentwd*wd); 259 $(this).animate({ 260 width: newWd+"px" 261 },2000,function(){ 262 $(this).addClass("pipeopen"); 263 }); 264 } 265 }); 266 } 267 268 } 269 270 271 if($(".partner_box").length) { 272 if (viewportWidth>700) { 273 $(".partner_box").on("click",function(){ 274 275 var fRow1=$(this).attr("class"); 276 var activeGroup=fRow1.split('group-'); 277 var iRow1=$(this).attr("id"); 278 279 var iRow2=iRow1.split('bio-'); 280 281 if(activeGroup[1].indexOf('bc_off') != -1) { 282 var fRow3=activeGroup[1].split(' '); 283 var currentRow=fRow3[0]; 284 } 285 else { 286 var currentRow=activeGroup[1]; 287 } 288 289 if ($(this).hasClass('bc_active')) { 290 fRow3=currentRow.split(' bc_active'); 291 currentRow=fRow3[0]; 292 $(".group-"+currentRow).removeClass('bc_active'); 293 $("#bioGp-"+currentRow).slideUp(); 294 $(".partner_box").removeClass('bc_off'); 295 } 296 else{ 297 $(".bio-info").hide(); 298 299 $(".partner_box").removeClass('bc_active'); 300 $(".partner_box").addClass('bc_off'); 301 $(this).removeClass('bc_off').addClass('bc_active'); 302 303 $("#bio-"+iRow2[1]).removeClass("bc_off"); 304 305 306 var tb=$(this).find(".bio_detail_cont").html(); 307 308 var myClass = this.className; 309 var mc2=myClass.split('group-'); 310 var mc3=mc2[1].split(' '); 311 if ($("#bioGp-"+mc3[0]).is(':visible')) { 312 $("#bioGp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 313 } 314 else { 315 $("#bioGp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 316 $("#bioGp-"+mc3[0]).slideDown('slow'); 317 } 318 } /* end has class else */ 319 }); 320 } 321 else { 322 323 $(".partner_box").on("click",function(){ 324 if ($(this).hasClass('bc_active')) { 325 $(this).removeClass('bc_active'); 326 } 327 else { 328 $(this).addClass('bc_active'); 329 } 330 $(this).find(".bio_detail_cont").slideToggle(); 331 }); 332 } 333 $("body").on("click",".bioless",function(){ //close button
334 $(".bio-info").slideUp(); 335 $(".partner_box").removeClass('bc_active bc_off'); 336 }); 337 //hack cause of old, embedded jquery 338 $("body").on("click touchstart",".bioless",function(){ //close button 339 $(".bio-info").slideUp(); 340 $(".partner_box").removeClass('bc_active bc_off'); 341 }); 342 } 343 344 if($(".partner_box_2").length) { 345 if (viewportWidth>700) { 346 347 $(".partner_box_2").on("click",function(){ 348 349 var fRow1=$(this).attr("class"); 350 var activeGroup=fRow1.split('group2-'); 351 var iRow1=$(this).attr("id"); 352 353 var iRow2=iRow1.split('bio-'); 354 355 if(activeGroup[1].indexOf('bc_off') != -1) { 356 var fRow3=activeGroup[1].split(' '); 357 var currentRow=fRow3[0]; 358 } 359 else { 360 var currentRow=activeGroup[1]; 361 } 362 363 if ($(this).hasClass('bc_active')) { 364 fRow3=currentRow.split(' bc_active'); 365 currentRow=fRow3[0]; 366 $(".group2-"+currentRow).removeClass('bc_active'); 367 $("#bio2Gp-"+currentRow).slideUp(); 368 $(".partner_box_2").removeClass('bc_off'); 369 } 370 else{ 371 $(".bio-info_2").hide(); 372 373 $(".partner_box_2").removeClass('bc_active'); 374 $(".partner_box_2").addClass('bc_off'); 375 $(this).removeClass('bc_off').addClass('bc_active'); 376 377 $("#bio2-"+iRow2[1]).removeClass("bc_off"); 378 379 380 var tb=$(this).find(".bio_detail_cont").html(); 381 382 var myClass = this.className; 383 var mc2=myClass.split('group2-'); 384 var mc3=mc2[1].split(' '); 385 if ($("#bio2Gp-"+mc3[0]).is(':visible')) { 386 $("#bio2Gp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 387 } 388 else { 389 $("#bio2Gp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 390 $("#bio2Gp-"+mc3[0]).slideDown('slow'); 391 } 392 } /* end has class else */ 393 }); 394 } 395 else { 396 397 $(".partner_box_2").on("click",function(){ 398 if ($(this).hasClass('bc_active')) { 399 $(this).removeClass('bc_active'); 400 } 401 else { 402 $(this).addClass('bc_active'); 403 } 404 $(this).find(".bio_detail_cont").slideToggle(); 405 }); 406 } 407 $("body").on("click",".bioless_2",function(){ //close button 408 $(".bio-info_2").slideUp(); 409 $(".partner_box_2").removeClass('bc_active bc_off'); 410 }); 411 //hack cause of old, embedded jquery 412 $("body").on("click touchstart",".bioless_2",function(){ //close button 413 $(".bio-info_2").slideUp(); 414 $(".partner_box_2").removeClass('bc_active bc_off'); 415 }); 416 } 417 418 if($(".bod_box").length) { 419 if (viewportWidth>700) { 420 421 $(".bod_box").on("click",function(){ 422 423 var fRow1=$(this).attr("class"); 424 var activeGroup=fRow1.split('group-'); 425 var iRow1=$(this).attr("id"); 426 427 var iRow2=iRow1.split('bio-'); 428 429 if(activeGroup[1].indexOf('bc_off') != -1) { 430 var fRow3=activeGroup[1].split(' '); 431 var currentRow=fRow3[0]; 432 } 433 else { 434 var currentRow=activeGroup[1]; 435 } 436 437 if ($(this).hasClass('bc_active')) { 438 fRow3=currentRow.split(' bc_active'); 439 currentRow=fRow3[0]; 440 $(".group-"+currentRow).removeClass('bc_active'); 441 $("#bioGp-"+currentRow).slideUp(); 442 $(".bod_box").removeClass('bc_off'); 443 } 444 else{ 445 $(".bio-info").hide(); 446 447 $(".bod_box").removeClass('bc_active'); 448 $(".bod_box").addClass('bc_off'); 449 $(this).removeClass('bc_off').addClass('bc_active'); 450 451 $("#bio-"+iRow2[1]).removeClass("bc_off"); 452 453 454 var tb=$(this).find(".bio_detail_cont").html(); 455 456 var myClass = this.className; 457 var mc2=myClass.split('group-'); 458 var mc3=mc2[1].split(' '); 459 if ($("#bioGp-"+mc3[0]).is(':visible')) { 460 $("#bioGp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 461 } 462 else { 463 $("#bioGp-"+mc3[0]).html("<div class='cellpad'>"+tb+"</div>"); 464 $("#bioGp-"+mc3[0]).slideDown('slow'); 465 } 466 } /* end has class else */ 467 }); 468 } 469 else { 470 471 $(".bod_box").on("click",function(){ 472 if ($(this).hasClass('bc_active')) { 473 $(this).removeClass('bc_active'); 474 } 475 else { 476 $(this).addClass('bc_active'); 477 } 478 $(this).find(".bio_detail_cont").slideToggle(); 479 }); 480 } 481 $("body").on("click",".bioless",function(){ //close button
482 $(".bio-info").slideUp(); 483 $(".bod_box").removeClass('bc_active bc_off'); 484 }); 485 //hack cause of old, embedded jquery 486 $("body").on("click touchstart",".bioless",function(){ //close button 487 $(".bio-info").slideUp(); 488 $(".bod_box").removeClass('bc_active bc_off'); 489 }); 490 } 491//old cookie code 492// if (!getCookie('calert')==1) { /* no cookie set */ 493/* $("#cookie-consent-block").addClass("onstate"); 494 } 495 496 $("#accept").on("click",function(){ 497 setCookie('calert','1',365); 498 $("#cookie-consent-block").removeClass("onstate"); 499 $(".footer-wrapper").css("margin-bottom","0"); 500 }); 501*/ 502//old cookie code 503 504}); 505 506var $=jQuery.noConflict(); 507$(window).load(function() { //after window load 508 var viewportWidth = jQuery(window).width(); 509 if(jQuery(".slide-holder").length) { 510 var imgHt=jQuery("#slide-1 .slide_img img").height(); 511 console.log("img ht"+viewportWidth); 512 if (viewportWidth>961) { 513 jQuery(".slide-holder").css("height",imgHt+"px"); 514 } 515 else { 516 if (viewportWidth>600) { 517 jQuery(".slide-holder").css("height",((imgHt*2)+50)+"px"); 518 } 519 else { 520 jQuery(".slide-holder").css("height",((imgHt*2.5)+50)+"px"); 521 } 522 } 523 } 524 if (jQuery("#secondary").length) { 525 var mcHt=jQuery("#main-content").height(); 526 jQuery("#secondary").css("min-height",mcHt+"px") 527 } 528}); 529 530function setCookie(key,value,days) { 531 if (days) { 532 var date = new Date(); 533 date.setTime(date.getTime() + (days*24*60*60*1000)); 534 var expires = "; expires=" + date.toUTCString(); 535 } 536 else { 537 var expires = ""; 538 } 539 document.cookie = key + '=' + value + expires+'; path=/;'; 540} 541function getCookie(key) { 542 var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)'); 543 return keyValue ? keyValue[2] : null; 544}
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.