1$(document).ready(function() { 2 3 4 function megaHoverOver(){ 5 $(this).find(".sub").stop().fadeTo('fast', 1).show(); 6 7 //Calculate width of all ul's 8 (function($) { 9 jQuery.fn.calcSubWidth = function() { 10 rowWidth = 0; 11 //Calculate row 12 $(this).find("ul").each(function() { 13 rowWidth += $(this).width(); 14 }); 15 }; 16 })(jQuery); 17 18 if ( $(this).find(".row").length > 0 ) { //If row exists... 19 var biggestRow = 0; 20 //Calculate each row 21 $(this).find(".row").each(function() { 22 $(this).calcSubWidth(); 23 //Find biggest row 24 if(rowWidth > biggestRow) { 25 biggestRow = rowWidth; 26 } 27 }); 28 //Set width 29 $(this).find(".sub").css({'width' :biggestRow}); 30 $(this).find(".row:last").css({'margin':'0'}); 31 32 } else { //If row does not exist... 33 34 $(this).calcSubWidth(); 35 //Set Width 36 $(this).find(".sub").css({'width' : rowWidth}); 37 38 } 39 } 40 41 function megaHoverOut(){ 42 $(this).find(".sub").stop().fadeTo('fast', 0, function() { 43 $(this).hide(); 44 }); 45 } 46 47 48 var config = { 49 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 50 interval: 0, // number = milliseconds for onMouseOver polling interval 51 over: megaHoverOver, // function = onMouseOver callback (REQUIRED) 52 timeout: 100, // number = milliseconds delay before onMouseOut 53 out: megaHoverOut // function = onMouseOut callback (REQUIRED) 54 }; 55 56 $("ul#topnav li .sub").css({'opacity':'0'}); 57 $("ul#topnav li").hoverIntent(config); 58 59 60 61}); 62
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.