1 2$(window).on('resize',function() { 3}); 4 5$(document).ready(function() { 6 7 // HP Video appender 8 mainVideo = $('#bgvid'); 9 if ($(window).width() < 768) { 10 mainVideo.append("<source type='video/mp4' src='./assets/video/hp-video-mobile.mp4' />"); 11 } else { 12 mainVideo.append("<source type='video/mp4' src='./assets/video/hp-video.mp4' />"); 13 } 14 15 $(window).trigger('resize'); 16 17 $('#main-nav').responsiveNav(); 18 19 $('#home-slideshow').slideshow(); 20 21 $(".home header h1:contains('Welcome to')").html(function(_, html) { 22 return html.replace(/(Welcome to)/g, '<span class="trait">Welcome to</span>'); 23 }); 24 25 // Add captions for before and after slides based on alt text 26 //$('#before-after-container ul li img:first-child').each(function() { 27 // $(this).parent().append('<p class="caption">' + $(this).attr('alt') + '</p>'); 28 // }); 29 30 // Add captions for office tour slides based on alt text 31 //$('.office-tour.slideshow div img:first-child').each(function() { 32 // $(this).parent().append('<p class="caption">' + $(this).attr('alt') + '</p>'); 33 // }); 34
35//animate callouts 36 //$('.shift').hover( function() { //, #sidebar a 37// $(this).animate({bottom: '3px'},{queue:false,duration:100}); 38// }, function() { 39// $(this).animate({bottom: '0'},{queue:false,duration:400}); 40// }); 41// 42// $('.linkHover').hover( function() { 43// $(this).animate({opacity: '.65'}, 400); 44// }, function() { 45// $(this).animate({opacity: '1'},400); 46// }); 47 48//Back to top hide and animate 49// if ($('#bd').height() > $(window).height()) { 50// $('#back-to-top').removeClass('hide'); 51// $('.back-to-top').removeClass('hide'); 52// } 53 /* $('.back-to-top').removeClass('hide'); */ 54 $('#back-to-top').click(function () { 55 $('body,html').animate({ 56 scrollTop: 0 57 }, 'slow'); 58 return false; 59 }); 60// $('a.back-to-top').click(function () { 61// $('body,html').animate({ 62// scrollTop: 0 63// }, 'slow'); 64// return false; 65// }); 66 67//hide ip-sub from 404pages 68/* 69var ipSub = $("#ip-sub"); 70var error404 = $("h1:contains('Error 404')"); 71 if(error404) { 72 $("#ip-sub").css('display', 'none'); 73 }; 74*/ 75 76//hide ip-sub if it contains only one item 77if($("#ip-sub a").length == '1'){ 78$("#ip-sub h2, p.subnav").hide(); 79}; 80 81 // Post Appointment Survey form "May We Contact You" toggle 82 $("#Contact_Patient").change(function() { 83 84 if ($(this).val() == 'Yes') { 85 // not current patient, ask where they found us 86 $('#survey_participant').fadeIn('slow', function() { 87 $(this).find('input').removeAttr('disabled').attr('required','required'); 88 }); 89 } else { 90 // current patient, hide content 91 $('#survey_participant').fadeOut('fast',function() { 92 $(this).find('input').attr('disabled','disabled').removeAttr('required'); 93 }); 94 } 95 }); 96 97 // Appointment Request form "Referred by patient" toggle 98 $("#Referred_By_Current_Patient").change(function() { 99 100 if ($(this).val() == 'Yes') { 101 // not current patient, ask where they found us 102 $('#referred_by_patient').fadeIn('slow', function() { 103 $(this).find('input').removeAttr('disabled').attr('required','required'); 104 }); 105 } else { 106 // current patient, hide content 107 $('#referred_by_patient').fadeOut('fast',function() { 108 $(this).find('input').attr('disabled','disabled').removeAttr('required'); 109 }); 110 } 111 }); 112 113 // Referral form "Radiographs Sent" toggle 114 $("input[name^='sc_form[Radiographs_Sent]']").on('click', function() { 115 if ($("input[name^='sc_form[Radiographs_Sent]']:checked").val() == 'Yes') { 116 // not current patient, ask where they found us 117 $('.hidden-option').fadeIn('slow', function() { 118 $(this).find('input').removeAttr('disabled').attr('required','required'); 119 }); 120 } else { 121 // current patient, hide content 122 $('.hidden-option').fadeOut('fast',function() { 123 $(this).find('input').attr('disabled','disabled').removeAttr('required'); 124 }); 125 } 126 }); 127 128 129 /* obfuscate email */ 130 var $emailLinks = $('a.email'); 131 132 if ($emailLinks.length < 1) {return;} // skip this function if no objects found 133 // Insert empty <a> tag with the following attributes: 134 // * class="email" 135 // * rel="example|domain.com" where pipe char '|' replaces '@' 136 // * title="Email Us", this is the text shown after the email link is created by js 137 $emailLinks.addClass('addicon').emailProt(); 138 139// Open external links in new windows 140 var domainName = window.location.hostname; 141 $('a[href^="http://"], a[href^="https://"]').not('a[href*="' + domainName + '"]').addClass('external').attr('target', '_blank'); 142 143 144 145}); // end doc ready
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.