1/** 2* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ 3* <http://cherne.net/brian/resources/jquery.hoverIntent.html> 4* 5* @param f onMouseOver function || An object with configuration options 6* @param g onMouseOut function || Nothing (use configuration options object) 7* @author Brian Cherne brian(at)cherne(dot)net 8*/ 9(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);; 10/* 11 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 12 * 13 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 14 * Special thanks to Karl Swedberg for valuable input. 15 * 16 * Dual licensed under the MIT and GPL licenses: 17 * http://www.opensource.org/licenses/mit-license.php 18 * http://www.gnu.org/licenses/gpl.html 19 */ 20/* 21 * This is not the original jQuery Supposition plugin. 22 * Please refer to the README for more information. 23 */ 24 25(function($){ 26 $.fn.supposition = function(){ 27 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 28 _offset = function(dir) { 29 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 30 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 31 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 32 }, 33 onHide = function(){ 34 this.css({bottom:''}); 35 }, 36 onBeforeShow = function(){ 37 this.each(function(){ 38 var $u = $(this); 39 $u.css('display','block'); 40 var $mul = $u.closest('.sf-menu'), 41 level = $u.parents('ul').length, 42 menuWidth = $u.width(), 43 menuParentWidth = $u.closest('li').outerWidth(true), 44 menuParentLeft = $u.closest('li').offset().left, 45 totalRight = $w.width() + _offset('x'), 46 menuRight = $u.offset().left + menuWidth, 47 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 48 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 49 if (menuParentLeft < exactMenuWidth) { 50 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 51 $u.css({left:0,right:'auto'}); 52 } 53 else { 54 $u.css({left:menuParentWidth + 'px',right:'auto'}); 55 } 56 } 57 } 58 else { 59 if (menuRight > totalRight && menuParentLeft > menuWidth) { 60 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 61 $u.css({right:0,left:'auto'}); 62 } 63 else { 64 $u.css({right:menuParentWidth + 'px',left:'auto'}); 65 } 66 } 67 } 68 var windowHeight = $w.height(), 69 offsetTop = $u.offset().top, 70 menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 71 menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 72 menuHeight = $u.height(), 73 baseline = windowHeight + _offset('y'); 74 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 75 if (expandUp) { 76 $u.css({bottom:menuParentHeight + 'px',top:'auto'}); 77 } 78 $u.css('display','none'); 79 }); 80 }; 81 82 return this.each(function() { 83 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 84 85 /* if callbacks already set, store them */ 86 var _onBeforeShow = o.onBeforeShow, 87 _onHide = o.onHide; 88 89 $.extend($.fn.superfish.o[this.serial],{ 90 onBeforeShow: function() { 91 onBeforeShow.call(this); /* fire our Supposition callback */ 92 _onBeforeShow.call(this); /* fire stored callbacks */ 93 }, 94 onHide: function() { 95 onHide.call(this); /* fire our Supposition callback */ 96 _onHide.call(this); /* fire stored callbacks */ 97 } 98 }); 99 }); 100 }; 101})(jQuery);; 102/* 103 * Superfish v1.4.8 - jQuery menu widget 104 * Copyright (c) 2008 Joel Birch 105 * 106 * Dual licensed under the MIT and GPL licenses: 107 * http://www.opensource.org/licenses/mit-license.php 108 * http://www.gnu.org/licenses/gpl.html 109 * 110 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 111 */ 112/* 113 * This is not the original jQuery Superfish plugin. 114 * Please refer to the README for more information. 115 */ 116 117(function($){ 118 $.fn.superfish = function(op){ 119 var sf = $.fn.superfish, 120 c = sf.c, 121 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 122 over = function(){ 123 var $$ = $(this), menu = getMenu($$); 124 clearTimeout(menu.sfTimer); 125 $$.showSuperfishUl().siblings().hideSuperfishUl(); 126 }, 127 out = function(){ 128 var $$ = $(this), menu = getMenu($$), o = sf.op; 129 clearTimeout(menu.sfTimer); 130 menu.sfTimer=setTimeout(function(){ 131 if ($$.children('.sf-clicked').length == 0){ 132 o.retainPath=($.inArray($$[0],o.$path)>-1);
133 $$.hideSuperfishUl(); 134 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 135 } 136 },o.delay); 137 }, 138 getMenu = function($menu){ 139 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 140 sf.op = sf.o[menu.serial]; 141 return menu; 142 }, 143 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 144 145 return this.each(function() { 146 var s = this.serial = sf.o.length; 147 var o = $.extend({},sf.defaults,op); 148 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels), 149 p = o.$path; 150 for (var l = 0; l < p.length; l++){ 151 p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass); 152 } 153 sf.o[s] = sf.op = o; 154 155 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 156 if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') ); 157 }) 158 .not('.'+c.bcClass) 159 .hideSuperfishUl(); 160 161 var $a = $('a, span.nolink',this); 162 $a.each(function(i){ 163 var $li = $a.eq(i).parents('li'); 164 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 165 }); 166 o.onInit.call(this); 167 168 }).each(function() { 169 var menuClasses = [c.menuClass], 170 addShadow = true; 171 if ($.browser !== undefined){ 172 if ($.browser.msie && $.browser.version < 7){ 173 addShadow = false; 174 } 175 } 176 if (sf.op.dropShadows && addShadow){ 177 menuClasses.push(c.shadowClass); 178 } 179 $(this).addClass(menuClasses.join(' ')); 180 }); 181 }; 182 183 var sf = $.fn.superfish; 184 sf.o = []; 185 sf.op = {}; 186 sf.IE7fix = function(){ 187 var o = sf.op; 188 if ($.browser !== undefined){ 189 if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity != undefined) { 190 this.toggleClass(sf.c.shadowClass+'-off'); 191 } 192 } 193 }; 194 sf.c = { 195 bcClass: 'sf-breadcrumb', 196 menuClass: 'sf-js-enabled', 197 anchorClass: 'sf-with-ul', 198 arrowClass: 'sf-sub-indicator', 199 shadowClass: 'sf-shadow' 200 }; 201 sf.defaults = { 202 hoverClass: 'sfHover', 203 pathClass: 'overideThisToUse', 204 pathLevels: 1, 205 delay: 800, 206 animation: {opacity:'show'}, 207 speed: 'fast', 208 autoArrows: true, 209 dropShadows: true, 210 disableHI: false, // true disables hoverIntent detection 211 onInit: function(){}, // callback functions 212 onBeforeShow: function(){}, 213 onShow: function(){}, 214 onHide: function(){} 215 }; 216 $.fn.extend({ 217 hideSuperfishUl : function(){ 218 var o = sf.op, 219 not = (o.retainPath===true) ? o.$path : ''; 220 o.retainPath = false; 221 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 222 .children('ul').addClass('sf-hidden'); 223 o.onHide.call($ul); 224 return this; 225 }, 226 showSuperfishUl : function(){ 227 var o = sf.op, 228 sh = sf.c.shadowClass+'-off', 229 $ul = this.addClass(o.hoverClass) 230 .children('ul.sf-hidden').hide().removeClass('sf-hidden'); 231 sf.IE7fix.call($ul); 232 o.onBeforeShow.call($ul); 233 $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); 234 return this; 235 } 236 }); 237})(jQuery);; 238/* 239 * Supersubs v0.4b - jQuery plugin 240 * Copyright (c) 2013 Joel Birch 241 * 242 * Dual licensed under the MIT and GPL licenses: 243 * http://www.opensource.org/licenses/mit-license.php 244 * http://www.gnu.org/licenses/gpl.html 245 * 246 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 247 * their longest list item children. If you use this, please expect bugs and report them 248 * to the jQuery Google Group with the word 'Superfish' in the subject line. 249 * 250 */ 251/* 252 * This is not the original jQuery Supersubs plugin. 253 * Please refer to the README for more information. 254 */ 255 256(function($){ // $ will refer to jQuery within this closure 257 $.fn.supersubs = function(options){ 258 var opts = $.extend({}, $.fn.supersubs.defaults, options);
259 // return original object to support chaining 260 // Although this is unnecessary due to the way the module uses these plugins. 261 for (var a = 0; a < this.length; a++) { 262 // cache selections 263 var $$ = $(this).eq(a), 264 // support metadata 265 o = $.meta ? $.extend({}, opts, $$.data()) : opts; 266 // Jump one level if it's a "NavBar" 267 if ($$.hasClass('sf-navbar')) { 268 $$ = $$.children('li').children('ul'); 269 } 270 // cache all ul elements 271 var $ULs = $$.find('ul'), 272 // get the font size of menu. 273 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 274 fontsize = $('<li id="menu-fontsize">—</li>'), 275 size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;') 276 .appendTo($$)[0].clientWidth; //clientWidth is faster than width() 277 // remove em dash 278 fontsize.remove(); 279 280 // loop through each ul in menu 281 for (var b = 0; b < $ULs.length; b++) { 282 var 283 // cache this ul 284 $ul = $ULs.eq(b); 285 // If a multi-column sub-menu, and only if correctly configured. 286 if (o.megamenu && $ul.hasClass('sf-megamenu') && $ul.find('.sf-megamenu-column').length > 0){ 287 // Look through each column. 288 var $column = $ul.find('div.sf-megamenu-column > ol'), 289 // Overall width. 290 mwWidth = 0; 291 for (var d = 0; d < $column.length; d++){ 292 resize($column.eq(d)); 293 // New column width, in pixels. 294 var colWidth = $column.width(); 295 // Just a trick to convert em unit to px. 296 $column.css({width:colWidth}) 297 // Making column parents the same size. 298 .parents('.sf-megamenu-column').css({width:colWidth}); 299 // Overall width. 300 mwWidth += parseInt(colWidth); 301 } 302 // Resizing the columns container too. 303 $ul.add($ul.find('li.sf-megamenu-wrapper, li.sf-megamenu-wrapper > ol')).css({width:mwWidth}); 304 } 305 else { 306 resize($ul); 307 } 308 } 309 } 310 function resize($ul){ 311 var 312 // get all (li) children of this ul 313 $LIs = $ul.children(), 314 // get all anchor grand-children 315 $As = $LIs.children('a'); 316 // force content to one line and save current float property 317 $LIs.css('white-space','nowrap'); 318 // remove width restrictions and floats so elements remain vertically stacked 319 $ul.add($LIs).add($As).css({float:'none',width:'auto'}); 320 // this ul will now be shrink-wrapped to longest li due to position:absolute 321 // so save its width as ems. 322 var emWidth = $ul.get(0).clientWidth / size; 323 // add more width to ensure lines don't turn over at certain sizes in various browsers 324 emWidth += o.extraWidth; 325 // restrict to at least minWidth and at most maxWidth 326 if (emWidth > o.maxWidth) {emWidth = o.maxWidth;} 327 else if (emWidth < o.minWidth) {emWidth = o.minWidth;} 328 emWidth += 'em'; 329 // set ul to width in ems 330 $ul.css({width:emWidth}); 331 // restore li floats to avoid IE bugs 332 // set li width to full width of this ul 333 // revert white-space to normal 334 $LIs.add($As).css({float:'',width:'',whiteSpace:''}); 335 // update offset position of descendant ul to reflect new width of parent. 336 // set it to 100% in case it isn't already set to this in the CSS 337 for (var c = 0; c < $LIs.length; c++) { 338 var $childUl = $LIs.eq(c).children('ul'); 339 var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right'; 340 $childUl.css(offsetDirection,'100%'); 341 } 342 } 343 return this; 344 }; 345 // expose defaults 346 $.fn.supersubs.defaults = { 347 megamenu: true, // define width for multi-column sub-menus and their columns. 348 minWidth: 12, // requires em unit. 349 maxWidth: 27, // requires em unit. 350 extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 351 }; 352})(jQuery); // plugin code ends 353; 354/** 355 * @file 356 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists. 357 */ 358 359(function ($) { 360 Drupal.behaviors.superfish = { 361 attach: function (context, settings) { 362 // Take a look at each list to apply Superfish to. 363 $.each(settings.superfish || {}, function(index, options) { 364 // Process all Superfish lists. 365 $('#superfish-' + options.id, context).once('superfish', function() { 366 var list = $(this); 367 368 // Check if we are to apply the Supersubs plug-in to it. 369 if (options.plugins || false) { 370 if (options.plugins.supersubs || false) { 371 list.supersubs(options.plugins.supersubs); 372 } 373 } 374 375 // Apply Superfish to the list. 376 list.superfish(options.sf); 377 378 // Check if we are to apply any other plug-in to it. 379 if (options.plugins || false) { 380 if (options.plugins.touchscreen || false) { 381 list.sftouchscreen(options.plugins.touchscreen); 382 } 383 if (options.plugins.smallscreen || false) { 384 list.sfsmallscreen(options.plugins.smallscreen); 385 } 386 if (options.plugins.automaticwidth || false) { 387 list.sfautomaticwidth(); 388 } 389 if (options.plugins.supposition || false) { 390 list.supposition(); 391 } 392 if (options.plugins.bgiframe || false) { 393 list.find('ul').bgIframe({opacity:false}); 394 } 395 } 396 }); 397 }); 398 } 399 }; 400})(jQuery); 401;
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.