/** * Blackoot Lite WordPress Theme by Iceable Themes | http://www.iceablethemes.com * Copyright 2014 Mathieu Sarrasin - Iceable Media * Javascripts */ jQuery(document).ready(function(e){e("#dropdown-menu").change(function(){var t=e("#dropdown-menu").val();e(location).attr("href",t)}),e("ul.sf-menu").superfish({delay:700,animation:{opacity:"show",height:"show"},speed:"normal",autoArrows:!1,dropShadows:!1})}),function(e){e.fn.hoverIntent=function(t,n){var s={sensitivity:7,interval:100,timeout:0};s=e.extend(s,n?{over:t,out:n}:t);var o,i,a,r,h=function(e){o=e.pageX,i=e.pageY},l=function(t,n){return n.hoverIntent_t=clearTimeout(n.hoverIntent_t),Math.abs(a-o)+Math.abs(r-i) »'].join("")),i=function(){var t=e(this),n=r(t);clearTimeout(n.sfTimer),t.showSuperfishUl().siblings().hideSuperfishUl()},a=function(){var t=e(this),s=r(t),o=n.op;clearTimeout(s.sfTimer),s.sfTimer=setTimeout(function(){o.retainPath=e.inArray(t[0],o.$path)>-1,t.hideSuperfishUl(),o.$path.length&&t.parents(["li.",o.hoverClass].join("")).length<1&&i.call(o.$path)},o.delay)},r=function(e){var t=e.parents(["ul.",s.menuClass,":first"].join(""))[0];return n.op=n.o[t.serial],t},h=function(e){e.addClass(s.anchorClass).append(o.clone())};return this.each(function(){var o=this.serial=n.o.length,r=e.extend({},n.defaults,t);r.$path=e("li."+r.pathClass,this).slice(0,r.pathLevels).each(function(){e(this).addClass([r.hoverClass,s.bcClass].join(" ")).filter("li:has(ul)").removeClass(r.pathClass)}),n.o[o]=n.op=r,e("li:has(ul)",this)[e.fn.hoverIntent&&!r.disableHI?"hoverIntent":"hover"](i,a).each(function(){r.autoArrows&&h(e(">a:first-child",this))}).not("."+s.bcClass).hideSuperfishUl();var l=e("a",this);l.each(function(e){var t=l.eq(e).parents("li");l.eq(e).focus(function(){i.call(t)}).blur(function(){a.call(t)})}),r.onInit.call(this)}).each(function(){var t=[s.menuClass];!n.op.dropShadows||e.browser.msie&&e.browser.version<7||t.push(s.shadowClass),e(this).addClass(t.join(" "))})};var t=e.fn.superfish;t.o=[],t.op={},t.IE7fix=function(){var n=t.op;e.browser.msie&&e.browser.version>6&&n.dropShadows&&void 0!=n.animation.opacity&&this.toggleClass(t.c.shadowClass+"-off")},t.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"},t.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:!0,dropShadows:!0,disableHI:!1,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}},e.fn.extend({hideSuperfishUl:function(){var n=t.op,s=n.retainPath===!0?n.$path:"";n.retainPath=!1;var o=e(["li.",n.hoverClass].join(""),this).add(this).not(s).removeClass(n.hoverClass).find(">ul").hide().css("visibility","hidden");return n.onHide.call(o),this},showSuperfishUl:function(){var e=t.op,n=(t.c.shadowClass+"-off",this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible"));return t.IE7fix.call(n),e.onBeforeShow.call(n),n.animate(e.animation,e.speed,function(){t.IE7fix.call(n),e.onShow.call(n)}),this}})}(jQuery);