1// 2// stuck 3// 4 5(function() { 6 (function($) { 7 return $.fn.stuck = function(opts) { 8 var Stuck; 9 Stuck = (function() { 10 Stuck.prototype.elements = []; 11 12 Stuck.prototype.resizing = false; 13 14 function Stuck(w, opts) { 15 this.window = w; 16 this.body = $("body"); 17 this.loadElements(); 18 this.calculateTopOffset(); 19 if (this.isIOS()) { 20 this.body.on({ 21 touchmove: (function(_this) { 22 return function() { 23 return _this.update(); 24 }; 25 })(this) 26 }); 27 } 28 this.window.scroll(((function(_this) { 29 return function() { 30 return _this.update(); 31 }; 32 })(this))); 33 this.window.resize(((function(_this) { 34 return function() { 35 return _this.resize(); 36 }; 37 })(this))); 38 this.update(); 39 this; 40 } 41 42 Stuck.prototype.isIOS = function() { 43 return this._isIOS || (this._isIOS = /(iPad|iPhone|iPod)/g.test(navigator.userAgent)); 44 }; 45 46 Stuck.prototype.resize = function() { 47 this.resizing = true; 48 this.calculateTopOffset(); 49 this.update(); 50 }; 51 52 Stuck.prototype.loadElements = function() { 53 var classes, container, divs, i, name, node, release, spacer, top, x, y; 54 divs = $(".stuck"); 55 i = divs.length; 56 y = 0; 57 while (i--) { 58 node = divs.eq(y); 59 y++; 60 release = false; 61 container = ''; 62 classes = node.attr("class").split(/\s+/); 63 spacer = $("<div/>"); 64 x = classes.length; 65 while (x--) { 66 name = classes[x]; 67 if (name === "release") { 68 release = true; 69 container = node.closest(".release-container"); 70 } 71 if (!(name === "stuck" || name === "release")) { 72 spacer.addClass(name); 73 } 74 } 75 spacer.height(node.outerHeight()).hide().css("background-color", "transparent").insertBefore(node); 76 top = node.offset().top - parseInt(node.css('margin-top')); 77 this.elements.push({ 78 node: node, 79 spacer: spacer, 80 top: top, 81 top_offset: 0, 82 fixed: false, 83 release: release, 84 container: container, 85 contained: false 86 }); 87 } 88 }; 89 90 Stuck.prototype.calculateTopOffset = function() { 91 var collide_flag, collide_y, collision, el, elements, i, matrix, max_height, row_element, value, x, y, z; 92 matrix = []; 93 i = this.elements.length; 94 x = 0; 95 while (i--) { 96 el = this.elements[x]; 97 x++; 98 y = matrix.length; 99 if (y === 0) { 100 if (!el.release) { 101 matrix.push([el]); 102 } 103 } else { 104 collide_flag = false; 105 while (y-- && !collide_flag) { 106 max_height = 0; 107 elements = matrix[y]; 108 z = elements.length; 109 while (z--) { 110 row_element = elements[z]; 111 collision = this.collide(row_element.node, el.node); 112 if (collision) { 113 value = row_element.top_offset + row_element.node.outerHeight(true); 114 if (value > max_height) { 115 max_height = value; 116 } 117 collide_flag = true; 118 if (matrix[y + 1] != null) { 119 collide_y = y + 1; 120 } else { 121 collide_y = -1; 122 } 123 } else { 124 if (y === 0) { 125 collide_y = 0; 126 } 127 } 128 } 129 } 130 if (collide_flag) { 131 el.top_offset = max_height; 132 if (!el.release) { 133 if (collide_y >= 0) { 134 matrix[collide_y].push(el); 135 } else { 136 matrix.push([el]); 137 } 138 } 139 } else { 140 el.top_offset = 0; 141 if (!el.release) { 142 matrix[0].push(el); 143 } 144 } 145 } 146 } 147 }; 148 149 Stuck.prototype.collide = function(node1, node2) { 150 var n1l, n2l; 151 n1l = node1.offset().left; 152 n2l = node2.offset().left; 153 if (n1l === n2l) { 154 return true; 155 } else if (n1l < n2l) { 156 if (Math.floor(n1l) + node1.width() > Math.ceil(n2l)) { 157 return true; 158 } else { 159 return false;
160 } 161 } else { 162 if (Math.floor(n2l) + node2.width() > Math.ceil(n1l)) { 163 return true; 164 } else { 165 return false; 166 } 167 } 168 }; 169 170 Stuck.prototype.update = function() { 171 var el, i, window_top; 172 window_top = this.window.scrollTop(); 173 i = this.elements.length; 174 while (i--) { 175 el = this.elements[i]; 176 if (this.resizing) { 177 if (el.fixed) { 178 el.top = el.spacer.offset().top - parseInt(el.spacer.css('margin-top')); 179 } else { 180 el.top = el.node.offset().top - parseInt(el.node.css('margin-top')); 181 } 182 if (el.fixed) { 183 el.node.css({ 184 top: el.top_offset, 185 left: el.spacer.offset().left, 186 width: el.spacer.outerWidth() 187 }); 188 } 189 if (el.contained && window_top > (el.container.offset().top + el.container.height() - el.node.height() - el.top_offset)) { 190 el.node.css({ 191 position: "absolute", 192 top: el.container.height() - el.node.height(), 193 left: '', 194 width: '', 195 "z-index": '' 196 }); 197 } 198 } 199 if (el.fixed && el.release && !el.contained && window_top > (el.container.offset().top + el.container.height() - el.node.height() - el.top_offset)) { 200 el.contained = true; 201 el.container.css("position", "relative"); 202 el.node.css({ 203 position: "absolute", 204 top: el.container.height() - el.node.height(), 205 left: '', 206 width: '', 207 "z-index": '' 208 }); 209 } 210 if (el.contained && window_top < (el.container.offset().top + el.container.height() - el.node.height() - el.top_offset)) { 211 el.contained = false; 212 el.container.css("position", ''); 213 el.node.css({ 214 position: "fixed", 215 top: el.top_offset, 216 left: el.spacer.offset().left, 217 width: el.spacer.outerWidth(), 218 "z-index": 999 219 }); 220 } 221 if (!el.fixed && window_top > el.top - el.top_offset) { 222 el.fixed = true; 223 el.spacer.show(); 224 el.node.css({ 225 position: "fixed", 226 top: el.top_offset, 227 left: el.spacer.offset().left, 228 width: el.spacer.outerWidth(), 229 "z-index": 999 230 }); 231 } 232 if (el.fixed && window_top < el.top - el.top_offset) { 233 el.fixed = false; 234 el.spacer.hide(); 235 el.node.css({ 236 position: "relative", 237 top: '', 238 left: '', 239 width: '', 240 "z-index": '' 241 }); 242 } 243 } 244 this.resizing = false; 245 }; 246 247 Stuck.prototype.destroy = function() { 248 var i; 249 i = this.elements.length; 250 while (i--) { 251 this.elements[i].spacer.remove(); 252 } 253 this.window.unbind('scroll'); 254 this.window.unbind('resize'); 255 this.window = this.elements = null; 256 }; 257 258 return Stuck; 259 260 })(); 261 return new Stuck(this, opts); 262 }; 263 })(jQuery); 264 265}).call(this); 266 267 268/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ 269jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.no
vendor: 5,736 bytes, lines 269-271
269deName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); 270var stacks = {}; 271stacks.jQuery = jQuery.noConflict(true);
272stacks.com_elixir_stacks_foundryMegaMenu = {}; 273stacks.com_elixir_stacks_foundryMegaMenu = (function(stack) { 274var jQuery = stacks.jQuery;var $ = jQuery;// Sticky Plugin v1.0.4 for jQuery 275// ============= 276// Author: Anthony Garand 277// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) 278// Improvements by Leonardo C. Daronco (daronco) 279// Created: 02/14/2011 280// Date: 07/20/2015 281// Website: http://stickyjs.com/ 282// Description: Makes an element on the page stick on the screen as you scroll 283// It will only set the 'top' and 'position' of your element, you 284// might need to adjust the width in some cases. 285 286(function (factory) { 287 if (typeof define === 'function' && define.amd) { 288 // AMD. Register as an anonymous module. 289 define(['jquery'], factory); 290 } else if (typeof module === 'object' && module.exports) { 291 // Node/CommonJS 292 module.exports = factory(require('jquery')); 293 } else { 294 // Browser globals 295 factory(jQuery); 296 } 297}(function ($) { 298 var slice = Array.prototype.slice; // save ref to original slice() 299 var splice = Array.prototype.splice; // save ref to original slice() 300 301 var defaults = { 302 topSpacing: 0, 303 bottomSpacing: 0, 304 className: 'is-sticky', 305 wrapperClassName: 'sticky-wrapper', 306 center: false, 307 getWidthFrom: '', 308 widthFromWrapper: true, // works only when .getWidthFrom is empty 309 responsiveWidth: false, 310 zIndex: 'auto' 311 }, 312 $window = $(window), 313 $document = $(document), 314 sticked = [], 315 windowHeight = $window.height(), 316 scroller = function() { 317 var scrollTop = $window.scrollTop(), 318 documentHeight = $document.height(), 319 dwh = documentHeight - windowHeight, 320 extra = (scrollTop > dwh) ? dwh - scrollTop : 0; 321 322 for (var i = 0, l = sticked.length; i < l; i++) { 323 var s = sticked[i], 324 elementTop = s.stickyWrapper.offset().top, 325 etse = elementTop - s.topSpacing - extra; 326 327 //update height in case of dynamic content 328 s.stickyWrapper.css('height', s.stickyElement.outerHeight()); 329 s.stickyElement.css('transform', 'translate3d(0px, 0px, 0px)'); 330 331 if (scrollTop <= etse) { 332 if (s.currentTop !== null) { 333 s.stickyElement 334 .css({ 335 'width': '', 336 'position': '', 337 'top': '', 338 'left': '', 339 'right': '', 340 'z-index': '' 341 }); 342 s.stickyElement.parent().removeClass(s.className); 343 s.stickyElement.trigger('sticky-end', [s]); 344 s.currentTop = null; 345 } 346 } 347 else { 348 var newTop = documentHeight - s.stickyElement.outerHeight() 349 - s.topSpacing - s.bottomSpacing - scrollTop - extra; 350 if (newTop < 0) { 351 newTop = newTop + s.topSpacing; 352 } else { 353 newTop = s.topSpacing; 354 } 355 if (s.currentTop !== newTop) { 356 var newWidth; 357 if (s.getWidthFrom) { 358 newWidth = $(s.getWidthFrom).width() || null; 359 } else if (s.widthFromWrapper) { 360 newWidth = s.stickyWrapper.width(); 361 } 362 if (newWidth == null) { 363 newWidth = s.stickyElement.width(); 364 } 365 s.stickyElement 366 .css('width', newWidth) 367 .css('position', 'fixed') 368 .css('top', newTop) 369 .css('left', '0') 370 .css('right', '0') 371 .css('z-index', s.zIndex); 372 373 s.stickyElement.parent().addClass(s.className); 374 375 if (s.currentTop === null) { 376 s.stickyElement.trigger('sticky-start', [s]); 377 } else { 378 // sticky is started but it have to be repositioned 379 s.stickyElement.trigger('sticky-update', [s]); 380 } 381 382 if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) { 383 // just reached bottom || just started to stick but bottom is already reached 384 s.stickyElement.trigger('sticky-bottom-reached', [s]); 385 } else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) { 386 // sticky is started && sticked at topSpacing && overflowing from top just finished 387 s.stickyElement.trigger('sticky-bottom-unreached', [s]); 388 } 389 390 s.currentTop = newTop; 391 } 392 393 // Check if sticky has reached end of container and stop sticking 394 var stickyWrapperContainer = s.stickyWrapper.parent(); 395 var unstick = (s.stickyElement.offset().top + s.stickyElement.outerHeight() >= stickyWrapperContainer.offset().top + stickyWrapperContainer.outerHeight()) && (s.stickyElement.offset().top < s.topSpacing); 396 397 if( unstick ) { 398 s.stickyElement 399 .css('position', 'relative') 400 .css('top', '') 401 .css('left', '') 402 .css('right', '') 403 .css('bottom', 0) 404 .css('z-index', ''); 405 } else { 406 s.stickyElement 407 .css('position', 'fixed') 408 .css('top', newTop) 409 .css('left', '0') 410 .css('right', '0') 411 .css('bottom', '') 412 .css('z-index', s.zIndex); 413 } 414 } 415 } 416 }, 417 resizer = function() { 418 windowHeight = $window.height(); 419 420 for (var i = 0, l = sticked.length; i < l; i++) { 421 var s = sticked[i]; 422 var newWidth = null; 423 if (s.getWidthFrom) { 424 if (s.responsiveWidth) { 425 newWidth = $(s.getWidthFrom).width(); 426 } 427 } else if(s.widthFromWrapper) { 428 newWidth = s.stickyWrapper.width(); 429 } 430 if (newWidth != null) { 431 s.stickyElement.css('width', newWidth); 432 } 433 } 434 435 scroller(); 436 437 }, 438 methods = { 439 init: function(options) { 440 var o = $.extend({}, defaults, options); 441 return this.each(function() { 442 var stickyElement = $(this); 443 444 var stickyId = stickyElement.attr('id'); 445 var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName;
446 var wrapper = $('<div></div>') 447 .attr('id', wrapperId) 448 .addClass(o.wrapperClassName); 449 450 stickyElement.wrapAll(function() { 451 if ($(this).parent("#" + wrapperId).length == 0) { 452 return wrapper; 453 } 454}); 455 456 var stickyWrapper = stickyElement.parent(); 457 458 if (o.center) { 459 stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); 460 } 461 462 if (stickyElement.css("float") === "right") { 463 stickyElement.css({"float":"none"}).parent().css({"float":"right"}); 464 } 465 466 o.stickyElement = stickyElement; 467 o.stickyWrapper = stickyWrapper; 468 o.currentTop = null; 469 470 sticked.push(o); 471 472 methods.setWrapperHeight(this); 473 methods.setupChangeListeners(this); 474 }); 475 }, 476 477 setWrapperHeight: function(stickyElement) { 478 var element = $(stickyElement); 479 var stickyWrapper = element.parent(); 480 if (stickyWrapper) { 481 stickyWrapper.css('height', element.outerHeight()); 482 } 483 }, 484 485 setupChangeListeners: function(stickyElement) { 486 if (window.MutationObserver) { 487 var mutationObserver = new window.MutationObserver(function(mutations) { 488 if (mutations[0].addedNodes.length || mutations[0].removedNodes.length) { 489 methods.setWrapperHeight(stickyElement); 490 } 491 }); 492 mutationObserver.observe(stickyElement, {subtree: true, childList: true}); 493 } else { 494 if (window.addEventListener) { 495 stickyElement.addEventListener('DOMNodeInserted', function() { 496 methods.setWrapperHeight(stickyElement); 497 }, false); 498 stickyElement.addEventListener('DOMNodeRemoved', function() { 499 methods.setWrapperHeight(stickyElement); 500 }, false); 501 } else if (window.attachEvent) { 502 stickyElement.attachEvent('onDOMNodeInserted', function() { 503 methods.setWrapperHeight(stickyElement); 504 }); 505 stickyElement.attachEvent('onDOMNodeRemoved', function() { 506 methods.setWrapperHeight(stickyElement); 507 }); 508 } 509 } 510 }, 511 update: scroller, 512 unstick: function(options) { 513 return this.each(function() { 514 var that = this; 515 var unstickyElement = $(that); 516 517 var removeIdx = -1; 518 var i = sticked.length; 519 while (i-- > 0) { 520 if (sticked[i].stickyElement.get(0) === that) { 521 splice.call(sticked,i,1); 522 removeIdx = i; 523 } 524 } 525 if(removeIdx !== -1) { 526 unstickyElement.unwrap(); 527 unstickyElement 528 .css({ 529 'width': '', 530 'position': '', 531 'top': '', 532 'left': '', 533 'right': '', 534 'float': '', 535 'z-index': '' 536 }); 537 } 538 }); 539 } 540 }; 541 542 // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): 543 if (window.addEventListener) { 544 window.addEventListener('scroll', scroller, false); 545 window.addEventListener('resize', resizer, false); 546 } else if (window.attachEvent) { 547 window.attachEvent('onscroll', scroller); 548 window.attachEvent('onresize', resizer); 549 } 550 551 $.fn.sticky = function(method) { 552 if (methods[method]) { 553 return methods[method].apply(this, slice.call(arguments, 1)); 554 } else if (typeof method === 'object' || !method ) { 555 return methods.init.apply( this, arguments ); 556 } else { 557 $.error('Method ' + method + ' does not exist on jQuery.sticky'); 558 } 559 }; 560 561 $.fn.unstick = function(method) { 562 if (methods[method]) { 563 return methods[method].apply(this, slice.call(arguments, 1)); 564 } else if (typeof method === 'object' || !method ) { 565 return methods.unstick.apply( this, arguments ); 566 } else { 567 $.error('Method ' + method + ' does not exist on jQuery.sticky'); 568 } 569 }; 570 $(function() { 571 setTimeout(scroller, 0); 572 }); 573})); 574 575return stack;}
575)(stacks.com_elixir_stacks_foundryMegaMenu); 576stacks.stacks_in_13_2 = {}; 577stacks.stacks_in_13_2 = (function(stack) { 578var jQuery = stacks.jQuery;var $ = jQuery;$(document).ready(function(){ 579 580 $('#stacks_in_13_2 > .container').parentsUntil('.stacks_top').css('overflow', 'visible'); 581 $('.stacks_top').css({'overflow' : 'visible'}); 582 583}); 584 585return stack;})(stacks.stacks_in_13_2); 586stacks.stacks_in_13_4_2 = {}; 587stacks.stacks_in_13_4_2 = (function(stack) { 588var jQuery = stacks.jQuery;var $ = jQuery;// Set Language for Document 589document.documentElement.lang = "en"; 590 591$(document).ready(function(){ 592 593 594 595}); 596 597$.fn.elementRealHeight = function () { 598 $clone = this.clone() 599 .css("visibility","hidden") 600 .appendTo($('body')); 601 var $height = $clone.outerHeight(); 602 $clone.remove(); 603 return $height; 604 }; 605 606 $.fn.elementRealWidth = function () { 607 $clone = this.clone() 608 .css("visibility","hidden") 609 .appendTo($('body')); 610 var $width = $clone.outerWidth(); 611 $clone.remove(); 612 return $width; 613 }; 614 615 616 // Handles offsets for anchor tags 617 // (function(document, history, location) { 618 // var HISTORY_SUPPORT = !!(history && history.pushState); 619 // 620 // var anchorScrolls = { 621 // ANCHOR_REGEX: /^#[^ ]+$/, 622 // OFFSET_HEIGHT_PX: 0, 623 // 624 // /** 625 // * Establish events, and fix initial scroll position if a hash is provided. 626 // */ 627 // init: function() { 628 // this.scrollToCurrent(); 629 // window.addEventListener('hashchange', this.scrollToCurrent.bind(this)); 630 // document.body.addEventListener('click', this.delegateAnchors.bind(this)); 631 // }, 632 // 633 // /** 634 // * Return the offset amount to deduct from the normal scroll position. 635 // * Modify as appropriate to allow for dynamic calculations 636 // */ 637 // getFixedOffset: function() { 638 // return this.OFFSET_HEIGHT_PX; 639 // }, 640 // 641 // /** 642 // * If the provided href is an anchor which resolves to an element on the 643 // * page, scroll to it. 644 // * @param {String} href 645 // * @return {Boolean} - Was the href an anchor. 646 // */ 647 // scrollIfAnchor: function(href, pushToHistory) { 648 // var match, rect, anchorOffset; 649 // 650 // if(!this.ANCHOR_REGEX.test(href)) { 651 // return false; 652 // } 653 // 654 // match = document.getElementById(href.slice(1)); 655 // 656 // if(match) { 657 // rect = match.getBoundingClientRect(); 658 // anchorOffset = window.pageYOffset + rect.top - this.getFixedOffset(); 659 // window.scrollTo(window.pageXOffset, anchorOffset); 660 // 661 // // Add the state to history as-per normal anchor links 662 // if(HISTORY_SUPPORT && pushToHistory) { 663 // history.pushState({}, document.title, location.pathname + href); 664 // } 665 // } 666 // 667 // return !!match; 668 // }, 669 // 670 // /** 671 // * Attempt to scroll to the current location's hash. 672 // */ 673 // scrollToCurrent: function() { 674 // this.scrollIfAnchor(window.location.hash); 675 // }, 676 // 677 // /** 678 // * If the click event's target was an anchor, fix the scroll position. 679 // */ 680 // delegateAnchors: function(e) { 681 // var elem = e.target; 682 // 683 // if( 684 // elem.nodeName === 'A' && 685 // this.scrollIfAnchor(elem.getAttribute('href'), true) 686 // ) { 687 // e.preventDefault(); 688 // } 689 // } 690 // }; 691 // 692 // window.addEventListener( 693 // 'DOMContentLoaded', anchorScrolls.init.bind(anchorScrolls) 694 // ); 695 // })(window.document, window.history, window.location); 696 697return stack;})(stacks.stacks_in_13_4_2); 698stacks.stacks_in_13_5_1 = {}; 699stacks.stacks_in_13_5_1 = (function(stack) { 700var jQuery = stacks.jQuery;var $ = jQuery; 701 702// $(document).ready(function($){ 703// $("#stacks_in_13_5_1 > .sticky_content").makeFixed(); 704// }); 705 706$(document).ready(function(){ 707 708 $('#stacks_in_13_5_1 > .sticky_content').parentsUntil('.stacks_top').css({'overflow' : 'visible'}); 709 $('.stacks_top').css({'overflow' : 'visible'}); 710 711 712 $('#stacks_in_13_5_1').addClass('stuck'); 713 $(window).stuck(); 714}); 715 716 717 718 719return stack;})(stacks.stacks_in_13_5_1); 720stacks.stacks_in_13_5_2_1 = {}; 721stacks.stacks_in_13_5_2_1 = (function(stack) { 722var jQuery = stacks.jQuery;var $ = jQuery;function megaMenu() { 723 $('#stacks_in_13_5_2_1 .foundry-mega-menu').parentsUntil('.stacks_top').css({'overflow' : 'visible'}); 724 $('.stacks_top').css({'overflow' : 'visible'}); 725 726 $('#stacks_in_13_5_2_1 .drop-down-container').addClass(''); 727 728 729 730 $('#stacks_in_13_5_2_1 .nav > li.parent > a').click(function(){ 731 event.preventDefault(); 732 733 734 // 735 // Close all navigation drop downs when another is opened. 736 // 737 // $(this).parent().toggleClass('selected'); 738 739 if ($(this).parent().find(".drop-down-container").is(':visible')) { 740 $(this).parent().addClass('toggleClosedAgain'); 741 } 742 743 $("#stacks_in_13_5_2_1 .nav > li.parent").find(".drop-down-container").removeClass('show-drop-down'); 744 745 746 747 // $(this).parent().toggleClass('selected'); 748 $(this).parent().find("> .drop-down-container").toggleClass('show-drop-down'); 749 $("#stacks_in_13_5_2_1 .nav > li.toggleClosedAgain").removeClass('toggleClosedAgain').find(".drop-down-container").toggleClass('show-drop-down'); 750 751 }); 752 753 754 755 756 // Show and hide navigation on Mobile breakpoint 757 $('#stacks_in_13_5_2_1 .foundry-mega-menu-toggle').click(function(){ 758 $('#stacks_in_13_5_2_1 .foundry-mega-menu').slideToggle(300); 759 }); 760 761 762 $('#stacks_in_13_5_2_1 [class*="-anchor-scroll"]').click(function(){ 763 if ($('#stacks_in_13_5_2_1 .foundry-mega-menu-toggle').is(":visible")) { 764 $('#stacks_in_13_5_2_1 .foundry-mega-menu').slideToggle(300); 765 } 766 }); 767 768 769 770 // Auto detect active (.selected) page 771 // Site _MUST_ use Tidy Links for this to be used. 772 $('#stacks_in_13_5_2_1 .nav li a').each(function (index){ 773 if ($(this).attr('href') == "./") { 774 $(this).parent().addClass('selected'); 775 $(this).closest('li.parent').addClass('selected'); 776 } 777 }); 778 779 780 // 781 // Handles pairing navigation with parent banner 782 // 783 784 785} 786 787 788 789 $(document).ready(function(){ 790 megaMenu(); 791 }); 792 793 794return stack;})(stacks.stacks_in_13_5_2_1); 795stacks.stacks_in_16 = {}; 796stacks.stacks_in_16 = (function(stack) { 797var jQuery = stacks.jQuery;var $ = jQuery; 798 799 800return stack;})(stacks.stacks_in_16);
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.