1/** 2* DO NOT EDIT THIS FILE. 3* See the following change record for more information, 4* https://www.drupal.org/node/2815083 5* @preserve 6**/ 7(function ($, once) { 8 var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256"; 9 var originalJQOnce = $.fn.once; 10 var originalJQRemoveOnce = $.fn.removeOnce; 11 $.fn.once = function jQueryOnce(id) { 12 Drupal.deprecationError({ 13 message: "jQuery.once() ".concat(deprecatedMessageSuffix) 14 }); 15 return originalJQOnce.apply(this, [id]); 16 }; 17 $.fn.removeOnce = function jQueryRemoveOnce(id) { 18 Drupal.deprecationError({ 19 message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix) 20 }); 21 return originalJQRemoveOnce.apply(this, [id]); 22 }; 23 var drupalOnce = once; 24 function augmentedOnce(id, selector, context) { 25 originalJQOnce.apply($(selector, context), [id]); 26 return drupalOnce(id, selector, context); 27 } 28 function remove(id, selector, context) { 29 originalJQRemoveOnce.apply($(selector, context), [id]); 30 return drupalOnce.remove(id, selector, context); 31 } 32 window.once = Object.assign(augmentedOnce, drupalOnce, { 33 remove: remove 34 }); 35})(jQuery, once);; 36(function ($, Drupal, drupalSettings) { 37 Drupal.behaviors.mtToolTip = { 38 attach: function (context, settings) { 39 $(context).find('[data-toggle="tooltip"]').once('mtToolTipInit').tooltip(); 40 } 41 }; 42})(jQuery, Drupal, drupalSettings); 43; 44(function (factory) { 45 if (typeof define === 'function' && define.amd) { 46 // AMD 47 define(['jquery'], factory); 48 } else if (typeof exports === 'object') { 49 // CommonJS 50 factory(require('jquery')); 51 } else { 52 // Browser globals 53 factory(jQuery); 54 } 55}(function ($) { 56 var CountTo = function (element, options) { 57 this.$element = $(element); 58 this.options = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options); 59 this.init(); 60 }; 61 62 CountTo.DEFAULTS = { 63 from: 0, // the number the element should start at 64 to: 0, // the number the element should end at 65 speed: 1000, // how long it should take to count between the target numbers 66 refreshInterval: 100, // how often the element should be updated 67 decimals: 0, // the number of decimal places to show 68 formatter: formatter, // handler for formatting the value before rendering 69 onUpdate: null, // callback method for every time the element is updated 70 onComplete: null // callback method for when the element finishes updating 71 }; 72 73 CountTo.prototype.init = function () { 74 this.value = this.options.from; 75 this.loops = Math.ceil(this.options.speed / this.options.refreshInterval); 76 this.loopCount = 0; 77 this.increment = (this.options.to - this.options.from) / this.loops; 78 }; 79 80 CountTo.prototype.dataOptions = function () { 81 var options = { 82 from: this.$element.data('from'), 83 to: this.$element.data('to'), 84 speed: this.$element.data('speed'), 85 refreshInterval: this.$element.data('refresh-interval'), 86 decimals: this.$element.data('decimals') 87 }; 88 89 var keys = Object.keys(options); 90 91 for (var i in keys) { 92 var key = keys[i]; 93 94 if (typeof(options[key]) === 'undefined') { 95 delete options[key]; 96 } 97 } 98 99 return options; 100 }; 101 102 CountTo.prototype.update = function () { 103 this.value += this.increment; 104 this.loopCount++; 105 106 this.render(); 107 108 if (typeof(this.options.onUpdate) == 'function') { 109 this.options.onUpdate.call(this.$element, this.value); 110 } 111 112 if (this.loopCount >= this.loops) { 113 clearInterval(this.interval); 114 this.value = this.options.to; 115 116 if (typeof(this.options.onComplete) == 'function') { 117 this.options.onComplete.call(this.$element, this.value); 118 } 119 } 120 }; 121 122 CountTo.prototype.render = function () { 123 var formattedValue = this.options.formatter.call(this.$element, this.value, this.options); 124 this.$element.text(formattedValue); 125 }; 126 127 CountTo.prototype.restart = function () { 128 this.stop(); 129 this.init(); 130 this.start(); 131 }; 132 133 CountTo.prototype.start = function () { 134 this.stop(); 135 this.render(); 136 this.interval = setInterval(this.update.bind(this), this.options.refreshInterval); 137 }; 138 139 CountTo.prototype.stop = function () { 140 if (this.interval) { 141 clearInterval(this.interval); 142 } 143 }; 144 145 CountTo.prototype.toggle = function () { 146 if (this.interval) { 147 this.stop(); 148 } else { 149 this.start(); 150 } 151 }; 152 153 function formatter(value, options) { 154 return value.toFixed(options.decimals); 155 } 156 157 $.fn.countTo = function (option) { 158 return this.each(function () { 159 var $this = $(this); 160 var data = $this.data('countTo'); 161 var init = !data || typeof(option) === 'object'; 162 var options = typeof(option) === 'object' ? option : {}; 163 var method = typeof(option) === 'string' ? option : 'start'; 164 165 if (init) { 166 if (data) data.stop(); 167 $this.data('countTo', data = new CountTo(this, options)); 168 } 169 170 data[method].call(data); 171 }); 172 }; 173}));; 174/*! 175Waypoints - 4.0.1 176Copyright © 2011-2016 Caleb Troughton 177Licensed under the MIT license. 178https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 179*/ 180!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");
vendor: 4,151 bytes, line 180
180this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHe
180ight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();; 181(function ($, Drupal, drupalSettings) { 182 Drupal.behaviors.mtCountTo = { 183 attach: function (context, settings) { 184 $(context).find('[data-to]').once('mtCountToInit').each(function() { 185 var stat_item = $(this); 186 var waypoints = stat_item.waypoint(function(direction) { 187 var animatedObject = $(this.element); 188 animatedObject.countTo(); 189 this.destroy(); 190 },{ 191 offset: "90%" 192 }); 193 }); 194 } 195 }; 196})(jQuery, Drupal, drupalSettings); 197; 198/* 199 * Superfish v1.4.8 - jQuery menu widget 200 * Copyright (c) 2008 Joel Birch 201 * 202 * Dual licensed under the MIT and GPL licenses: 203 * http://www.opensource.org/licenses/mit-license.php 204 * http://www.gnu.org/licenses/gpl.html 205 * 206 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 207 */ 208/* 209 * This is not the original jQuery Superfish plugin. 210 * Please refer to the README for more information. 211 */ 212 213(function($){ 214 $.fn.superfish = function(op){ 215 var sf = $.fn.superfish, 216 c = sf.c, 217 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 218 over = function(){ 219 var $$ = $(this), menu = getMenu($$); 220 clearTimeout(menu.sfTimer); 221 $$.showSuperfishUl().siblings().hideSuperfishUl(); 222 }, 223 out = function(){ 224 var $$ = $(this), menu = getMenu($$), o = sf.op; 225 clearTimeout(menu.sfTimer); 226 menu.sfTimer=setTimeout(function(){ 227 if ($$.children('.sf-clicked').length == 0){ 228 o.retainPath=($.inArray($$[0],o.$path)>-1);
229 $$.hideSuperfishUl(); 230 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 231 } 232 },o.delay); 233 }, 234 getMenu = function($menu){ 235 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 236 sf.op = sf.o[menu.serial]; 237 return menu; 238 }, 239 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 240 241 return this.each(function() { 242 var s = this.serial = sf.o.length; 243 var o = $.extend({},sf.defaults,op); 244 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels); 245 var p = o.$path; 246 for (var l = 0; l < p.length; l++){ 247 p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass); 248 } 249 sf.o[s] = sf.op = o; 250 251 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 252 if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') ); 253 }) 254 .not('.'+c.bcClass) 255 .hideSuperfishUl(); 256 257 var $a = $('a, span.nolink',this); 258 $a.each(function(i){ 259 var $li = $a.eq(i).parents('li'); 260 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 261 }); 262 o.onInit.call(this); 263 264 }).each(function() { 265 var menuClasses = [c.menuClass]; 266 if (sf.op.dropShadows){ 267 menuClasses.push(c.shadowClass); 268 } 269 $(this).addClass(menuClasses.join(' ')); 270 }); 271 }; 272 273 var sf = $.fn.superfish; 274 sf.o = []; 275 sf.op = {}; 276 277 sf.c = { 278 bcClass: 'sf-breadcrumb', 279 menuClass: 'sf-js-enabled', 280 anchorClass: 'sf-with-ul', 281 arrowClass: 'sf-sub-indicator', 282 shadowClass: 'sf-shadow' 283 }; 284 sf.defaults = { 285 hoverClass: 'sfHover', 286 pathClass: 'overideThisToUse', 287 pathLevels: 1, 288 delay: 800, 289 animation: {opacity:'show'}, 290 speed: 'fast', 291 autoArrows: true, 292 dropShadows: true, 293 disableHI: false, // true disables hoverIntent detection 294 onInit: function(){}, // callback functions 295 onBeforeShow: function(){}, 296 onShow: function(){}, 297 onHide: function(){} 298 }; 299 $.fn.extend({ 300 hideSuperfishUl : function(){ 301 var o = sf.op, 302 not = (o.retainPath===true) ? o.$path : ''; 303 o.retainPath = false; 304 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 305 .children('ul').addClass('sf-hidden'); 306 o.onHide.call($ul); 307 return this; 308 }, 309 showSuperfishUl : function(){ 310 var o = sf.op, 311 sh = sf.c.shadowClass+'-off', 312 $ul = this.addClass(o.hoverClass) 313 .children('ul.sf-hidden').hide().removeClass('sf-hidden'); 314 o.onBeforeShow.call($ul); 315 $ul.animate(o.animation,o.speed,function(){ o.onShow.call($ul); }); 316 return this; 317 } 318 }); 319})(jQuery);; 320/*! 321 * hoverIntent v1.10.1 // 2019.10.05 // jQuery v1.7.0+ 322 * http://briancherne.github.io/jquery-hoverIntent/ 323 * 324 * You may use hoverIntent under the terms of the MIT license. Basically that 325 * means you are free to use hoverIntent as long as this header is left intact. 326 * Copyright 2007-2019 Brian Cherne 327 */ 328!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";function track(ev){cX=ev.pageX,cY=ev.pageY}var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)};$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var instanceId=INSTANCE_COUNT++,cfg=$.extend({},_cfg);$.isPlainObject(handlerIn)?(cfg=$.extend(cfg,handlerIn),$.isFunction(cfg.out)||(cfg.out=cfg.over)):cfg=$.isFunction(handlerOut)?$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector}):$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut});function handleHover(e){var ev=$.extend({},e),$el=$(this),hoverIntentData=$el.data("hoverIntent");hoverIntentData||$el.data("hoverIntent",hoverIntentData={});var state=hoverIntentData[instanceId];state||(hoverIntentData[instanceId]=state={id:instanceId}),state.timeoutId&&(state.timeoutId=clearTimeout(state.timeoutId));
328var mousemove=state.event="mousemove.hoverIntent.hoverIntent"+instanceId;if("mouseenter"===e.type){if(state.isActive)return;state.pX=ev.pageX,state.pY=ev.pageY,$el.off(mousemove,track).on(mousemove,track),state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg)},cfg.interval)}else{if(!state.isActive)return;$el.off(mousemove,track),state.timeoutId=setTimeout(function(){!function(ev,$el,s,out){var data=$el.data("hoverIntent");data&&delete data[s.id],out.apply($el[0],[ev])}(ev,$el,state,cfg.out)},cfg.timeout)}}return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}});; 329/* 330 * sf-Smallscreen v1.3b - Provides small-screen compatibility for the jQuery Superfish plugin. 331 * 332 * Developer's note: 333 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish) 334 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact 335 * 336 * jQuery version: 1.3.x or higher. 337 * 338 * Dual licensed under the MIT and GPL licenses: 339 * http://www.opensource.org/licenses/mit-license.php 340 * http://www.gnu.org/licenses/gpl.html 341 */ 342 343(function($){ 344 $.fn.sfsmallscreen = function(options){ 345 options = $.extend({ 346 mode: 'inactive', 347 type: 'accordion', 348 breakpoint: 768, 349 breakpointUnit: 'px', 350 useragent: '', 351 title: '', 352 addSelected: false, 353 menuClasses: false, 354 hyperlinkClasses: false, 355 excludeClass_menu: '', 356 excludeClass_hyperlink: '', 357 includeClass_menu: '', 358 includeClass_hyperlink: '', 359 accordionButton: 1, 360 expandText: 'Expand', 361 collapseText: 'Collapse' 362 }, options); 363 364 // We need to clean up the menu from anything unnecessary. 365 function refine(menu){ 366 var 367 refined = menu.clone(), 368 // Things that should not be in the small-screen menus. 369 rm = refined.find('span.sf-sub-indicator'), 370 // This is a helper class for those who need to add extra markup that shouldn't exist 371 // in the small-screen versions. 372 rh = refined.find('.sf-smallscreen-remove'), 373 // Mega-menus has to be removed too. 374 mm = refined.find('ul.sf-multicolumn'); 375 for (var a = 0; a < rh.length; a++){ 376 rh.eq(a).replaceWith(rh.eq(a).html()); 377 } 378 if (options.accordionButton == 2 || options.type == 'select'){ 379 for (var b = 0; b < rm.length; b++){ 380 rm.eq(b).remove(); 381 } 382 } 383 if (mm.length > 0){ 384 mm.removeClass('sf-multicolumn'); 385 var ol = refined.find('div.sf-multicolumn-column > ol'); 386 for (var o = 0; o < ol.length; o++){ 387 ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>'); 388 } 389 var elements = ['div.sf-multicolumn-column','.sf-multicolumn-wrapper > ol','li.sf-multicolumn-wrapper']; 390 for (var i = 0; i < elements.length; i++){ 391 obj = refined.find(elements[i]); 392 for (var t = 0; t < obj.length; t++){ 393 obj.eq(t).replaceWith(obj.eq(t).html()); 394 } 395 } 396 refined.find('.sf-multicolumn-column').removeClass('sf-multicolumn-column'); 397 } 398 refined.add(refined.find('*')).css({width:''}); 399 return refined; 400 } 401 402 // Creating <option> elements out of the menu. 403 function toSelect(menu, level){ 404 var 405 items = '', 406 childLI = $(menu).children('li'); 407 for (var a = 0; a < childLI.length; a++){ 408 var list = childLI.eq(a), parent = list.children('a, span'); 409 for (var b = 0; b < parent.length; b++){ 410 var 411 item = parent.eq(b), 412 path = (item.is('a') && !!item.attr('href')) ? item.attr('href') : '', 413 // Class names modification. 414 itemClone = item.clone(), 415 classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '', 416 classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes; 417 // Retaining the active class if requested. 418 if (options.addSelected && item.hasClass('active')){ 419 classes += ' active'; 420 } 421 classes = (classes) ? ' class="' + classes + '"' : ''; 422 // <option> has to be disabled if the item is not a link. 423 disable = (path == '') || (path == '#') ? ' disabled="disabled"' : '', 424 // Crystal clear. 425 subIndicator = 1 < level ? Array(level).join('-') + ' ' : ''; 426 // Preparing the <option> element. 427 items += '<option value="' + path + '"' + classes + disable + '>' + subIndicator + $.trim(item.text()) +'</option>', 428 childUL = list.find('> ul'); 429 // Using the function for the sub-menu of this item. 430 for (var u = 0; u < childUL.length; u++){
431 items += toSelect(childUL.eq(u), level + 1); 432 } 433 } 434 } 435 return items; 436 } 437 438 // Create the new version, hide the original. 439 function convert(menu){ 440 var menuID = menu.attr('id'), 441 // Creating a refined version of the menu. 442 refinedMenu = refine(menu); 443 // Currently the plugin provides two reactions to small screens. 444 // Converting the menu to a <select> element, and converting to an accordion version of the menu. 445 if (options.type == 'accordion'){ 446 var 447 toggleID = menuID + '-toggle', 448 accordionID = menuID + '-accordion'; 449 // Making sure the accordion does not exist. 450 if ($('#' + accordionID).length == 0){ 451 var 452 // Getting the style class. 453 styleClass = menu.attr('class').split(' ').filter(function(item){ 454 return item.indexOf('sf-style-') > -1 ? item : ''; 455 }), 456 // Creating the accordion. 457 accordion = $(refinedMenu).attr('id', accordionID); 458 // Removing unnecessary classes. 459 accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled'); 460 // Adding necessary classes. 461 accordion.addClass('sf-accordion sf-hidden'); 462 // Removing style attributes and any unnecessary class. 463 accordion.find('li').each(function(){ 464 $(this).removeAttr('style').removeClass('sfHover').attr('id', $(this).attr('id') + '-accordion'); 465 }); 466 // Doing the same and making sure all the sub-menus are off-screen (hidden). 467 accordion.children('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); 468 // Creating the accordion toggle switch. 469 var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>'; 470 471 // Adding Expand\Collapse buttons if requested. 472 if (options.accordionButton == 2){ 473 accordion.addClass('sf-accordion-with-buttons'); 474 var parent = accordion.find('li.menuparent'); 475 for (var i = 0; i < parent.length; i++){ 476 parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>'); 477 } 478 } 479 // Inserting the according and hiding the original menu. 480 menu.before(toggle).before(accordion).hide(); 481 482 var 483 accordionElement = $('#' + accordionID), 484 // Deciding what should be used as accordion buttons. 485 buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button', 486 button = accordionElement.find(buttonElement); 487 488 // Attaching a click event to the toggle switch. 489 $('#' + toggleID).on('click', function(e){ 490 // Preventing the click. 491 e.preventDefault(); 492 // Adding the sf-expanded class. 493 $(this).toggleClass('sf-expanded'); 494 495 if (accordionElement.hasClass('sf-expanded')){ 496 // If the accordion is already expanded: 497 // Hiding its expanded sub-menus and then the accordion itself as well. 498 accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded') 499 .end().children('ul').hide() 500 // This is a bit tricky, it's the same trick that has been in use in the main plugin for some time. 501 // Basically we'll add a class that keeps the sub-menu off-screen and still visible, 502 // and make it invisible and removing the class one moment before showing or hiding it. 503 // This helps screen reader software access all the menu items. 504 .end().hide().addClass('sf-hidden').show(); 505 // Changing the caption of any existing accordion buttons to 'Expand'. 506 if (options.accordionButton == 2){ 507 accordionElement.find('a.sf-accordion-button').text(options.expandText); 508 } 509 } 510 else { 511 // But if it's collapsed, 512 accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show(); 513 } 514 }); 515 516 // Attaching a click event to the buttons. 517 button.on('click', function(e){ 518 // Making sure the buttons does not exist already. 519 if ($(this).closest('li').children('ul').length > 0){ 520 e.preventDefault(); 521 // Selecting the parent menu items. 522 var parent = $(this).closest('li'); 523 // Creating and inserting Expand\Collapse buttons to the parent menu items, 524 // of course only if not already happened.
525 if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){ 526 var 527 // Cloning the hyperlink of the parent menu item. 528 cloneLink = parent.children('a.menuparent').clone(); 529 // Removing unnecessary classes and element(s). 530 cloneLink.removeClass('menuparent sf-with-ul').children('.sf-sub-indicator').remove(); 531 // Wrapping the hyerplinks in <li>. 532 cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink); 533 // Adding a helper class and attaching them to the sub-menus. 534 parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink); 535 } 536 // Once the button is clicked, collapse the sub-menu if it's expanded. 537 if (parent.hasClass('sf-expanded')){ 538 parent.children('ul').slideUp('fast', function(){ 539 // Doing the accessibility trick after hiding the sub-menu. 540 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 541 }); 542 // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted. 543 if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){ 544 parent.children('.sf-accordion-button').text(options.expandText); 545 } 546 } 547 // Otherwise, expand the sub-menu. 548 else { 549 // Doing the accessibility trick and then showing the sub-menu. 550 parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast') 551 // Changing the caption of the inserted Expand link to 'Collape', if any is inserted. 552 .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText) 553 // Hiding any expanded sub-menu of the same level. 554 .end().siblings('li.sf-expanded').children('ul') 555 .slideUp('fast', function(){ 556 // Doing the accessibility trick after hiding it. 557 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 558 }) 559 // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus. 560 .parent().children('a.sf-accordion-button').text(options.expandText); 561 } 562 } 563 }); 564 } 565 } 566 else { 567 var 568 // Class names modification. 569 menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '', 570 classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes, 571 classes = (classes) ? ' class="' + classes + '"' : ''; 572 573 // Making sure the <select> element does not exist already. 574 if ($('#' + menuID + '-select').length == 0){ 575 // Creating the <option> elements. 576 var newMenu = toSelect(refinedMenu, 1), 577 // Creating the <select> element and assigning an ID and class name. 578 selectList = $('<select' + classes + ' id="' + menuID + '-select"/>') 579 // Attaching the title and the items to the <select> element. 580 .html('<option>' + options.title + '</option>' + newMenu) 581 // Attaching an event then. 582 .change(function(){ 583 // Except for the first option that is the menu title and not a real menu item. 584 if ($('option:selected', this).index()){ 585 window.location = selectList.val(); 586 } 587 }); 588 // Applying the addSelected option to it. 589 if (options.addSelected){ 590 selectList.find('.active').attr('selected', !0); 591 } 592 // Finally inserting the <select> element into the document then hiding the original menu. 593 menu.before(selectList).hide(); 594 } 595 } 596 } 597 598 // Turn everything back to normal. 599 function turnBack(menu){ 600 var 601 id = '#' + menu.attr('id'); 602 // Removing the small screen version. 603 $(id + '-' + options.type).remove(); 604 // Removing the accordion toggle switch as well. 605 if (options.type == 'accordion'){ 606 $(id + '-toggle').parent('div').remove(); 607 } 608 // Remove inline CSS display property; less clear than simply using .show(), but respects stylesheet 609 $(id).css('display', ''); 610 } 611
612 // Return original object to support chaining. 613 // Although this is unnecessary because of the way the module uses these plugins. 614 for (var s = 0; s < this.length; s++){ 615 var 616 menu = $(this).eq(s), 617 mode = options.mode; 618 // The rest is crystal clear, isn't it? :) 619 if (menu.children('li').length == 0){ 620 // Skip empty menu which will not be visible and don't want to suddenly make it visible. 621 } 622 else if (mode == 'always_active'){ 623 convert(menu); 624 } 625 else if (mode == 'window_width'){ 626 var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint, 627 windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, 628 timer; 629 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 630 convert(menu); 631 } 632 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 633 convert(menu); 634 } 635 $(window).resize(function(){ 636 clearTimeout(timer); 637 timer = setTimeout(function(){ 638 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 639 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 640 convert(menu); 641 } 642 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 643 convert(menu); 644 } 645 else { 646 turnBack(menu); 647 } 648 }, 50); 649 }); 650 } 651 else if (mode == 'useragent_custom'){ 652 if (options.useragent != ''){ 653 var ua = RegExp(options.useragent, 'i'); 654 if (navigator.userAgent.match(ua)){ 655 convert(menu); 656 } 657 } 658 } 659 else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){ 660 convert(menu); 661 } 662 } 663 return this; 664 } 665})(jQuery); 666; 667/* 668 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 669 * 670 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 671 * Special thanks to Karl Swedberg for valuable input. 672 * 673 * Dual licensed under the MIT and GPL licenses: 674 * http://www.opensource.org/licenses/mit-license.php 675 * http://www.gnu.org/licenses/gpl.html 676 */ 677/* 678 * This is not the original jQuery Supposition plugin. 679 * Please refer to the README for more information. 680 */ 681 682(function($){ 683 $.fn.supposition = function(){ 684 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 685 _offset = function(dir) { 686 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 687 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 688 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 689 }, 690 onHide = function(){ 691 this.css({bottom:''}); 692 }, 693 onBeforeShow = function(){ 694 this.each(function(){ 695 var $u = $(this); 696 $u.css('display','block'); 697 var $mul = $u.closest('.sf-menu'), 698 level = $u.parents('ul').length, 699 menuWidth = $u.width(), 700 menuParentWidth = $u.closest('li').outerWidth(true), 701 menuParentLeft = $u.closest('li').offset().left, 702 totalRight = $w.width() + _offset('x'), 703 menuRight = $u.offset().left + menuWidth, 704 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 705 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 706 if (menuParentLeft < exactMenuWidth) { 707 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 708 $u.css({left:0,right:'auto'}); 709 } 710 else { 711 $u.css({left:menuParentWidth + 'px',right:'auto'}); 712 } 713 $u.parent().addClass('sf-supposition-active'); 714 } 715 } 716 else { 717 if (menuRight > totalRight && menuParentLeft > menuWidth) { 718 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 719 $u.css({right:0,left:'auto'}); 720 } 721 else { 722 $u.css({right:menuParentWidth + 'px',left:'auto'}); 723 } 724 $u.parent().addClass('sf-supposition-active'); 725 } 726 } 727 var windowHeight = $w.height(), 728 offsetTop = $u.offset().top, 729 menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 730 menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 731 menuHeight = $u.height(), 732 baseline = windowHeight + _offset('y'); 733 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 734 if (expandUp) { 735 $u.css({bottom:menuParentHeight + 'px',top:'auto'}); 736 } 737 $u.css('display','none'); 738 }); 739 }; 740 741 return this.each(function() { 742 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 743 744 /* if callbacks already set, store them */ 745 var _onBeforeShow = o.onBeforeShow, 746 _onHide = o.onHide; 747 748 $.extend($.fn.superfish.o[this.serial],{ 749 onBeforeShow: function() { 750 onBeforeShow.call(this); /* fire our Supposition callback */ 751 _onBeforeShow.call(this); /* fire stored callbacks */ 752 }, 753 onHide: function() { 754 onHide.call(this); /* fire our Supposition callback */ 755 _onHide.call(this); /* fire stored callbacks */ 756 } 757 }); 758 }); 759 }; 760})(jQuery);; 761/* 762 * Supersubs v0.4b - jQuery plugin 763 * Copyright (c) 2013 Joel Birch 764 * 765 * Dual licensed under the MIT and GPL licenses: 766 * http://www.opensource.org/licenses/mit-license.php 767 * http://www.gnu.org/licenses/gpl.html 768 * 769 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 770 * their longest list item children. If you use this, please expect bugs and report them 771 * to the jQuery Google Group with the word 'Superfish' in the subject line. 772 * 773 */ 774/* 775 * This is not the original jQuery Supersubs plugin. 776 * Please refer to the README for more information. 777 */ 778 779(function($){ // $ will refer to jQuery within this closure 780 $.fn.supersubs = function(options){ 781 var opts = $.extend({}, $.fn.supersubs.defaults, options);
782 // return original object to support chaining 783 // Although this is unnecessary due to the way the module uses these plugins. 784 for (var a = 0; a < this.length; a++) { 785 // cache selections 786 var $$ = $(this).eq(a), 787 // support metadata 788 o = $.meta ? $.extend({}, opts, $$.data()) : opts; 789 // Jump one level if it's a "NavBar" 790 if ($$.hasClass('sf-navbar')) { 791 $$ = $$.children('li').children('ul'); 792 } 793 // cache all ul elements 794 var $ULs = $$.find('ul'); 795 if ($ULs.length) { 796 // get the font size of menu. 797 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 798 var fontsize = $('<li id="menu-fontsize">—</li>'), 799 size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;') 800 .appendTo($$)[0].clientWidth; //clientWidth is faster than width() 801 // remove em dash 802 fontsize.remove(); 803 804 // loop through each ul in menu 805 for (var b = 0; b < $ULs.length; b++) { 806 var 807 // cache this ul 808 $ul = $ULs.eq(b); 809 // If a multi-column sub-menu, and only if correctly configured. 810 if (o.multicolumn && $ul.hasClass('sf-multicolumn') && $ul.find('.sf-multicolumn-column').length > 0){ 811 // Look through each column. 812 var $column = $ul.find('div.sf-multicolumn-column > ol'), 813 // Overall width. 814 mwWidth = 0; 815 for (var d = 0; d < $column.length; d++){ 816 resize($column.eq(d)); 817 // New column width, in pixels. 818 var colWidth = Math.ceil($column.width()); 819 // Just a trick to convert em unit to px. 820 $column.css({width:colWidth}) 821 // Making column parents the same size. 822 .parents('.sf-multicolumn-column').css({width:colWidth}); 823 // Overall width. 824 mwWidth += colWidth; 825 } 826 // Resizing the columns container too. 827 $ul.add($ul.find('li.sf-multicolumn-wrapper, li.sf-multicolumn-wrapper > ol')).css({width:mwWidth}); 828 } 829 else { 830 resize($ul); 831 } 832 } 833 } 834 } 835 function resize($ul){ 836 var 837 // get all (li) children of this ul 838 $LIs = $ul.children(), 839 // get all anchor grand-children 840 $As = $LIs.children('a'); 841 // force content to one line and save current float property 842 $LIs.css('white-space','nowrap'); 843 // remove width restrictions and floats so elements remain vertically stacked 844 $ul.add($LIs).add($As).css({float:'none',width:'auto'}); 845 // this ul will now be shrink-wrapped to longest li due to position:absolute 846 // so save its width as ems. 847 var emWidth = $ul.get(0).clientWidth / size; 848 // add more width to ensure lines don't turn over at certain sizes in various browsers 849 emWidth += o.extraWidth; 850 // restrict to at least minWidth and at most maxWidth 851 if (emWidth > o.maxWidth) {emWidth = o.maxWidth;} 852 else if (emWidth < o.minWidth) {emWidth = o.minWidth;} 853 emWidth += 'em'; 854 // set ul to width in ems 855 $ul.css({width:emWidth}); 856 // restore li floats to avoid IE bugs 857 // set li width to full width of this ul 858 // revert white-space to normal 859 $LIs.add($As).css({float:'',width:'',whiteSpace:''}); 860 // update offset position of descendant ul to reflect new width of parent. 861 // set it to 100% in case it isn't already set to this in the CSS 862 for (var c = 0; c < $LIs.length; c++) { 863 var $childUl = $LIs.eq(c).children('ul'); 864 var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right'; 865 $childUl.css(offsetDirection,'100%'); 866 } 867 } 868 return this; 869 }; 870 // expose defaults 871 $.fn.supersubs.defaults = { 872 multicolumn: true, // define width for multi-column sub-menus and their columns. 873 minWidth: 12, // requires em unit. 874 maxWidth: 27, // requires em unit. 875 extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 876 }; 877})(jQuery); // plugin code ends 878; 879/** 880 * @file 881 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists. 882 */ 883 884(function ($, Drupal, drupalSettings) { 885 886 'use strict'; 887 888 /** 889 * jQuery Superfish plugin. 890 * 891 * @type {Drupal~behavior} 892 * 893 * @prop {Drupal~behaviorAttach} attach 894 * Attaches the behavior to an applicable <ul> element. 895 */ 896 Drupal.behaviors.superfish = { 897 attach: function (context, drupalSettings) { 898 // Take a look at each menu to apply Superfish to. 899 $.each(drupalSettings.superfish || {}, function (index, options) { 900 var $menu = $('ul#' + options.id, context); 901 902 // Check if we are to apply the Supersubs plug-in to it. 903 if (options.plugins || false) { 904 if (options.plugins.supersubs || false) { 905 $menu.supersubs(options.plugins.supersubs); 906 } 907 } 908 909 // Apply Superfish to the menu. 910 $menu.superfish(options.sf); 911 912 // Check if we are to apply any other plug-in to it. 913 if (options.plugins || false) { 914 if (options.plugins.touchscreen || false) { 915 $menu.sftouchscreen(options.plugins.touchscreen); 916 } 917 if (options.plugins.smallscreen || false) { 918 $menu.sfsmallscreen(options.plugins.smallscreen); 919 } 920 if (options.plugins.supposition || false) { 921 $menu.supposition(); 922 } 923 } 924 }); 925 } 926 }; 927})(jQuery, Drupal, drupalSettings); 928; 929jQuery(document).ready(function($) { 930 $(window).scroll(function() { 931 if($(this).scrollTop() != 0) { 932 $(".to-top").addClass("show"); 933 } else { 934 $(".to-top").removeClass("show"); 935 } 936 }); 937 938 $(".to-top").click(function() { 939 $("body,html").animate({scrollTop:0},800); 940 }); 941}); 942; 943(function ($, Drupal) { 944 Drupal.behaviors.mtWaypointsAnimations = { 945 attach: function (context, settings) { 946 $("body:not(.path-admin) [data-animate-effect]", context).once('mtWaypointsAnimations').each(function() { 947 var thisObject = $(this); 948 var animation = thisObject.attr("data-animate-effect"); 949 if(animation != "no-animation") { 950 var waypoints = thisObject.waypoint(function(direction) { 951 var animatedObject = $(this.element); 952 setTimeout(function() { 953 animatedObject.addClass("animated " + animation); 954 }, 100); 955 this.destroy(); 956 },{ 957 offset: "90%" 958 }); 959 } 960 }); 961 } 962 }; 963})(jQuery, Drupal); 964; 965/*! 966Waypoints Sticky Element Shortcut - 4.0.1 967Copyright © 2011-2016 Caleb Troughton 968Licensed under the MIT license. 969https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 970*/ 971!function(){"use strict";function t(s){this.options=e.extend({},i.defaults,t.defaults,s),this.element=this.options.element,this.$element=e(this.element),this.createWrapper(),this.createWaypoint()}var e=window.jQuery,i=window.Waypoint;t.prototype.createWaypoint=function(){var t=this.options.handler;this.waypoint=new i(e.extend({},this.options,{element:this.wrapper,handler:e.proxy(function(e){var i=this.options.direction.indexOf(e)>-1,s=i?this.$element.outerHeight(!0):"";this.$wrapper.height(s),this.$element.toggleClass(this.options.stuckClass,i),t&&t.call(this,e)},this)}))},t.prototype.createWrapper=function(){this.options.wrapper&&this.$element.wrap(this.options.wrapper),this.$wrapper=this.$element.parent(),this.wrapper=this.$wrapper[0]},t.prototype.destroy=function(){this.$element.parent()[0]===this.wrapper&&(this.waypoint.destroy(),this.$element.removeClass(this.options.stuckClass),this.options.wrapper&&this.$element.unwrap())},t.defaults={wrapper:'<div class="sticky-wrapper" />',stuckClass:"stuck",direction:"down right"},i.Sticky=t}();; 972(function ($, Drupal) { 973 Drupal.behaviors.mtWaypointsFixedHeader = { 974 attach: function (context, settings) { 975 $(context).find(".header-container .header").once('mtWaypointsFixedHeaderInit').each(function(index, item) { 976 var sticky = new Waypoint.Sticky ({ 977 element: $('.header-container .header')[0], 978 stuckClass: 'js-fixed', 979 handler: function(direction) { 980 if (Waypoint.viewportWidth() > 752) { 981 $('body', context).toggleClass('onscroll'); 982 } else { 983 $('body', context).removeClass('onscroll'); 984 } 985 var topValue = $('body').css('padding-top'); 986 $(".header.js-fixed").css("top", topValue); 987 }, 988 offset: function() { 989 var offsetValue = parseInt($('body').css('padding-top')) - 1; 990 return offsetValue; 991 } 992 }); 993 }); 994 } 995 }; 996})(jQuery, Drupal); 997; 998jQuery(document).ready(function($) { 999 var color = $(".media-background").css("background-color").replace(")", "," + drupalSettings.enterpriseplus.VideoBg.VideoBgOpacity + ")").replace("rgb", "rgba");
vendor: 4,666 bytes, lines 1000-1013
1000 $(".media-background-transparent-bg").css("background-color", color); 1001});; 1002/* 1003 * Vide - v0.5.0 1004 * Easy as hell jQuery plugin for video backgrounds. 1005 * http://vodkabears.github.io/vide/ 1006 * 1007 * Made by Ilya Makarov 1008 * Under MIT License 1009 */ 1010!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery)}(this,function(a){"use strict";function b(a){var b,c,d,e,f,g,h,i={};for(f=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,",").split(","),h=0,g=f.length;g>h&&(c=f[h],-1===c.search(/^(http|https|ftp):\/\//)&&-1!==c.search(":"));h++)b=c.indexOf(":"),d=c.substring(0,b),e=c.substring(b+1),e||(e=void 0),"string"==typeof e&&(e="true"===e||("false"===e?!1:e)),"string"==typeof e&&(e=isNaN(e)?e:+e),i[d]=e;return null==d&&null==e?a:i}function c(a){a=""+a;var b,c,d,e=a.split(/\s+/),f="50%",g="50%";for(d=0,b=e.length;b>d;d++)c=e[d],"left"===c?f="0%":"right"===c?f="100%":"top"===c?g="0%":"bottom"===c?g="100%":"center"===c?0===d?f="50%":g="50%":0===d?f=c:g=c;return{x:f,y:g}}function d(b,c){var d=function(){c(this.src)};a('<img src="'+b+'.gif">').load(d),a('<img src="'+b+'.jpg">').load(d),a('<img src="'+b+'.jpeg">').load(d),a('<img src="'+b+'.png">').load(d)}function e(c,d,e){if(this.$element=a(c),"string"==typeof d&&(d=b(d)),e?"string"==typeof e&&(e=b(e)):e={},"string"==typeof d)d=d.replace(/\.\w*$/,"");else if("object"==typeof d)for(var f in d)d.hasOwnProperty(f)&&(d[f]=d[f].replace(/\.\w*$/,""));this.settings=a.extend({},g,e),this.path=d;try{this.init()}catch(i){if(i.message!==h)throw i}}var f="vide",g={volume:1,playbackRate:1,muted:!0,loop:!0,autoplay:!0,position:"50% 50%",posterType:"detect",resizing:!0,bgColor:"transparent",className:""},h="Not implemented";e.prototype.init=function(){var b,e,g=this,i=g.path,j=i,k="",l=g.$element,m=g.settings,n=c(m.position),o=m.posterType;e=g.$wrapper=a("<div>").addClass(m.className).css({position:"absolute","z-index":-1,top:0,left:0,bottom:0,right:0,overflow:"hidden","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover","background-color":m.bgColor,"background-repeat":"no-repeat","background-position":n.x+" "+n.y}),"object"==typeof i&&(i.poster?j=i.poster:i.mp4?j=i.mp4:i.webm?j=i.webm:i.ogv&&(j=i.ogv)),"detect"===o?d(j,function(a){e.css("background-image","url("+a+")")}):"none"!==o&&e.css("background-image","url("+j+"."+o+")"),"static"===l.css("position")&&l.css("position","relative"),l.prepend(e),"object"==typeof i?(i.mp4&&(k+='<source src="'+i.mp4+'.mp4" type="video/mp4">'),i.webm&&(k+='<source src="'+i.webm+'.webm" type="video/webm">'),i.ogv&&(k+='<source src="'+i.ogv+'.ogv" type="video/ogg">'),b=g.$video=a("<video>"+k+"</video>")):b=g.$video=a('<video><source src="'+i+'.mp4" type="video/mp4"><source src="'+i+'.webm" type="video/webm"><source src="'+i+'.ogv" type="video/ogg"></video>');try{b.prop({autoplay:m.autoplay,loop:m.loop,volume:m.volume,muted:m.muted,defaultMuted:m.muted,playbackRate:m.playbackRate,defaultPlaybackRate:m.playbackRate})}catch(p){throw new Error(h)}b.css({margin:"auto",position:"absolute","z-index":-1,top:n.y,left:n.x,"-webkit-transform":"translate(-"+n.x+", -"+n.y+")","-ms-transform":"translate(-"+n.x+", -"+n.y+")","-moz-transform":"translate(-"+n.x+", -"+n.y+")",transform:"translate(-"+n.x+", -"+n.y+")",visibility:"hidden",opacity:0}).one("canplaythrough."+f,function(){g.resize()}).one("playing."+f,function(){b.css({visibility:"visible",opacity:1}),e.css("background-image","none")}),l.on("resize."+f,function(){m.resizing&&g.resize()}),e.append(b)},e.prototype.getVideoObject=function(){return this.$video[0]},e.prototype.resize=function(){if(this.$video){var a=this.$wrapper,b=this.$video,c=b[0],d=c.videoHeight,e=c.videoWidth,f=a.height(),g=a.width();g/e>f/d?b.css({width:g+2,height:"auto"}):b.css({width:"auto",height:f+2})}},e.prototype.destroy=function(){delete a[f].lookup[this.index],this.$video&&this.$video.off(f),this.$element.off(f).removeData(f),this.$wrapper.remove()},a[f]={lookup:[]},a.fn[f]=function(b,c){var d;return this.each(function(){d=a.data(this,f),d&&d.destroy(),d=new e(this,b,c),d.index=a[f].lookup.push(d)-1,a.data(this,f,d)}),this},a(document).ready(function(){var b=a(window);b.on("resize."+f,function(){for(var b,c=a[f].lookup.length,d=0;c>d;d++)b=a[f].lookup[d],b&&b.settings.resizing&&b.resize()}),b.on("unload."+f,function(){return!1}),a(document).find("[data-"+f+"-bg]").each(function(b,c){var d=a(c),e=d.data(f+"-options"),g=d.data(f+"-bg");d[f](g,e)})})});; 1011jQuery(document).ready(function($) { 1012 $("body").addClass("video-bg-active"); 1013 $(".video-bg-active .media-background").vide({
1014 mp4: drupalSettings.enterpriseplus.VideoBackgroundInit.PathToVideo_mp4, 1015 webm: drupalSettings.enterpriseplus.VideoBackgroundInit.PathToVideo_webm, 1016 poster: drupalSettings.enterpriseplus.VideoBackgroundInit.pathToVideo_jpg 1017 },{ 1018 posterType: 'jpg', 1019 className: 'video-container' 1020 }); 1021});;
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.