1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10/* 11 * jQuery Superfish Menu Plugin 12 * Copyright (c) 2013 Joel Birch 13 * 14 * Dual licensed under the MIT and GPL licenses: 15 * https://www.opensource.org/licenses/mit-license.php 16 * https://www.gnu.org/licenses/gpl.html 17 */ 18 19(function ($) { 20 "use strict"; 21 22 var methods = (function () { 23 // private properties and methods go here 24 var c = { 25 bcClass: 'sf-breadcrumb', 26 menuClass: 'sf-js-enabled', 27 anchorClass: 'sf-with-ul', 28 menuArrowClass: 'sf-arrows' 29 }, 30 ios = (function () { 31 var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent); 32 if (ios) { 33 // iOS clicks only bubble as far as body children 34 $(window).load(function () { 35 $('body').children().on('click', $.noop); 36 }); 37 } 38 return ios; 39 })(), 40 wp7 = (function () { 41 var style = document.documentElement.style; 42 return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent)); 43 })(), 44 toggleMenuClasses = function ($menu, o) { 45 var classes = c.menuClass; 46 if (o.cssArrows) { 47 classes += ' ' + c.menuArrowClass; 48 } 49 $menu.toggleClass(classes); 50 }, 51 setPathToCurrent = function ($menu, o) { 52 return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) 53 .addClass(o.hoverClass + ' ' + c.bcClass) 54 .filter(function () { 55 return ($(this).children(o.popUpSelector).hide().show().length); 56 }).removeClass(o.pathClass); 57 }, 58 toggleAnchorClass = function ($li) { 59 $li.children('a').toggleClass(c.anchorClass); 60 }, 61 toggleTouchAction = function ($menu) { 62 var touchAction = $menu.css('ms-touch-action'); 63 touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y'; 64 $menu.css('ms-touch-action', touchAction); 65 }, 66 applyHandlers = function ($menu, o) { 67 var targets = 'li:has(' + o.popUpSelector + ')'; 68 if ($.fn.hoverIntent && !o.disableHI) { 69 $menu.hoverIntent(over, out, targets); 70 } 71 else { 72 $menu 73 .on('mouseenter.superfish', targets, over) 74 .on('mouseleave.superfish', targets, out); 75 } 76 var touchevent = 'MSPointerDown.superfish'; 77 if (!ios) { 78 touchevent += ' touchend.superfish'; 79 } 80 if (wp7) { 81 touchevent += ' mousedown.superfish'; 82 } 83 $menu 84 .on('focusin.superfish', 'li', over) 85 .on('focusout.superfish', 'li', out) 86 .on(touchevent, 'a', o, touchHandler); 87 }, 88 touchHandler = function (e) { 89 var $this = $(this), 90 $ul = $this.siblings(e.data.popUpSelector); 91 92 if ($ul.length > 0 && $ul.is(':hidden')) { 93 $this.one('click.superfish', false); 94 if (e.type === 'MSPointerDown') { 95 $this.trigger('focus'); 96 } else { 97 $.proxy(over, $this.parent('li'))(); 98 } 99 } 100 }, 101 over = function () { 102 var $this = $(this), 103 o = getOptions($this); 104 clearTimeout(o.sfTimer); 105 $this.siblings().superfish('hide').end().superfish('show'); 106 }, 107 out = function () { 108 var $this = $(this), 109 o = getOptions($this); 110 if (ios) { 111 $.proxy(close, $this, o)(); 112 } 113 else { 114 clearTimeout(o.sfTimer); 115 o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay); 116 } 117 }, 118 close = function (o) { 119 o.retainPath = ($.inArray(this[0], o.$path) > -1); 120 this.superfish('hide'); 121 122 if (!this.parents('.' + o.hoverClass).length) { 123 o.onIdle.call(getMenu(this)); 124 if (o.$path.length) { 125 $.proxy(over, o.$path)(); 126 } 127 } 128 }, 129 getMenu = function ($el) { 130 return $el.closest('.' + c.menuClass); 131 }, 132 getOptions = function ($el) { 133 return getMenu($el).data('sf-options'); 134 }; 135 136 return { 137 // public methods 138 hide: function (instant) { 139 if (this.length) { 140 var $this = this, 141 o = getOptions($this); 142 if (!o) { 143 return this; 144 } 145 var not = (o.retainPath === true) ? o.$path : '', 146 $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), 147 speed = o.speedOut; 148 149 if (instant) { 150 $ul.show(); 151 speed = 0; 152 } 153 o.retainPath = false;
154 o.onBeforeHide.call($ul); 155 156 // gdlr modify 157 var gdlr_input = false; 158 $(this).find('input:focus').each(function(){ gdlr_input = true; }); 159 if(gdlr_input) return $(this); 160 161 $ul.stop(true, true).animate(o.animationOut, speed, function () { 162 var $this = $(this); 163 o.onHide.call($this); 164 }); 165 } 166 return this; 167 }, 168 show: function () { 169 var o = getOptions(this); 170 if (!o) { 171 return this; 172 } 173 var $this = this.addClass(o.hoverClass), 174 $ul = $this.children(o.popUpSelector); 175 176 o.onBeforeShow.call($ul); 177 $ul.stop(true, true).animate(o.animation, o.speed, function () { 178 o.onShow.call($ul); 179 }); 180 return this; 181 }, 182 destroy: function () { 183 return this.each(function () { 184 var $this = $(this), 185 o = $this.data('sf-options'), 186 $hasPopUp; 187 if (!o) { 188 return false; 189 } 190 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 191 clearTimeout(o.sfTimer); 192 toggleMenuClasses($this, o); 193 toggleAnchorClass($hasPopUp); 194 toggleTouchAction($this); 195 // remove event handlers 196 $this.off('.superfish').off('.hoverIntent'); 197 // clear animation's inline display style 198 $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) { 199 return style.replace(/display[^;]+;?/g, ''); 200 }); 201 // reset 'current' path classes 202 o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); 203 $this.find('.' + o.hoverClass).removeClass(o.hoverClass); 204 o.onDestroy.call($this); 205 $this.removeData('sf-options'); 206 }); 207 }, 208 init: function (op) { 209 return this.each(function () { 210 var $this = $(this); 211 if ($this.data('sf-options')) { 212 return false; 213 } 214 var o = $.extend({}, $.fn.superfish.defaults, op), 215 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 216 o.$path = setPathToCurrent($this, o); 217 218 $this.data('sf-options', o); 219 220 toggleMenuClasses($this, o); 221 toggleAnchorClass($hasPopUp); 222 toggleTouchAction($this); 223 applyHandlers($this, o); 224 225 $hasPopUp.not('.' + c.bcClass).superfish('hide', true); 226 227 o.onInit.call(this); 228 }); 229 } 230 }; 231 })(); 232 233 $.fn.superfish = function (method, args) { 234 if (methods[method]) { 235 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 236 } 237 else if (typeof method === 'object' || ! method) { 238 return methods.init.apply(this, arguments); 239 } 240 else { 241 return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); 242 } 243 }; 244 245 $.fn.superfish.defaults = { 246 popUpSelector: 'ul,.sf-mega', // within menu context 247 hoverClass: 'sfHover', 248 pathClass: 'overrideThisToUse', 249 pathLevels: 1, 250 delay: 800, 251 animation: {opacity: 'show'}, 252 animationOut: {opacity: 'hide'}, 253 speed: 'normal', 254 speedOut: 'fast', 255 cssArrows: true, 256 disableHI: false, 257 onInit: $.noop, 258 onBeforeShow: $.noop, 259 onShow: $.noop, 260 onBeforeHide: $.noop, 261 onHide: $.noop, 262 onIdle: $.noop, 263 onDestroy: $.noop 264 }; 265 266 // soon to be deprecated 267 $.fn.extend({ 268 hideSuperfishUl: methods.hide, 269 showSuperfishUl: methods.show 270 }); 271 272})(jQuery); 273 274}
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.