PageSourceSearch

http://www.picabo.com/wp-content/themes/seoc-cleanonline/js/superfish.js

js picabo.com collected 2026-10-02 19:45:49 UTC 3,706 bytes, 118 lines download raw bytes

1/*
2 * Superfish v1.4.8 - jQuery menu widget
3 * Copyright (c) 2008 Joel Birch
4 *
5 * Dual licensed under the MIT and GPL licenses:
6 * 	http://www.opensource.org/licenses/mit-license.php
7 * 	http://www.gnu.org/licenses/gpl.html
8 *
9 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
10 */ ;(function($){
11	$.fn.superfish = function(op){
12
13		var sf = $.fn.superfish,
14			c = sf.c,
15			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
16			over = function(){
17				var $$ = $(this), menu = getMenu($$);
18				clearTimeout(menu.sfTimer);
19				$$.showSuperfishUl().siblings().hideSuperfishUl();
20			},
21			out = function(){
22				var $$ = $(this), menu = getMenu($$), o = sf.op;
23				clearTimeout(menu.sfTimer);
24				menu.sfTimer=setTimeout(function(){
25					o.retainPath=($.inArray($$[0],o.$path)>-1);
26					$$.hideSuperfishUl();
27					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
28				},o.delay);	
29			},
30			getMenu = function($menu){
31				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
32				sf.op = sf.o[menu.serial];
33				return menu;
34			},
35			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
36			
37		return this.each(function() {
38			var s = this.serial = sf.o.length;
39			var o = $.extend({},sf.defaults,op);
40			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
41				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
42					.filter('li:has(ul)').removeClass(o.pathClass);
43			});
44			sf.o[s] = sf.op = o;
45			
46			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
47				if (o.autoArrows) addArrow( $('>a:first-child',this) );
48			})
49			.not('.'+c.bcClass)
50				.hideSuperfishUl();
51			
52			var $a = $('a',this);
53			$a.each(function(i){
54				var $li = $a.eq(i).parents('li');
55				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
56			});
57			o.onInit.call(this);
58			
59		}).each(function() {
60			menuClasses = [c.menuClass];
61			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
62			$(this).addClass(menuClasses.join(' '));
63		});
64	};
65
66	var sf = $.fn.superfish;
67	sf.o = [];
68	sf.op = {};
69	sf.IE7fix = function(){
70		var o = sf.op;
71		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
72			this.toggleClass(sf.c.shadowClass+'-off');
73		};
74	sf.c = {
75		bcClass     : 'sf-breadcrumb',
76		menuClass   : 'sf-js-enabled',
77		anchorClass : 'sf-with-ul',
78		arrowClass  : 'sf-sub-indicator',
79		shadowClass : 'sf-shadow'
80	};
81	sf.defaults = {
82		hoverClass	: 'sfHover',
83		pathClass	: 'overideThisToUse',
84		pathLevels	: 1,
85		delay		: 0,
86		animation	: {opacity:'show'},
87		speed		: 'normal',
88		autoArrows	: true,
89		dropShadows : true,
90		disableHI	: false,		// true disables hoverIntent detection
91		onInit		: function(){}, // callback functions
92		onBeforeShow: function(){},
93		onShow		: function(){},
94		onHide		: function(){}
95	};
96	$.fn.extend({
97		hideSuperfishUl : function(){
98			var o = sf.op,
99				not = (o.retainPath===true) ? o.$path : '';
100			o.retainPath = false;
101			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
102					.find('>ul').hide().css('visibility','hidden');
103			o.onHide.call($ul);
104			return this;
105		},
106		showSuperfishUl : function(){
107			var o = sf.op,
108				sh = sf.c.shadowClass+'-off',
109				$ul = this.addClass(o.hoverClass)
110					.find('>ul:hidden').css('visibility','visible');
111			sf.IE7fix.call($ul);
112			o.onBeforeShow.call($ul);
113			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
114			return this;
115		}
116	});
117
118})(jQuery);

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.