1/** 2 * Finalmenu 3 * 4 * @author: Matej Berka 5 * site: www.marpaweb.eu 6 */ 7$(document).ready(function() { 8 9 $('.top-link-wrapper .show-items-icon').click(function(e){ 10 var current = $(this).parents('.top-link-wrapper').siblings('.FINALmenu-tab-content'); 11 $('.FINALmenu-tab-content').not(current).hide(); 12 current.toggle(); 13 }); 14 15 $('.FINALmenu-tab-content li .show-items-icon').mouseover(function(){ 16 $(this).siblings('.hidden-categories').toggle(); 17 }); 18 19 $('#FINALmenu-mobile-nav li').click(function(e) { 20 if($(e.target).is('a')){ 21 return; 22 } 23 var ul = $(' > ul', this); 24 if(ul.is(':visible')) { 25 ul.slideUp(); 26 $('> i', this).removeClass('icon-minus').addClass('icon-plus'); 27 } else { 28 ul.slideDown(); 29 $('> i', this).removeClass('icon-plus').addClass('icon-minus'); 30 } 31 e.stopPropagation(); 32 }); 33 34 $('.menu-place-holder').click(function(e) { 35 $('#FINALmenu-mobile-nav').slideToggle(); 36 }); 37}); 38 39$(window).on({ 'touchstart' : function(e) { 40 if(!($(e.target).is('.hidden-categories'))) { 41 $('#FINALmenu-vertical .hidden-categories, #FINALmenu-desktop-nav .hidden-categories').hide(); 42 } 43 } }); 44 45$(window).load(function() { 46 var menuHeight = $("#FINALmenu-desktop-nav").height(); 47 var tabActive = false; 48 $("#FINALmenu .FINALmenu-tab-content").css("top", menuHeight); 49 50 if(!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))) { 51 // hover effects only for desktop users 52 $('#FINALmenu-desktop-nav > li').mouseenter(function(e){ 53 var el = $(this); 54 var timerIn = setTimeout(function() { 55 var menuTatShow = $('.FINALmenu-tab-content', el); 56 menuTatShow.css('display', 'block'); 57 menuTatShow.removeClass(menuAnimateOutHorizontal); 58 menuTatShow.addClass(menuAnimateInHorizontal); 59 60 setTimeout(function(){ 61 tabActive = true; 62 for (var i = 0; i < menuSliders.length; i++) { 63 menuSliders[i].reloadSlider(); 64 } 65 }, 200); 66 67 e.stopPropagation(); 68 }, 100); 69 el.mouseleave(function(event) { 70 clearTimeout(timerIn); 71 }); 72 }).mouseleave(function(e) { 73 var el = $(this); 74 var timerOut = setTimeout(function() { 75 var menuTatShow = $('.FINALmenu-tab-content', el); 76 menuTatShow.removeClass(menuAnimateInHorizontal); 77 menuTatShow.addClass(menuAnimateOutHorizontal); 78 79 setTimeout(function(){ 80 tabActive = false; 81 menuTatShow.css('display', 'none'); 82 }, 200); 83 e.stopPropagation(); 84 }, 100); 85 el.mouseenter(function(event) { 86 clearTimeout(timerOut); 87 }); 88 }); 89 90 var verticalTabActive = false; 91 $('#FINALmenu-vertical-nav > li').mouseenter(function(e){ 92 var el = $(this); 93 var timerIn = setTimeout(function() { 94 var menuTatShow = $('.FINALmenu-tab-content', el); 95 menuTatShow.css('display', 'block'); 96 menuTatShow.removeClass(menuAnimateOutVertical); 97 menuTatShow.addClass(menuAnimateInVertical); 98 setTimeout(function(){ 99 verticalTabActive = true; 100 for (var i = 0; i < menuSliders.length; i++) 101 menuSliders[i].reloadSlider(); 102 }, 200); 103 104 e.stopPropagation(); 105 }, 100); 106 el.mouseleave(function(event) { 107 clearTimeout(timerIn); 108 }); 109 }).mouseleave(function(e) { 110 var el = $(this); 111 var timerOut = setTimeout(function() { 112 var menuTatShow = $('.FINALmenu-tab-content', el); 113 menuTatShow.removeClass(menuAnimateInVertical); 114 menuTatShow.addClass(menuAnimateOutVertical); 115 116 setTimeout(function(){ 117 verticalTabActive = false; 118 menuTatShow.css('display', 'none'); 119 }, 200); 120 e.stopPropagation(); 121 }, 100); 122 el.mouseenter(function(event) { 123 clearTimeout(timerOut); 124 }); 125 }); 126 127 $('.FINALmenu-tab-content li').mouseenter(function(e){
128 if(tabActive || verticalTabActive) 129 $(' > .hidden-categories', this).fadeIn(); 130 }).mouseleave(function(e) { 131 if(tabActive || verticalTabActive) 132 $(' > .hidden-categories', this).fadeOut(); 133 }); 134 135 $('.image-view').mouseenter(function() { 136 $('img:first', this).animate({ 137 opacity: '0' 138 }, 100); 139 $(' .second-image', this).animate({ 140 opacity: '1' 141 }, 200); 142 }).mouseleave(function() { 143 $('.second-image', this).animate({ 144 opacity: '0' 145 }, 100); 146 $('img:first', this).animate({ 147 opacity: '1' 148 }, 200); 149 }); 150 } 151});
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.