1$(document).ready(function() { 2 3 var mbar = $('#bar'); 4 5 /* 6 * Search bar focus 7 */ 8 $('form.bar-search', mbar).bind('focusin focusout', function() { 9 $(this).toggleClass('bar-focused'); 10 }); 11 12 13 /* 14 * Dropdowns - open/close on click and close if clicked elsewhere 15 */ 16 var dropdowns = $('.bar-languages, .bar-arrow-container, .bar-login-container, .bar-settings-container', mbar); 17 18 jQuery.fn.closeDropdowns = function() { 19 $('.bar-triggered', this).removeClass('bar-triggered'); 20 $('.bar-dropdown-open', this).removeClass('bar-dropdown-open'); 21 } 22 23 $('body').click(function(e) { 24 dropdowns.closeDropdowns(); 25 }); 26 27 $('.bar-trigger', dropdowns).click(function(e) { 28 e.stopPropagation(); 29 30 dropdowns.not($(this).parent()).closeDropdowns(); 31 $(this).toggleClass('bar-triggered'); 32 $(this).next('.bar-dropdown').toggleClass('bar-dropdown-open'); 33 }); 34 35 $('.bar-dropdown', dropdowns).click(function(e) { 36 e.stopPropagation(); 37 }); 38 39 40 /* 41 * Warning baloon 42 */ 43 $('.bar-warning', mbar).bind('mouseenter mouseleave', function() { 44 $(this).toggleClass('bar-warning-show'); 45 }); 46 47 48 /* 49 * Sections' height calculation 50 */ 51 function sectionsHeight() { 52 var iPadPortrait = 768; 53 var langDropdown = $('.bar-languages .bar-dropdown', mbar); 54 55 if ($(window).width() > iPadPortrait) { 56 $('.bar-column', mbar).outerHeight($('.bar-dropdown', mbar).height()); 57 langDropdown.removeClass('bar-dropdown-menu'); 58 } 59 else { 60 langDropdown.addClass('bar-dropdown-menu'); 61 } 62 } 63 64 $(window).resize(sectionsHeight); 65 66 67 /* 68 * INIT 69 */ 70 sectionsHeight(); 71 72}); 73 74function submitForm(actionParam) { 75 document.forms[0].action = actionParam; 76 document.forms[0].submit; 77 return false; 78}
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.