(function(n){n.fn.hoverIntent=function(t,i){var r={sensitivity:7,interval:100,timeout:0};r=n.extend(r,i?{over:t,out:i}:t);var u,f,e,o,s=function(n){u=n.pageX;f=n.pageY},h=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(e-u)+Math.abs(o-f)<r.sensitivity)return n(i).unbind("mousemove",s),i.hoverIntent_s=1,r.over.apply(i,[t]);e=u;o=f;i.hoverIntent_t=setTimeout(function(){h(t,i)},r.interval)},l=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,r.out.apply(t,[n])},c=function(t){for(var u=(t.type=="mouseover"?t.fromElement:t.toElement)||t.relatedTarget,f,i;u&&u!=this;)try{u=u.parentNode}catch(t){u=this}if(u==this)return!1;f=jQuery.extend({},t);i=this;i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t));t.type=="mouseover"?(e=f.pageX,o=f.pageY,n(i).bind("mousemove",s),i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){h(f,i)},r.interval))):(n(i).unbind("mousemove",s),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){l(f,i)},r.timeout)))};return this.mouseover(c).mouseout(c)}})(jQuery);var touchDevice=!1;window.addEventListener("touchstart",function(){touchDevice=!0},!1);$(function(){function n(){$(this).addClass("hovering")}function t(){$(this).removeClass("hovering")}var i={interval:1,sensitivity:6,over:n,timeout:100,out:t};if($(".switchBlock").hover(function(){$("#off_"+$(this).attr("data-link")).hide();$("#on_"+$(this).attr("data-link")).show()},function(){$("#on_"+$(this).attr("data-link")).hide();$("#off_"+$(this).attr("data-link")).show()}),$("li.subMenu").hoverIntent(i),touchDevice)$("li.subMenu").on("click",function(n){n.preventDefault();n.stopPropagation();$(this).toggleClass("hovering")})})