1/*! 2 * Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) 3 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php). 4 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 5 * 6 * $LastChangedDate: 2007-06-19 20:25:28 -0500 (Tue, 19 Jun 2007) $ 7 * $Rev: 2111 $ 8 * 9 * Version 2.1 10 */ 11(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery);; 12/*! 13* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ 14* <http://cherne.net/brian/resources/jquery.hoverIntent.html> 15* 16* @param f onMouseOver function || An object with configuration options 17* @param g onMouseOut function || Nothing (use configuration options object) 18* @author Brian Cherne <[email protected]> 19*/ 20(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 p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){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.mouseover(handleHover).mouseout(handleHover);};})(jQuery);; 21; 22/*! 23 * Superfish v1.4.8 - jQuery menu widget 24 * Copyright (c) 2008 Joel Birch 25 * 26 * Dual licensed under the MIT and GPL licenses: 27 * http://www.opensource.org/licenses/mit-license.php 28 * http://www.gnu.org/licenses/gpl.html 29 * 30 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 31 */ 32(function($){ 33 $.fn.superfish = function(op){ 34 35 var sf = $.fn.superfish, 36 c = sf.c, 37 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 38 over = function(){ 39 var $$ = $(this), menu = getMenu($$); 40 clearTimeout(menu.sfTimer); 41 $$.showSuperfishUl().siblings().hideSuperfishUl(); 42 }, 43 out = function(){ 44 var $$ = $(this), menu = getMenu($$), o = sf.op; 45 clearTimeout(menu.sfTimer); 46 menu.sfTimer = setTimeout(function(){ 47 o.retainPath = ($.inArray($$[0],o.$path) > -1); 48 $$.hideSuperfishUl(); 49 if (o.$path.length && $$.parents(['li.', o.hoverClass].join('')).length < 1){ 50 over.call(o.$path); 51 } 52 }, o.delay); 53 }, 54 getMenu = function($menu){ 55 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 56 sf.op = sf.o[menu.serial]; 57 return menu; 58 }, 59 addArrow = function($a){ 60 $a.addClass(c.anchorClass).append($arrow.clone()); 61 }; 62 63 return this.each(function() { 64 var s = this.serial = sf.o.length; 65 var o = $.extend({},sf.defaults,op); 66 o.$path = $('li.' + o.pathClass,this).slice(0, o.pathLevels).each(function(){ 67 $(this).addClass([o.hoverClass,c.bcClass].join(' ')) 68 .filter('li:has(ul)').removeClass(o.pathClass); 69 }); 70 sf.o[s] = sf.op = o; 71 72 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 73 if (o.autoArrows) { 74 addArrow($('>a:first-child',this)); 75 } 76 }) 77 .not('.' + c.bcClass) 78 .hideSuperfishUl(); 79 80 var $a = $('a',this); 81 $a.each(function(i){ 82 var $li = $a.eq(i).parents('li'); 83 $a.eq(i).focus(function(){ 84 over.call($li); 85 }).blur(function(){ 86 out.call($li); 87 }); 88 }); 89 o.onInit.call(this); 90 91 }).each(function() { 92 var menuClasses = [c.menuClass]; 93 if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) { 94 menuClasses.push(c.shadowClass); 95 } 96 $(this).addClass(menuClasses.join(' ')); 97 }); 98 }; 99 100 var sf = $.fn.superfish; 101 sf.o = []; 102 sf.op = {}; 103 sf.IE7fix = function(){ 104 var o = sf.op; 105 if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity != undefined) {
106 this.toggleClass(sf.c.shadowClass + '-off'); 107 } 108 }; 109 sf.c = { 110 bcClass : 'sf-breadcrumb', 111 menuClass : 'sf-js-enabled', 112 anchorClass : 'sf-with-ul', 113 arrowClass : 'sf-sub-indicator', 114 shadowClass : 'sf-shadow' 115 }; 116 sf.defaults = { 117 hoverClass : 'sfHover', 118 pathClass : 'overideThisToUse', 119 pathLevels : 1, 120 delay : 800, 121 animation : { 122 opacity:'show' 123 }, 124 speed : 'normal', 125 autoArrows : true, 126 dropShadows : true, 127 // true disables hoverIntent detection. 128 disableHI : false, 129 onInit : function(){}, // callback functions 130 onBeforeShow: function(){}, 131 onShow : function(){}, 132 onHide : function(){} 133 }; 134 $.fn.extend({ 135 hideSuperfishUl : function() { 136 var o = sf.op, 137 not = (o.retainPath === true) ? o.$path : ''; 138 o.retainPath = false; 139 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 140 .find('>ul').hide().css('visibility','hidden'); 141 o.onHide.call($ul); 142 return this; 143 }, 144 showSuperfishUl : function(){ 145 var o = sf.op, 146 sh = sf.c.shadowClass + '-off', 147 $ul = this.addClass(o.hoverClass) 148 .find('>ul:hidden').css('visibility','visible'); 149 sf.IE7fix.call($ul); 150 o.onBeforeShow.call($ul); 151 $ul.animate(o.animation,o.speed,function(){ 152 sf.IE7fix.call($ul); 153 o.onShow.call($ul); 154 }); 155 return this; 156 } 157 }); 158 159})(jQuery); 160; 161/** 162 * @file 163 * Behaviours for the Nice Menus module. This uses Superfish 1.4.8. 164 * 165 * @link http://users.tpg.com.au/j_birch/plugins/superfish 166 */ 167 168(function ($) { 169 170 /** 171 * Add Superfish to all Nice Menus with some basic options. 172 */ 173 Drupal.behaviors.niceMenus = { 174 attach: function (context, settings) { 175 $('ul.nice-menu:not(.nice-menus-processed)').addClass('nice-menus-processed').each(function () { 176 $(this).superfish({ 177 // Apply a generic hover class. 178 hoverClass: 'over', 179 // Disable generation of arrow mark-up.
180 autoArrows: false, 181 // Disable drop shadows. 182 dropShadows: false, 183 // Mouse delay. 184 delay: Drupal.settings.nice_menus_options.delay, 185 // Animation speed. 186 speed: Drupal.settings.nice_menus_options.speed 187 }); 188 189 // Add in Brandon Aaronâs bgIframe plugin for IE select issues. 190 // http://plugins.jquery.com/node/46/release 191 $(this).find('ul').bgIframe({opacity:false}); 192 193 $('ul.nice-menu ul').css('display', 'none'); 194 }); 195 196 $("ul.nice-menu-down li li").mouseover(function(){ 197 if($(this).children("ul").length == 1) { 198 var parent = $(this); 199 var child_menu = $(this).children("ul"); 200 if( $(parent).offset().left + $(parent).width() + $(child_menu).width() > $(window).width() ){ 201 $(child_menu).css("left", "-" + $(parent).width() + "px"); 202 } else { 203 $(child_menu).css("left", $(parent).width() + "px"); 204 } 205 } 206 }); 207 208 } 209 }; 210 211 212})(jQuery);; 213(function ($) { 214 215/** 216 * Prevents consecutive form submissions of identical form values. 217 * 218 * Repetitive form submissions that would submit the identical form values are 219 * prevented, unless the form values are different from the previously 220 * submitted values. 221 * 222 * This is a simplified re-implementation of a user-agent behavior that should 223 * be natively supported by major web browsers, but at this time, only Firefox 224 * has a built-in protection. 225 * 226 * A form value-based approach ensures that the constraint is triggered for 227 * consecutive, identical form submissions only. Compared to that, a form 228 * button-based approach would (1) rely on [visible] buttons to exist where 229 * technically not required and (2) require more complex state management if 230 * there are multiple buttons in a form. 231 * 232 * This implementation is based on form-level submit events only and relies on 233 * jQuery's serialize() method to determine submitted form values. As such, the 234 * following limitations exist: 235 * 236 * - Event handlers on form buttons that preventDefault() do not receive a 237 * double-submit protection. That is deemed to be fine, since such button 238 * events typically trigger reversible client-side or server-side operations 239 * that are local to the context of a form only. 240 * - Changed values in advanced form controls, such as file inputs, are not part 241 * of the form values being compared between consecutive form submits (due to 242 * limitations of jQuery.serialize()). That is deemed to be acceptable, 243 * because if the user forgot to attach a file, then the size of HTTP payload 244 * will most likely be small enough to be fully passed to the server endpoint 245 * within (milli)seconds. If a user mistakenly attached a wrong file and is 246 * technically versed enough to cancel the form submission (and HTTP payload) 247 * in order to attach a different file, then that edge-case is not supported 248 * here. 249 * 250 * Lastly, all forms submitted via HTTP GET are idempotent by definition of HTTP 251 * standards, so excluded in this implementation. 252 */ 253Drupal.behaviors.formSingleSubmit = { 254 attach: function () { 255 function onFormSubmit (e) { 256 var $form = $(e.currentTarget); 257 var formValues = $form.serialize(); 258 var previousValues = $form.attr('data-drupal-form-submit-last'); 259 if (previousValues === formValues) { 260 e.preventDefault(); 261 } 262 else { 263 $form.attr('data-drupal-form-submit-last', formValues); 264 } 265 } 266 267 $('body').once('form-single-submit') 268 .delegate('form:not([method~="GET"])', 'submit.singleSubmit', onFormSubmit); 269 } 270}; 271 272})(jQuery); 273;
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.