1/* 2 * Font replacements and jquery initialization 3 */ 4 5//Minion font replacement 6Cufon.set('fontFamily','MinionPro'); 7//Cufon('h1, .entry-content h2, #subsite-title, .sectionhead h2',{hover:false}); 8Cufon( '#subsite-title, .sectionhead h2',{hover:false}); 9 10//Myriad font replacement 11Cufon.set('fontFamily','MyriadPro'); 12//Cufon('.entry-content h3'); 13 14// Myriad Semibold 15Cufon.set('fontFamily','MyriadProSemibold'); 16Cufon('ul.root-menu>li>a', {hover:true,textShadow: '1px 1px rgba(0,0,0,0.2)'}); 17Cufon('ul.root-menu>li.find-physician>a', {textShadow: '1px 1px rgba(255,255,255,0.4)', hover:true}); 18//Cufon('#subsidiary .aside h3'); 19 20//Cufon.set('fontFamily','MinionPro'); 21//Cufon('.entry-content h3.drivingdirectionsTitle'); 22 23jQuery(document).ready(function($) { 24 //alert('loaded'); 25 //synchronizeHeights(); 26 27 // first and last selectors, pagewide 28 $('ul>li:last-child').addClass('last'); 29 $('ul>li:first-child').addClass('first'); 30 31 // Main top navigation 32 $("ul.sf-menu").superfish({ 33 delay: 400, // delay on mouseout 34 animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation 35 speed: 'fast', // faster animation speed 36 autoArrows: false, // disable generation of arrow mark-up 37 dropShadows: false, // disable drop shadows 38 onHide: function() { Cufon.refresh(); } 39 }); 40 41 // Try to prevent multiple event booking submits 42 $( ".em-booking-form" ).submit(function( event ) { 43 $('#em-booking-submit').attr('disabled','disabled'); 44 }); 45 46 // Hide booking form on reload 47 var url = window.location.href, 48 hash = url.split('#')[1]; 49 if (hash && hash === 'em-booking') { 50 $('.em-booking-form-details').hide(); 51 } 52 53 54 // Columns in the services list 55 //$('.service-list').columnizeList({cols:3,constrainWidth:0}); 56 $('.service-list').easyListSplitter({ 57 colNumber: 4, 58 direction: 'vertical' 59 }); 60 61 $('ul.threecolumns').easyListSplitter({ 62 colNumber: 3, 63 direction: 'vertical' 64 }); 65 66 $('ul.twocolumns').easyListSplitter({ 67 colNumber: 2, 68 direction: 'vertical' 69 }); 70 71 /** All providers list, alphabetical breakdown **/ 72 if ( $('#providerlist').length > 0) 73 { 74 $('#providerlist').listnav( 75 { 76 initLetter:'a', 77 includeAll: false, 78 includeOther: false, 79 onClick: function(letter){ synchronizeHeights(); } 80 } 81 ); 82 $('#providerlist').show(); 83 } 84 85 // Sub-menus for service pages 86 $('#primary.aside ul.menu>li').hoverIntent( 87 function() { 88 $(this).addClass('hover'); 89 $('ul',this).fadeIn('fast'); 90 $(this).append('<div class="arrow"></div>'); 91 }, 92 function() { 93 $(this).removeClass('hover'); 94 $('ul',this).hide(); 95 $('.arrow',this).remove(); 96 }); 97 98 // Activate Date inputs 99 // Assumes JQuery Tools are loaded 100 // $(":date").dateinput(); 101 102 // Activate Jump lists 103 $('select.jumplist').change(function() { 104 window.location = $(this).val(); 105 }); 106 107 // Special padding for physician bio second columns on pages that have both videos and bios 108 if ($('.physician-profile .columnwrapper.hasvideo.hasbio .biocolumn.second').length > 0) 109 { 110 var padding = $('.physician-profile .columnwrapper.hasvideo.hasbio .video').height() + 10; 111 $('.physician-profile .columnwrapper.hasvideo.hasbio .biocolumn.second').css('padding-top',padding + "px"); 112 } 113 114 /** Manual tracking for pdf views **/ 115 $("a[href$='pdf']").each(function(index) { 116 pdfLabel = $(this).attr('href'); 117 pdfOnClick = "_gaq.push(['_trackEvent', 'PDF', 'Download ', '" + pdfLabel + "']);"; 118 $(this).attr("onClick", pdfOnClick); 119 }); 120 121 122 // initialize scrollable 123 if ($(".scrollable").length > 0) 124 { 125 // set a fixed width for the scrollable area 126 var count = $(".scrollable>.items>div").size(); 127 var itemwidth = $(".scrollable").width(); 128 $(".scrollable .items").width(count*itemwidth); 129 // activate scrollable 130 var root = $(".scrollable").scrollable({circular:true}).autoscroll({interval:6000}); 131 //var root = $(".scrollable").scrollable({circular:true}); 132 window.api = root.data("scrollable"); 133 } 134 135 if ($(".twocolumns").length > 0) 136 { 137 $('.twocolumns').columnize({ width:300 }); 138 } 139 140 141 142}); 143 144 145// executes when complete page is fully loaded, including all frames, objects and images 146jQuery(window).load(function() 147{ 148 var $ = jQuery; 149 synchronizeHeights(); 150}); 151 152 153// Executes when Cufon is finished 154Cufon.CSS.ready(function() { 155 //alert('cufon ready'); 156 var $ = jQuery; 157 158 // adjust menu width 159 // Adds extra right padding to top level menu elements to fill the horizontal space 160 // Ignores the "Find a Physician" Button, which is unique 161 if ($('#access').length > 0) 162 { 163 var menuDiff = $('#access .uchealth-menu').width() - $('#access .uchealth-menu>ul').width(); 164 165 if (menuDiff > 0) 166 { 167 // count the main elements 168 var menuCount = $('#access .uchealth-menu>ul>
168li:not(.find-physician)>a').length; 169 var extraPadding = Math.floor(menuDiff/menuCount); 170 var rightPadding = $('#access .uchealth-menu>ul>li:not(.find-physician)>a').css('padding-right').replace(/px/gi, ""); 171 var newPadding = parseInt(extraPadding) + parseInt(rightPadding) -1; 172 $('#access .uchealth-menu>ul>li:not(.find-physician)>a').css('padding-right', newPadding + "px"); 173 // try to fix for IE7 174 $('.msie #access .uchealth-menu>ul>li:not(.find-physician)>a').css('padding-right', newPadding-1 + "px"); 175 } 176 $('#access>uchealth-menu').show(); 177 } 178 179 /// Height Fix 180 //synchronizeHeights(); 181}); 182 183 184/** Method to match sidebar heights to content heights **/ 185/** Note that right now it does not manipulate the height of right sidebar **/ 186function synchronizeHeights() 187{ 188 /*var $ = jQuery; 189 var leftHeight = 0; 190 var rightHeight = 0; 191 var centerHeight = 0; 192 var containerHeight = 0; 193 var height = 0; 194 195 if ($('#content').length > 0) 196 { 197 $('#content').height('auto'); 198 centerHeight = $('#content').height(); 199 200 if ($('.banner-wrapper').length > 0) 201 centerHeight += $('.banner-wrapper').height(); 202 } 203 204 if ($('#primary').length > 0) 205 { 206 $('#primary').height('auto'); 207 margintop = parseInt(($('#primary').css('margin-top')).replace('px','')); 208 leftHeight = $('#primary').height() + margintop; 209 } 210 211 if ($('#secondary').length > 0) 212 { 213 $('#secondary').height('auto'); 214 rightmargintop = parseInt(($('#secondary').css('margin-top')).replace('px','')); 215 rightHeight = $('#secondary').height() + margintop; 216 } 217 218 if ($('#container').length > 0) 219 { 220 containerHeight = $('#container').height(); 221 } 222 223 //alert("leftHeight:" + leftHeight + ", rightHeight:" + rightHeight); 224 225 height = centerHeight; 226 if (leftHeight > height && $('.home.hospitaltemplate').length==0 ) 227 { 228 //alert('adjust content height to match left'); 229 height = leftHeight; 230 $('#container').height(height); 231 } 232 if (rightHeight > height && rightHeight > leftHeight) 233 { 234 //alert('adjust content height to match right'); 235 height = rightHeight - 40; 236 $('#container').height(rightHeight + 20); 237 } 238 if (leftHeight < height) 239 { 240 $('#primary').height(height); 241 } 242 /*if ($('#container').length > 0) 243 $('#container').height(height); 244 if ($('#primary').length > 0) 245 $('#primary').height(height);*/ 246 247 // in case the container is shrunk too small 248 // happens on search results page 249 //if ($('#content').height() > $('#container').height()) 250 // $('#container').height('auto');*/ 251 252 var $ = jQuery; 253 var maxHeight = -1; 254 255 //$( "#container" ).addClass( "equal" ); 256 $( "#primary" ).addClass( "equal" ); 257 $( "#secondary" ).addClass( "equal" ); 258 $( "#right-side-content" ).addClass( "equal" ); 259 $( "#content" ).addClass( "equal" ); 260 $( "#results" ).addClass( "equal" ); 261 262 $('.equal').each(function() { 263 $(this).height('auto'); 264 var testHeight = $(this).height(); 265 266 if ($(this).attr("id") == "results" ) 267 { 268 testHeight+=100; 269 } 270 271 maxHeight = maxHeight > testHeight ? maxHeight : testHeight; 272 }); 273 274 $('.equal').each(function() { 275 //$(this).height(maxHeight); 276 $(this).css('min-height',maxHeight+"px"); 277 }); 278 279} 280
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.