1var device; 2 3function setDeviceType() { 4 device = $(window).outerWidth() <= 885 ? 'mobile' : 'desktop'; 5 $('body').removeClass().addClass(device); 6} 7 8$(document).ready(function () { 9 10 $("#txtSearch").keyup(function(e) { 11 var key = e.keyCode || e.which; 12 if (key === 13) { 13 // Do something 14 $( "#btnSearch" ).trigger( "click" ); 15 e.preventDefault(); 16 } 17 }); 18 19 $("#txtSearch").keydown(function(e) { 20 var key = e.keyCode || e.which; 21 if (key === 13) { 22 // Do something 23 $( "#btnSearch" ).trigger( "click" ); 24 e.preventDefault(); 25 } 26 }); 27 28 29 30 if ($('.chosen-select')[0]) { 31 //Select Boxes 32 var config = { 33 '.chosen-select': { 34 disable_search_threshold: 2 35 }, 36 } 37 for (var selector in config) { 38 $(selector).chosen(config[selector]); 39 } 40 } 41 42 43 44 setDeviceType(); 45 projectPopupPos(); 46 $(window).resize(function () { 47 setDeviceType(); 48 projectPopupPos(); 49 }); 50 51 /* Menu 2 */ 52 //if MOBILE{ 53 $(document).click(function (e) { 54 if (device == 'mobile') { 55 console.log('mobile'); 56 //HANDLE MAIN MENUS 57 var target = $(e.target), 58 menuBtn = '.mobile-menu-btn', 59 menuHolder = '.mobile-menu-holder', 60 thisMenuBtn = target.closest(menuBtn), 61 thisMenuHolder = thisMenuBtn.next(menuHolder); 62 63 console.log(target); 64 65 // target = menu btn 66 if (thisMenuBtn.length) { 67 thisMenuBtn.toggleClass('open'); 68 thisMenuHolder.toggleClass('open'); 69 } 70 // target = outside menu 71 else if (!target.parents(menuHolder).length) { 72 $(menuBtn).removeClass('open'); 73 $(menuHolder).removeClass('open'); 74 } 75 76 77 78 //HANDLE SUB MENUS 79 var subMenu = '.sub_menu_holder', 80 thisSubMenu = $(e.target).parents(subMenu); 81 82 83 $(subMenu).not(thisSubMenu).removeClass('open'); 84 85 if ($(e.target).parent(subMenu).length) 86 thisSubMenu.toggleClass('open'); 87 88 89 if ($('.mobile-menu-holder').hasClass('open')) { 90 setTimeout(function () { 91 $('html,body').animate({ 92 scrollTop: $('#main_menu_2').offset().top 93 }, '500', 'swing'); 94 }, 500); 95 } 96 //e.preventDefault(); 97 } 98 99 100 }); 101 102 //if DESKTOP 103 if (device == 'desktop') { 104 $("ul.dropdown li").hover(function () { 105 console.log('desktop'); 106 107 $(this).addClass("hover"); 108 }, function () { 109 $(this).removeClass("hover"); 110 }); 111 $(".desktop ul.dropdown li ul li:has(ul)").find("a:first").addClass("submenu").append("<span>»</span>"); 112 113 } 114 115 116 //Set position of project num popup 117 function projectPopupPos() { 118 119 var posTop = $('#header').offset().top + $('#header').outerHeight(); 120 var posRight = ($(window).outerWidth() - $('#header').width()) / 2; 121 122 $('#project-popup').css({ 123 'top': posTop, 124 'right': posRight, 125 'display': 'block' 126 }); 127 128 $('#fb-popup').css({ 129 'top': posTop + $('#project-popup').height() + 20, 130 'right': posRight, 131 'display': 'block' 132 }); 133 } 134 135 if ($('.bxslider img').length > 0) { 136 $('.bxslider img').show(); 137 // SlideShow 138 $('.bxslider').bxSlider({ 139 pager: false, 140 auto: true, 141 pause: 4000, 142 mode: 'fade' 143 144 }); 145 } 146 }); 147 148var b = document.documentElement; 149b.setAttribute('data-useragent', navigator.userAgent); 150b.setAttribute('data-platform', navigator.platform); 151//html[data-useragent*='Chrome/13.0']{}
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.