(function(b){b.fn.superfish=function(g){var h=b.fn.superfish,k=h.c,j=false,l=b(['<span class="',k.arrowClass,'"> &#187;</span>'].join("")),m=function(n){var c=b(this),q=e(c),p=h.op;if(p.firstOnClick&&!j&&c.parent()[0]==q){j=true;clearTimeout(q.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl();n.stopPropagation();return false}},i=function(){var c=b(this),p=e(c),n=h.op;if(!n.firstOnClick||j||c.parent()[0]!=p){clearTimeout(p.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()}},f=function(){var c=b(this),p=e(c),n=h.op;clearTimeout(p.sfTimer);p.sfTimer=setTimeout(function(){n.retainPath=(b.inArray(c[0],n.$path)>-1);c.hideSuperfishUl();if(n.$path.length&&c.parents(["li.",n.hoverClass].join("")).length<1){i.call(n.$path)}else{j=false}},n.delay)},e=function(c){var n=c.parents(["ul.",k.menuClass,":first"].join(""))[0];h.op=h.o[n.serial];return n},d=function(c){c.addClass(k.anchorClass).append(l.clone())};return this.each(function(){var c=this.serial=h.o.length;var p=b.extend({},h.defaults,g);p.$path=b("li."+p.pathClass,this).slice(0,p.pathLevels).each(function(){b(this).addClass([p.hoverClass,k.bcClass].join(" ")).filter("li:has(ul)").removeClass(p.pathClass)});h.o[c]=h.op=p;b("li:has(ul)",this)[(b.fn.hoverIntent&&!p.disableHI)?"hoverIntent":"hover"](i,f).click(m).each(function(){if(p.autoArrows){d(b(">a:first-child",this))}}).not("."+k.bcClass).hideSuperfishUl();var n=b("a",this);n.each(function(o){var q=n.eq(o).parents("li");n.eq(o).focus(function(){i.call(q)}).blur(function(){f.call(q)})});p.onInit.call(this)}).each(function(){var c=[k.menuClass];if(h.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(k.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){},firstOnClick:false};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);
