/** * BoldR Lite WordPress Theme by Iceable Themes | http://www.iceablethemes.com * Copyright 2013 Mathieu Sarrasin - Iceable Media * Javascripts * Includes: hoverIntent by Brian Cherne * Includes: Superfish v1.4.8 Copyright (c) 2008 Joel Birch */ 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,i){var n={sensitivity:7,interval:100,timeout:0};n=e.extend(n,i?{over:t,out:i}:t);var s,o,a,r,l=function(e){s=e.pageX,o=e.pageY},d=function(t,i){return i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(a-s)+Math.abs(r-o) »'].join("")),o=function(){var t=e(this),i=r(t);clearTimeout(i.sfTimer),t.showSuperfishUl().siblings().hideSuperfishUl()},a=function(){var t=e(this),n=r(t),s=i.op;clearTimeout(n.sfTimer),n.sfTimer=setTimeout(function(){s.retainPath=e.inArray(t[0],s.$path)>-1,t.hideSuperfishUl(),s.$path.length&&t.parents(["li.",s.hoverClass].join("")).length<1&&o.call(s.$path)},s.delay)},r=function(e){var t=e.parents(["ul.",n.menuClass,":first"].join(""))[0];return i.op=i.o[t.serial],t},l=function(e){e.addClass(n.anchorClass).append(s.clone())};return this.each(function(){var s=this.serial=i.o.length,r=e.extend({},i.defaults,t);r.$path=e("li."+r.pathClass,this).slice(0,r.pathLevels).each(function(){e(this).addClass([r.hoverClass,n.bcClass].join(" ")).filter("li:has(ul)").removeClass(r.pathClass)}),i.o[s]=i.op=r,e("li:has(ul)",this)[e.fn.hoverIntent&&!r.disableHI?"hoverIntent":"hover"](o,a).each(function(){r.autoArrows&&l(e(">a:first-child",this))}).not("."+n.bcClass).hideSuperfishUl();var d=e("a",this);d.each(function(e){var t=d.eq(e).parents("li");d.eq(e).focus(function(){o.call(t)}).blur(function(){a.call(t)})}),r.onInit.call(this)}).each(function(){var t=[n.menuClass];!i.op.dropShadows||e.browser.msie&&e.browser.version<7||t.push(n.shadowClass),e(this).addClass(t.join(" "))})};var t=e.fn.superfish;t.o=[],t.op={},t.IE7fix=function(){var i=t.op;e.browser.msie&&e.browser.version>6&&i.dropShadows&&void 0!=i.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 i=t.op,n=i.retainPath===!0?i.$path:"";i.retainPath=!1;var s=e(["li.",i.hoverClass].join(""),this).add(this).not(n).removeClass(i.hoverClass).find(">ul").hide().css("visibility","hidden");return i.onHide.call(s),this},showSuperfishUl:function(){var e=t.op,i=(t.c.shadowClass+"-off",this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible"));return t.IE7fix.call(i),e.onBeforeShow.call(i),i.animate(e.animation,e.speed,function(){t.IE7fix.call(i),e.onShow.call(i)}),this}})}(jQuery);