1 2$(document).ready(function(){ 3 $("#pt_menu_link ul li").each(function(){ 4 var url = document.URL; 5 $("#pt_menu_link ul li a").removeClass("act"); 6 $('#pt_menu_link ul li a[href="'+url+'"]').addClass('act'); 7 }); 8 9 $('.pt_menu_no_child').hover(function(){ 10 $(this).addClass("active"); 11 },function(){ 12 $(this).removeClass("active"); 13 }) 14 15 $('.pt_menu').hover(function(){ 16 if($(this).attr("id") != "pt_menu_link"){ 17 $(this).addClass("active"); 18 } 19 },function(){ 20 $(this).removeClass("active"); 21 }) 22 23 $('.pt_menu').hover(function(){ 24 /*show popup to calculate*/ 25 $(this).find('.popup').css('display','inline-block'); 26 27 /* get total padding + border + margin of the popup */ 28 var extraWidth = 0 29 var wrapWidthPopup = $(this).find('.popup').outerWidth(true); /*include padding + margin + border*/ 30 var actualWidthPopup = $(this).find('.popup').width(); /*no padding, margin, border*/ 31 extraWidth = wrapWidthPopup - actualWidthPopup; 32 33 /* calculate new width of the popup*/ 34 var widthblock1 = $(this).find('.popup .block1').outerWidth(true); 35 var widthblock2 = $(this).find('.popup .block2').outerWidth(true); 36 var new_width_popup = 0; 37 if(widthblock1 && !widthblock2){ 38 new_width_popup = widthblock1; 39 } 40 if(!widthblock1 && widthblock2){ 41 new_width_popup = widthblock2; 42 } 43 if(widthblock1 && widthblock2){ 44 if(widthblock1 >= widthblock2){ 45 new_width_popup = widthblock1; 46 } 47 if(widthblock1 < widthblock2){ 48 new_width_popup = widthblock2; 49 } 50 } 51 var new_outer_width_popup = new_width_popup + extraWidth; 52 53 54 /*return popup display none*/ 55 $(this).find('.popup').css('display','none'); 56 57 /*show hide popup*/ 58 if(VMEGAMENU_POPUP_EFFECT == 0) $(this).find('.popup').stop(true,true).slideDown('slow'); 59 if(VMEGAMENU_POPUP_EFFECT == 1) $(this).find('.popup').stop(true,true).fadeIn('slow'); 60 if(VMEGAMENU_POPUP_EFFECT == 2) $(this).find('.popup').stop(true,true).show('slow'); 61 },function(){ 62 if(VMEGAMENU_POPUP_EFFECT == 0) $(this).find('.popup').stop(true,true).slideUp(); 63 if(VMEGAMENU_POPUP_EFFECT == 1) $(this).find('.popup').stop(true,true).fadeOut('slow'); 64 if(VMEGAMENU_POPUP_EFFECT == 2) $(this).find('.popup').stop(true,true).hide('fast'); 65 }) 66});
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.