vendor: 25,965 bytes, lines 1-841
1;(function () { 2 'use strict'; 3 4 /** 5 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. 6 * 7 * @codingstandard ftlabs-jsv2 8 * @copyright The Financial Times Limited [All Rights Reserved] 9 * @license MIT License (see LICENSE.txt) 10 */ 11 12 /*jslint browser:true, node:true*/ 13 /*global define, Event, Node*/ 14 15 16 /** 17 * Instantiate fast-clicking listeners on the specified layer. 18 * 19 * @constructor 20 * @param {Element} layer The layer to listen on 21 * @param {Object} [options={}] The options to override the defaults 22 */ 23 function FastClick(layer, options) { 24 var oldOnClick; 25 26 options = options || {}; 27 28 /** 29 * Whether a click is currently being tracked. 30 * 31 * @type boolean 32 */ 33 this.trackingClick = false; 34 35 36 /** 37 * Timestamp for when click tracking started. 38 * 39 * @type number 40 */ 41 this.trackingClickStart = 0; 42 43 44 /** 45 * The element being tracked for a click. 46 * 47 * @type EventTarget 48 */ 49 this.targetElement = null; 50 51 52 /** 53 * X-coordinate of touch start event. 54 * 55 * @type number 56 */ 57 this.touchStartX = 0; 58 59 60 /** 61 * Y-coordinate of touch start event. 62 * 63 * @type number 64 */ 65 this.touchStartY = 0; 66 67 68 /** 69 * ID of the last touch, retrieved from Touch.identifier. 70 * 71 * @type number 72 */ 73 this.lastTouchIdentifier = 0; 74 75 76 /** 77 * Touchmove boundary, beyond which a click will be cancelled. 78 * 79 * @type number 80 */ 81 this.touchBoundary = options.touchBoundary || 10; 82 83 84 /** 85 * The FastClick layer. 86 * 87 * @type Element 88 */ 89 this.layer = layer; 90 91 /** 92 * The minimum time between tap(touchstart and touchend) events 93 * 94 * @type number 95 */ 96 this.tapDelay = options.tapDelay || 200; 97 98 /** 99 * The maximum time for a tap 100 * 101 * @type number 102 */ 103 this.tapTimeout = options.tapTimeout || 700; 104 105 if (FastClick.notNeeded(layer)) { 106 return; 107 } 108 109 // Some old versions of Android don't have Function.prototype.bind 110 function bind(method, context) { 111 return function() { return method.apply(context, arguments); }; 112 } 113 114 115 var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; 116 var context = this; 117 for (var i = 0, l = methods.length; i < l; i++) { 118 context[methods[i]] = bind(context[methods[i]], context); 119 } 120 121 // Set up event handlers as required 122 if (deviceIsAndroid) { 123 layer.addEventListener('mouseover', this.onMouse, true); 124 layer.addEventListener('mousedown', this.onMouse, true); 125 layer.addEventListener('mouseup', this.onMouse, true); 126 } 127 128 layer.addEventListener('click', this.onClick, true); 129 layer.addEventListener('touchstart', this.onTouchStart, false); 130 layer.addEventListener('touchmove', this.onTouchMove, false); 131 layer.addEventListener('touchend', this.onTouchEnd, false); 132 layer.addEventListener('touchcancel', this.onTouchCancel, false); 133 134 // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) 135 // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick 136 // layer when they are cancelled. 137 if (!Event.prototype.stopImmediatePropagation) { 138 layer.removeEventListener = function(type, callback, capture) { 139 var rmv = Node.prototype.removeEventListener; 140 if (type === 'click') { 141 rmv.call(layer, type, callback.hijacked || callback, capture); 142 } else { 143 rmv.call(layer, type, callback, capture); 144 } 145 }; 146 147 layer.addEventListener = function(type, callback, capture) { 148 var adv = Node.prototype.addEventListener; 149 if (type === 'click') { 150 adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) { 151 if (!event.propagationStopped) { 152 callback(event); 153 } 154 }), capture); 155 } else { 156 adv.call(layer, type, callback, capture); 157 } 158 }; 159 } 160 161 // If a handler is already declared in the element's onclick attribute, it will be fired before 162 // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and 163 // adding it as listener. 164 if (typeof layer.onclick === 'function') { 165 166 // Android browser on at least 3.2 requires a new reference to the function in layer.onclick 167 // - the old one won't work if passed to addEventListener directly. 168 oldOnClick = layer.onclick; 169 layer.addEventListener('click', function(event) { 170 oldOnClick(event); 171 }, false); 172 layer.onclick = null; 173 } 174 } 175 176 /** 177 * Windows Phone 8.1 fakes user agent string to look like Android and iPhone. 178 * 179 * @type boolean 180 */ 181 var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0; 182 183 /** 184 * Android requires exceptions. 185 * 186 * @type boolean 187 */ 188 var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone; 189 190 191 /** 192 * iOS requires exceptions. 193 * 194 * @type boolean 195 */ 196 var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone; 197 198 199 /** 200 * iOS 4 requires an exception for select elements. 201 * 202 * @type boolean 203 */ 204 var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent); 205 206 207 /** 208 * iOS 6.0-7.* requires the target element to be manually derived 209 * 210 * @type boolean 211 */ 212 var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent); 213 214 /** 215 * BlackBerry requires exceptions. 216 * 217 * @type boolean 218 */ 219 var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; 220 221 /** 222 * Determine whether a given element requires a native click. 223 * 224 * @param {EventTarget|Element} target Target DOM element 225 * @returns {boolean} Returns true if the element needs a native click 226 */ 227 FastClick.prototype.needsClick = function(target) { 228 switch (target.nodeName.toLowerCase()) { 229 230 // Don't send a synthetic click to disabled inputs (issue #62) 231 case 'button': 232 case 'select': 233 case 'textarea': 234 if (target.disabled) { 235 return true; 236 } 237 238 break; 239 case 'input': 240 241 // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) 242 if ((deviceIsIOS && target.type === 'file') || target.disabled) { 243 return true; 244 } 245 246 break; 247 case 'label': 248 case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames 249 case 'video': 250 return true; 251 } 252 253 return (/\bneedsclick\b/).test(target.className); 254 }; 255 256 257 /** 258 * Determine whether a given element requires a call to focus to simulate click into element. 259 * 260 * @param {EventTarget|Element} target Target DOM element 261 * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. 262 */ 263 FastClick.prototype.needsFocus = function(target) { 264 switch (target.nodeName.toLowerCase()) { 265 case 'textarea': 266 return true; 267 case 'select': 268 return !deviceIsAndroid; 269 case 'input': 270 switch (target.type) { 271 case 'button': 272 case 'checkbox': 273 case 'file': 274 case 'image': 275 case 'radio': 276 case 'submit': 277 return false; 278 } 279 280 // No point in attempting to focus disabled inputs 281 return !target.disabled && !target.readOnly; 282 default: 283 return (/\bneedsfocus\b/).test(target.className); 284 } 285 }; 286 287 288 /** 289 * Send a click event to the specified element. 290 * 291 * @param {EventTarget|Element} targetElement 292 * @param {Event} event 293 */ 294 FastClick.prototype.sendClick = function(targetElement, event) { 295 var clickEvent, touch; 296 297 // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) 298 if (document.activeElement && document.activeElement !== targetElement) { 299 document.activeElement.blur(); 300 } 301 302 touch = event.changedTouches[0]; 303 304 // Synthesise a click event, with an extra attribute so it can be tracked 305 clickEvent = document.createEvent('MouseEvents'); 306 clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); 307 clickEvent.forwardedTouchEvent = true; 308 targetElement.dispatchEvent(clickEvent); 309 }; 310 311 FastClick.prototype.determineEventType = function(targetElement) { 312 313 //Issue #159: Android Chrome Select Box does not open with a synthetic click event 314 if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { 315 return 'mousedown'; 316 } 317 318 return 'click'; 319 }; 320 321 322 /** 323 * @param {EventTarget|Element} targetElement 324 */ 325 FastClick.prototype.focus = function(targetElement) { 326 var length; 327 328 // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. 329 if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { 330 length = targetElement.value.length; 331 targetElement.setSelectionRange(length, length); 332 } else { 333 targetElement.focus(); 334 } 335 }; 336 337 338 /** 339 * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. 340 * 341 * @param {EventTarget|Element} targetElement 342 */ 343 FastClick.prototype.updateScrollParent = function(targetElement) { 344 var scrollParent, parentElement; 345 346 scrollParent = targetElement.fastClickScrollParent; 347 348 // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the 349 // target element was moved to another parent. 350 if (!scrollParent || !scrollParent.contains(targetElement)) { 351 parentElement = targetElement; 352 do { 353 if (parentElement.scrollHeight > parentElement.offsetHeight) { 354 scrollParent = parentElement; 355 targetElement.fastClickScrollParent = parentElement; 356 break; 357 } 358 359 parentElement = parentElement.parentElement; 360 } while (parentElement); 361 } 362 363 // Always update the scroll top tracker if possible. 364 if (scrollParent) { 365 scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; 366 } 367 }; 368 369 370 /** 371 * @param {EventTarget} targetElement 372 * @returns {Element|EventTarget} 373 */ 374 FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) { 375 376 // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. 377 if (eventTarget.nodeType === Node.TEXT_NODE) { 378 return eventTarget.parentNode; 379 } 380 381 return eventTarget; 382 }; 383 384 385 /** 386 * On touch start, record the position and scroll offset. 387 * 388 * @param {Event} event 389 * @returns {boolean} 390 */ 391 FastClick.prototype.onTouchStart = function(event) { 392 var targetElement, touch, selection; 393 394 // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). 395 if (event.targetTouches.length > 1) { 396 return true; 397 } 398 399 targetElement = this.getTargetElementFromEventTarget(event.target); 400 touch = event.targetTouches[0]; 401 402 if (deviceIsIOS) { 403 404 // Only trusted events will deselect text on iOS (issue #49) 405 selection = window.getSelection(); 406 if (selection.rangeCount && !selection.isCollapsed) { 407 return true; 408 } 409 410 if (!deviceIsIOS4) { 411 412 // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): 413 // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched 414 // with the same identifier as the touch event that previously triggered the click that triggered the alert. 415 // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an 416 // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. 417 // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, 418 // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, 419 // random integers, it's safe to to continue if the identifier is 0 here. 420 if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { 421 event.preventDefault(); 422 return false; 423 } 424 425 this.lastTouchIdentifier = touch.identifier; 426 427 // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: 428 // 1) the user does a fling scroll on the scrollable layer 429 // 2) the user stops the fling scroll with another tap 430 // then the event.target of the last 'touchend' event will be the element that was under the user's finger 431 // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check 432 // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). 433 this.updateScrollParent(targetElement); 434 } 435 } 436 437 this.trackingClick = true; 438 this.trackingClickStart = event.timeStamp; 439 this.targetElement = targetElement; 440 441 this.touchStartX = touch.pageX; 442 this.touchStartY = touch.pageY; 443 444 // Prevent phantom clicks on fast double-tap (issue #36) 445 if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { 446 event.preventDefault(); 447 } 448 449 return true; 450 }; 451 452 453 /** 454 * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. 455 * 456 * @param {Event} event 457 * @returns {boolean} 458 */ 459 FastClick.prototype.touchHasMoved = function(event) { 460 var touch = event.changedTouches[0], boundary = this.touchBoundary; 461 462 if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { 463 return true; 464 } 465 466 return false; 467 }; 468 469 470 /** 471 * Update the last position. 472 * 473 * @param {Event} event 474 * @returns {boolean} 475 */ 476 FastClick.prototype.onTouchMove = function(event) { 477 if (!this.trackingClick) { 478 return true; 479 } 480 481 // If the touch has moved, cancel the click tracking 482 if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { 483 this.trackingClick = false; 484 this.targetElement = null; 485 } 486 487 return true; 488 }; 489 490 491 /** 492 * Attempt to find the labelled control for the given label element. 493 * 494 * @param {EventTarget|HTMLLabelElement} labelElement 495 * @returns {Element|null} 496 */ 497 FastClick.prototype.findControl = function(labelElement) { 498 499 // Fast path for newer browsers supporting the HTML5 control attribute 500 if (labelElement.control !== undefined) { 501 return labelElement.control; 502 } 503 504 // All browsers under test that support touch events also support the HTML5 htmlFor attribute 505 if (labelElement.htmlFor) { 506 return document.getElementById(labelElement.htmlFor); 507 } 508 509 // If no for attribute exists, attempt to retrieve the first labellable descendant element 510 // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label 511 return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); 512 }; 513 514 515 /** 516 * On touch end, determine whether to send a click event at once. 517 * 518 * @param {Event} event 519 * @returns {boolean} 520 */ 521 FastClick.prototype.onTouchEnd = function(event) { 522 var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement; 523 524 if (!this.trackingClick) { 525 return true; 526 } 527 528 // Prevent phantom clicks on fast double-tap (issue #36) 529 if ((event.timeStamp - this.lastClickTime) < this.tapDelay) { 530 this.cancelNextClick = true; 531 return true; 532 } 533 534 if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) { 535 return true; 536 } 537 538 // Reset to prevent wrong click cancel on input (issue #156). 539 this.cancelNextClick = false; 540 541 this.lastClickTime = event.timeStamp; 542 543 trackingClickStart = this.trackingClickStart; 544 this.trackingClick = false; 545 this.trackingClickStart = 0; 546 547 // On some iOS devices, the targetElement supplied with the event is invalid if the layer 548 // is performing a transition or scroll, and has to be re-detected manually. Note that 549 // for this to function correctly, it must be called *after* the event target is checked! 550 // See issue #57; also filed as rdar://13048589 . 551 if (deviceIsIOSWithBadTarget) { 552 touch = event.changedTouches[0]; 553 554 // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null 555 targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; 556 targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; 557 } 558 559 targetTagName = targetElement.tagName.toLowerCase(); 560 if (targetTagName === 'label') { 561 forElement = this.findControl(targetElement); 562 if (forElement) { 563 this.focus(targetElement); 564 if (deviceIsAndroid) { 565 return false; 566 } 567 568 targetElement = forElement; 569 } 570 } else if (this.needsFocus(targetElement)) { 571 572 // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. 573 // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). 574 if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) { 575 this.targetElement = null; 576 return false; 577 } 578 579 this.focus(targetElement); 580 this.sendClick(targetElement, event); 581 582 // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. 583 // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) 584 if (!deviceIsIOS || targetTagName !== 'select') { 585 this.targetElement = null; 586 event.preventDefault(); 587 } 588 589 return false; 590 } 591 592 if (deviceIsIOS && !deviceIsIOS4) { 593 594 // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled 595 // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). 596 scrollParent = targetElement.fastClickScrollParent; 597 if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { 598 return true; 599 } 600 } 601 602 // Prevent the actual click from going though - unless the target node is marked as requiring 603 // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. 604 if (!this.needsClick(targetElement)) { 605 event.preventDefault(); 606 this.sendClick(targetElement, event); 607 } 608 609 return false; 610 }; 611 612 613 /** 614 * On touch cancel, stop tracking the click. 615 * 616 * @returns {void} 617 */ 618 FastClick.prototype.onTouchCancel = function() { 619 this.trackingClick = false; 620 this.targetElement = null; 621 }; 622 623 624 /** 625 * Determine mouse events which should be permitted. 626 * 627 * @param {Event} event 628 * @returns {boolean} 629 */ 630 FastClick.prototype.onMouse = function(event) { 631 632 // If a target element was never set (because a touch event was never fired) allow the event 633 if (!this.targetElement) { 634 return true; 635 } 636 637 if (event.forwardedTouchEvent) { 638 return true; 639 } 640 641 // Programmatically generated events targeting a specific element should be permitted 642 if (!event.cancelable) { 643 return true; 644 } 645 646 // Derive and check the target element to see whether the mouse event needs to be permitted; 647 // unless explicitly enabled, prevent non-touch click events from triggering actions, 648 // to prevent ghost/doubleclicks. 649 if (!this.needsClick(this.targetElement) || this.cancelNextClick) { 650 651 // Prevent any user-added listeners declared on FastClick element from being fired. 652 if (event.stopImmediatePropagation) { 653 event.stopImmediatePropagation(); 654 } else { 655 656 // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) 657 event.propagationStopped = true; 658 } 659 660 // Cancel the event 661 event.stopPropagation(); 662 event.preventDefault(); 663 664 return false; 665 } 666 667 // If the mouse event is permitted, return true for the action to go through. 668 return true; 669 }; 670 671 672 /** 673 * On actual clicks, determine whether this is a touch-generated click, a click action occurring 674 * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or 675 * an actual click which should be permitted. 676 * 677 * @param {Event} event 678 * @returns {boolean} 679 */ 680 FastClick.prototype.onClick = function(event) { 681 var permitted; 682 683 // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. 684 if (this.trackingClick) { 685 this.targetElement = null; 686 this.trackingClick = false; 687 return true; 688 } 689 690 // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. 691 if (event.target.type === 'submit' && event.detail === 0) { 692 return true; 693 } 694 695 permitted = this.onMouse(event); 696 697 // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. 698 if (!permitted) { 699 this.targetElement = null; 700 } 701 702 // If clicks are permitted, return true for the action to go through. 703 return permitted; 704 }; 705 706 707 /** 708 * Remove all FastClick's event listeners. 709 * 710 * @returns {void} 711 */ 712 FastClick.prototype.destroy = function() { 713 var layer = this.layer; 714 715 if (deviceIsAndroid) { 716 layer.removeEventListener('mouseover', this.onMouse, true); 717 layer.removeEventListener('mousedown', this.onMouse, true); 718 layer.removeEventListener('mouseup', this.onMouse, true); 719 } 720 721 layer.removeEventListener('click', this.onClick, true); 722 layer.removeEventListener('touchstart', this.onTouchStart, false); 723 layer.removeEventListener('touchmove', this.onTouchMove, false); 724 layer.removeEventListener('touchend', this.onTouchEnd, false); 725 layer.removeEventListener('touchcancel', this.onTouchCancel, false); 726 }; 727 728 729 /** 730 * Check whether FastClick is needed. 731 * 732 * @param {Element} layer The layer to listen on 733 */ 734 FastClick.notNeeded = function(layer) { 735 var metaViewport; 736 var chromeVersion; 737 var blackberryVersion; 738 var firefoxVersion; 739 740 // Devices that don't support touch don't need FastClick 741 if (typeof window.ontouchstart === 'undefined') { 742 return true; 743 } 744 745 // Chrome version - zero for other browsers 746 chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; 747 748 if (chromeVersion) { 749 750 if (deviceIsAndroid) { 751 metaViewport = document.querySelector('meta[name=viewport]'); 752 753 if (metaViewport) { 754 // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) 755 if (metaViewport.content.indexOf('user-scalable=no') !== -1) { 756 return true; 757 } 758 // Chrome 32 and above with width=device-width or less don't need FastClick 759 if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { 760 return true; 761 } 762 } 763 764 // Chrome desktop doesn't need FastClick (issue #15) 765 } else { 766 return true; 767 } 768 } 769 770 if (deviceIsBlackBerry10) { 771 blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); 772 773 // BlackBerry 10.3+ does not require Fastclick library. 774 // https://github.com/ftlabs/fastclick/issues/251 775 if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { 776 metaViewport = document.querySelector('meta[name=viewport]'); 777 778 if (metaViewport) { 779 // user-scalable=no eliminates click delay. 780 if (metaViewport.content.indexOf('user-scalable=no') !== -1) { 781 return true; 782 } 783 // width=device-width (or less than device-width) eliminates click delay. 784 if (document.documentElement.scrollWidth <= window.outerWidth) { 785 return true; 786 } 787 } 788 } 789 } 790 791 // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97) 792 if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') { 793 return true; 794 } 795 796 // Firefox version - zero for other browsers 797 firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1]; 798 799 if (firefoxVersion >= 27) { 800 // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896 801 802 metaViewport = document.querySelector('meta[name=viewport]'); 803 if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) { 804 return true; 805 } 806 } 807 808 // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version 809 // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx 810 if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') { 811 return true; 812 } 813 814 return false; 815 }; 816 817 818 /** 819 * Factory method for creating a FastClick object 820 * 821 * @param {Element} layer The layer to listen on 822 * @param {Object} [options={}] The options to override the defaults 823 */ 824 FastClick.attach = function(layer, options) { 825 return new FastClick(layer, options); 826 }; 827 828 829 if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { 830 831 // AMD. Register as an anonymous module. 832 define(function() { 833 return FastClick; 834 }); 835 } else if (typeof module !== 'undefined' && module.exports) { 836 module.exports = FastClick.attach; 837 module.exports.FastClick = FastClick; 838 } else { 839 window.FastClick = FastClick; 840 } 841}());
842 843/*! 844 * headroom.js v0.9.3 - Give your page some headroom. Hide your header until you need it 845 * Copyright (c) 2016 Nick Williams - http://wicky.nillia.ms/headroom.js 846 * License: MIT 847 */ 848 849!function(a,b){"use strict";"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Headroom=b()}(this,function(){"use strict";function a(a){this.callback=a,this.ticking=!1}function b(a){return a&&"undefined"!=typeof window&&(a===window||a.nodeType)}function c(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var d,e,f=a||{};for(e=1;e<arguments.length;e++){var g=arguments[e]||{};for(d in g)"object"!=typeof f[d]||b(f[d])?f[d]=f[d]||g[d]:f[d]=c(f[d],g[d])}return f}function d(a){return a===Object(a)?a:{down:a,up:a}}function e(a,b){b=c(b,e.options),this.lastKnownScrollY=0,this.elem=a,this.tolerance=d(b.tolerance),this.classes=b.classes,this.offset=b.offset,this.scroller=b.scroller,this.initialised=!1,this.onPin=b.onPin,this.onUnpin=b.onUnpin,this.onTop=b.onTop,this.onNotTop=b.onNotTop,this.onBottom=b.onBottom,this.onNotBottom=b.onNotBottom}var f={bind:!!function(){}.bind,classList:"classList"in document.documentElement,rAF:!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)};return window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,a.prototype={constructor:a,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}},e.prototype={constructor:e,init:function(){return e.cutsTheMustard?(this.debouncer=new a(this.update.bind(this)),this.elem.classList.add(this.classes.initial),setTimeout(this.attachEvent.bind(this),100),this):void 0},destroy:function(){var a=this.classes;this.initialised=!1,this.elem.classList.remove(a.unpinned,a.pinned,a.top,a.notTop,a.initial),this.scroller.removeEventListener("scroll",this.debouncer,!1)},attachEvent:function(){this.initialised||(this.lastKnownScrollY=this.getScrollY(),this.initialised=!0,this.scroller.addEventListener("scroll",this.debouncer,!1),this.debouncer.handleEvent())},unpin:function(){var a=this.elem.classList,b=this.classes;!a.contains(b.pinned)&&a.contains(b.unpinned)||(a.add(b.unpinned),a.remove(b.pinned),this.onUnpin&&this.onUnpin.call(this))},pin:function(){var a=this.elem.classList,b=this.classes;a.contains(b.unpinned)&&(a.remove(b.unpinned),a.add(b.pinned),this.onPin&&this.onPin.call(this))},top:function(){var a=this.elem.classList,b=this.classes;a.contains(b.top)||(a.add(b.top),a.remove(b.notTop),this.onTop&&this.onTop.call(this))},notTop:function(){var a=this.elem.classList,b=this.classes;a.contains(b.notTop)||(a.add(b.notTop),a.remove(b.top),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){var a=this.elem.classList,b=this.classes;a.contains(b.bottom)||(a.add(b.bottom),a.remove(b.notBottom),this.onBottom&&this.onBottom.call(this))},notBottom:function(){var a=this.elem.classList,b=this.classes;a.contains(b.notBottom)||(a.add(b.notBottom),a.remove(b.bottom),this.onNotBottom&&this.onNotBottom.call(this))},getScrollY:function(){return void 0!==this.scroller.pageYOffset?this.scroller.pageYOffset:void 0!==this.scroller.scrollTop?this.scroller.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop},getViewportHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},getElementPhysicalHeight:function(a){return Math.max(a.offsetHeight,a.clientHeight)},getScrollerPhysicalHeight:function(){return this.scroller===window||this.scroller===document.body?this.getViewportHeight():this.getElementPhysicalHeight(this.scroller)},getDocumentHeight:function(){var a=document.body,b=document.documentElement;return Math.max(a.scrollHeight,b.scrollHeight,a.offsetHeight,b.offsetHeight,a.clientHeight,b.clientHeight)},getElementHeight:function(a){return Math.max(a.scrollHeight,a.offsetHeight,a.clientHeight)},getScrollerHeight:function(){return this.scroller===window||this.scroller===document.body?this.getDocumentHeight():this.getElementHeight(this.scroller)},isOutOfBounds:function(a){var b=0>a,c=a+this.getScrollerPhysicalHeight()>this.getScrollerHeight();return b||c},toleranceExceeded:function(a,b){return Math.abs(a-this.lastKnownScrollY)>=this.tolerance[b]},shouldUnpin:function(a,b){var c=a>this.lastKnownScrollY,d=a>=this.offset;return c&&d&&b},shouldPin:function(a,b){var c=a<this.lastKnownScrollY,d=a<=this.offset;return c&&b||d},update:function(){var a=this.getScrollY(),b=a>this.lastKnownScrollY?"down":"up",c=this.toleranceExceeded(a,b);
849this.isOutOfBounds(a)||(a<=this.offset?this.top():this.notTop(),a+this.getViewportHeight()>=this.getScrollerHeight()?this.bottom():this.notBottom(),this.shouldUnpin(a,c)?this.unpin():this.shouldPin(a,c)&&this.pin(),this.lastKnownScrollY=a)}},e.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},e.cutsTheMustard="undefined"!=typeof f&&f.rAF&&f.bind&&f.classList,e}); 850(function($) { 851 852 if(!$) { 853 return; 854 } 855 856 //////////// 857 // Plugin // 858 //////////// 859 860 $.fn.headroom = function(option) { 861 return this.each(function() { 862 var $this = $(this), 863 data = $this.data('headroom'), 864 options = typeof option === 'object' && option; 865 866 options = $.extend(true, {}, Headroom.options, options); 867 868 if (!data) { 869 data = new Headroom(this, options); 870 data.init(); 871 $this.data('headroom', data); 872 } 873 if (typeof option === 'string') { 874 data[option](); 875 876 if(option === 'destroy'){ 877 $this.removeData('headroom'); 878 } 879 } 880 }); 881 }; 882 883 ////////////// 884 // Data API // 885 ////////////// 886 887 $('[data-headroom]').each(function() { 888 var $this = $(this); 889 $this.headroom($this.data()); 890 }); 891 892}(window.Zepto || window.jQuery)); 893/** 894 * bxSlider v4.2.12 895 * Copyright 2013-2015 Steven Wanderski 896 * Written while drinking Belgian ales and listening to jazz 897 * Licensed under MIT (http://opensource.org/licenses/MIT) 898 */ 899!function(t){var e={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0}};t.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var s={},o=this,r=t(window).width(),a=t(window).height();if(!t(o).data("bxSlider")){var l=function(){t(o).data("bxSlider")||(s.settings=t.extend({}
vendor: 11,024 bytes, line 899
899,e,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"===s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!==s.settings.mode&&function(){for(var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<e.length;i++)if(void 0!==t.style[e[i]])return s.cssPrefix=e[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"===s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(s.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),d())},d=function(){var e=s.children.eq(s.settings.startSlide);o.wrap('<div class="'+s.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),s.viewport=o.parent(),s.settings.ariaLive&&!s.settings.ticker&&s.viewport.attr("aria-live","polite"),s.loader=t('<div class="bx-loading" />'),s.viewport.prepend(s.loader),o.css({width:"horizontal"===s.settings.mode?1e3*s.children.length+215+"%":"auto",position:"relative"}),s.usingCSS&&s.settings.easing?o.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing"),s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:u()}),s.children.css({float:"horizontal"===s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"===s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=t('<div class="bx-controls" />'),s.settings.captions&&P(),s.active.last=s.settings.startSlide===f()-1,s.settings.video&&o.fitVids(),("all"===s.settings.preloadImages||s.settings.ticker)&&(e=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),s.settings.pager&&w(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),c(e,g)},c=function(e,i){var n=e.find('img:not([src=""]), iframe').length,s=0;return 0===n?void i():void e.find('img:not([src=""]), iframe').each(function(){t(this).one("load error",function(){++s===n&&i()}).each(function(){this.complete&&t(this).trigger("load")})})},g=function(){if(s.settings.infiniteLoop&&"fade"!==s.settings.mode&&!s.settings.ticker){var e="vertical"===s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,e).clone(!0).addClass("bx-clone"),n=s.children.slice(-e).clone(!0).addClass("bx-clone");s.settings.ariaHidden&&(i.attr("aria-hidden",!0),n.attr("aria-hidden",!0)),o.append(i).prepend(n)}s.loader.remove(),m(),"vertical"===s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(p()),o.redrawSlider(),s.settings.onSliderLoad.call(o,s.active.index),s.initialized=!0,s.settings.responsive&&t(window).bind("resize",Z),s.settings.auto&&s.settings.autoStart&&(f()>1||s.settings.autoSlideForOnePage)&&H(),s.settings.ticker&&W(),s.settings.pager&&I(s.settings.startSlide),s.settings.controls&&D(),s.settings.touchEnabled&&!s.settings.ticker&&N(),s.settings.keyboardEnabled&&!s.settings.ticker&&t(document).keydown(F)},p=function(){var e=0,n=t();if("vertical"===s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1===s.settings.moveSlides?s.active.index:s.active.index*x();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=o+i>=s.children.length?n.add(s.children.eq(i-1)):n.add(s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"===s.settings.mode?(n.each(function(i){e+=t(this).outerHeight()}),s.settings.slideMargin>0&&(e+=s.settings.slideMargin*(s.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),"border-box"===s.viewport.css("box-sizing")?e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))+parseFloat(s.viewport.css("border-top-width"))+parseFloat(s.viewport.css("border-bottom-width")):"padding-box"===s.viewport.css("box-sizing")&&(e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))),e},u=function(){var t="100%";return s.settings.slideWidth>0&&(t="horizontal"===s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),t},h=function(){var t=s.settings.slideWidth,e=s.viewport.width();if(0===s.settings.slideWidth||s.settings.slideWidth>e&&!s.carousel||"vertical"===s.settings.mode)t=e;else if(s.settings.maxSlides>1&&"horizontal"===s.settings.mode){if(e>s.maxThreshold)return t;e<s.minThreshold?t=(e-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides:s.settings.shrinkItems&&(t=Math.floor((e+s.settings.slideMargin)/Math.ceil((e+s.settings.slideMargin)/(t+s.settings.slideMargin))-s.settings.slideMargin))}return t},v=function(){var t=1,e=null;return"horizontal"===s.settings.mode&&s.settings.slideWidth>0?s.viewport.width()<s.minThreshold?t=s.settings.minSlides:s.viewport.width()>s.maxThreshold?t=s.settings.maxSlides:(e=s.children.first().width()+s.settings.slideMargin,t=Math.floor((s.viewport.width()+s.settings.slideMargin)/e)):"vertical"===s.settings.mode&&(t=s.settings.minSlides),t},f=function(){var t=0,e=0,i=0;if(s.settings.moveSlides>0)if(s.settings.infiniteLoop)t=Math.ceil(s.children.length/x());else for(;e<s.children.length;)++t,e=i+v(),i+=s.settings.moveSlides<=v()?s.settings.moveSlides:v();else t=Math.ceil(s.children.length/v());return t},x=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=v()?s.settings.moveSlides:v()},m=function(){var t,e,i;s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop?"horizontal"===s.settings.mode?(e=s.children.last(),t=e.position(),S(-(t.left-(s.viewport.width()-e.outerWidth())),"reset",0)):"vertical"===s.settings.mode&&(i=s.children.length-s.settings.minSlides,t=s.children.eq(i).position(),S(-t.top,"reset",0)):(t=s.children.eq(s.active.index*x()).position(),s.active.index===f()-1&&(s.active.last=!0),void 0!==t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0)))},S=function(e,i,n,r){var a,l;s.usingCSS?(l="vertical"===s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)",o.css("-"+s.cssPrefix+"-transition-duration",n/1e3+"s"),"slide"===i?(o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),q())}):q()):"reset"===i?o.css(s.animProp,l):"ticker"===i&&(o.css("-"+s.cssPrefix+"-transition-timing-function","linear"),o.css(s.animProp,l),0!==n?o.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(r.resetValue,"reset",0),L())}):(S(r.resetValue,"reset",0),L()))):(a={},a[s.animProp]=e,"slide"===i?o.animate(a,n,s.settings.easing,function(){q()}):"reset"===i?o.css(s.animProp,e):"ticker"===i&&o.animate(a,n,"linear",function(){S(r.resetValue,"reset",0),L()}))},b=function(){for(var e="",i="",n=f(),o=0;o<n;o++)i="",s.settings.buildPager&&t.isFunction(s.settings.buildPager)||s.settings.pagerCustom?(i=s.settings.buildPager(o),s.pagerEl.addClass("bx-custom-pager")):(i=o+1,s.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+o+'" class="bx-pager-link">'+i+"</a></div>";s.pagerEl.html(e)},w=function(){s.settings.pagerCustom?s.pagerEl=t(s.settings.pagerCustom):(s.pagerEl=t('<div class="bx-pager" />'),s.settings.pagerSelector?t(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),b()),s.pagerEl.on("click touchend","a",z)},C=function(){s.controls.next=t('<a class="bx-next" href="">'+s.settings.nextText+"</a>"),s.controls.prev=t('<a class="bx-prev" href="">'+s.settings.prevText+"</a>"),s.controls.next.bind("click touchend",E),s.controls.prev.bind("click touchend",k),s.settings.nextSelector&&t(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&t(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=t('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=t('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",M),s.controls.autoEl.on("click",".bx-stop",y),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?t(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),A(s.settings.autoStart?"stop":"start")},P=function(){s.children.each(function(e){var i=t(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&t(this).append('<div class="bx-caption"><span>'+i+"</span></div>")})},E=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToNextSlide())},k=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToPrevSlide())},M=function(t){o.startAuto(),t.preventDefault()},y=function(t){o.stopAuto(),t.preventDefault()},z=function(e){var i,n;e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),i=t(e.currentTarget),void 0!==i.attr("data-sli
899de-index")&&(n=parseInt(i.attr("data-slide-index")),n!==s.active.index&&o.goToSlide(n)))},I=function(e){var i=s.children.length;return"short"===s.settings.pagerType?(s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(e+1+s.settings.pagerShortSeparator+i)):(s.pagerEl.find("a").removeClass("active"),void s.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")}))},q=function(){if(s.settings.infiniteLoop){var t="";0===s.active.index?t=s.children.eq(0).position():s.active.index===f()-1&&s.carousel?t=s.children.eq((f()-1)*x()).position():s.active.index===s.children.length-1&&(t=s.children.eq(s.children.length-1).position()),t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0))}s.working=!1,s.settings.onSlideAfter.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)},A=function(t){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[t]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))}
vendor: 9,627 bytes, line 899
899,D=function(){1===f()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0===s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index===f()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},H=function(){if(s.settings.autoDelay>0){setTimeout(o.startAuto,s.settings.autoDelay)}else o.startAuto(),t(window).focus(function(){o.startAuto()}).blur(function(){o.stopAuto()});s.settings.autoHover&&o.hover(function(){s.interval&&(o.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(o.startAuto(!0),s.autoPaused=null)})},W=function(){var e,i,n,r,a,l,d,c,g=0;"next"===s.settings.autoDirection?o.append(s.children.clone().addClass("bx-clone")):(o.prepend(s.children.clone().addClass("bx-clone")),e=s.children.first().position(),g="horizontal"===s.settings.mode?-e.left:-e.top),S(g,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover&&(s.usingCSS?(r="horizontal"===s.settings.mode?4:5,s.viewport.hover(function(){i=o.css("-"+s.cssPrefix+"-transform"),n=parseFloat(i.split(",")[r]),S(n,"reset",0)},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(n))),L(d)})):s.viewport.hover(function(){o.stop()},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(o.css(l)))),L(d)})),L()},L=function(t){var e,i,n,r=t?t:s.settings.speed,a={left:0,top:0},l={left:0,top:0};"next"===s.settings.autoDirection?a=o.find(".bx-clone").first().position():l=s.children.first().position(),e="horizontal"===s.settings.mode?-a.left:-a.top,i="horizontal"===s.settings.mode?-l.left:-l.top,n={resetValue:i},S(e,"ticker",r,n)},O=function(e){var i=t(window),n={top:i.scrollTop(),left:i.scrollLeft()},s=e.offset();return n.right=n.left+i.width(),n.bottom=n.top+i.height(),s.right=s.left+e.outerWidth(),s.bottom=s.top+e.outerHeight(),!(n.right<s.left||n.left>s.right||n.bottom<s.top||n.top>s.bottom)},F=function(t){var e=document.activeElement.tagName.toLowerCase(),i="input|textarea",n=new RegExp(e,["i"]),s=n.exec(i);if(null==s&&O(o)){if(39===t.keyCode)return E(t),!1;if(37===t.keyCode)return k(t),!1}},N=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.bind("touchstart MSPointerDown pointerdown",X),s.viewport.on("click",".bxslider a",function(t){s.viewport.hasClass("click-disabled")&&(t.preventDefault(),s.viewport.removeClass("click-disabled"))})},X=function(t){if(s.controls.el.addClass("disabled"),s.working)t.preventDefault(),s.controls.el.removeClass("disabled");else{s.touch.originalPos=o.position();var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e];s.touch.start.x=i[0].pageX,s.touch.start.y=i[0].pageY,s.viewport.get(0).setPointerCapture&&(s.pointerId=e.pointerId,s.viewport.get(0).setPointerCapture(s.pointerId)),s.viewport.bind("touchmove MSPointerMove pointermove",V),s.viewport.bind("touchend MSPointerUp pointerup",R),s.viewport.bind("MSPointerCancel pointercancel",Y)}},Y=function(t){S(s.touch.originalPos.left,"reset",0),s.controls.el.removeClass("disabled"),s.viewport.unbind("MSPointerCancel pointercancel",Y),s.viewport.unbind("touchmove MSPointerMove pointermove",V),s.viewport.unbind("touchend MSPointerUp pointerup",R),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},V=function(t){var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=Math.abs(i[0].pageX-s.touch.start.x),o=Math.abs(i[0].pageY-s.touch.start.y),r=0,a=0;3*n>o&&s.settings.preventDefaultSwipeX?t.preventDefault():3*o>n&&s.settings.preventDefaultSwipeY&&t.preventDefault(),"fade"!==s.settings.mode&&s.settings.oneToOneTouch&&("horizontal"===s.settings.mode?(a=i[0].pageX-s.touch.start.x,r=s.touch.originalPos.left+a):(a=i[0].pageY-s.touch.start.y,r=s.touch.originalPos.top+a),S(r,"reset",0))},R=function(t){s.viewport.unbind("touchmove MSPointerMove pointermove",V),s.controls.el.removeClass("disabled");var e=t.originalEvent,i="undefined"!=typeof e.changedTouches?e.changedTouches:[e],n=0,r=0;s.touch.end.x=i[0].pageX,s.touch.end.y=i[0].pageY,"fade"===s.settings.mode?(r=Math.abs(s.touch.start.x-s.touch.end.x),r>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto())):("horizontal"===s.settings.mode?(r=s.touch.end.x-s.touch.start.x,n=s.touch.originalPos.left):(r=s.touch.end.y-s.touch.start.y,n=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0===s.active.index&&r>0||s.active.last&&r<0)?S(n,"reset",200):Math.abs(r)>=s.settings.swipeThreshold?(r<0?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):S(n,"reset",200)),s.viewport.unbind("touchend MSPointerUp pointerup",R),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},Z=function(e){if(s.initialized)if(s.working)window.setTimeout(Z,10);else{var i=t(window).width(),n=t(window).height();r===i&&a===n||(r=i,a=n,o.redrawSlider(),s.settings.onSliderResize.call(o,s.active.index))}},B=function(t){var e=v();s.settings.ariaHidden&&!s.settings.ticker&&(s.children.attr("aria-hidden","true"),s.children.slice(t,t+e).attr("aria-hidden","false"))},U=function(t){return t<0?s.settings.infiniteLoop?f()-1:s.active.index:t>=f()?s.settings.infiniteLoop?0:s.active.index:t};return o.goToSlide=function(e,i){var n,r,a,l,d=!0,c=0,g={left:0,top:0},u=null;if(s.oldIndex=s.active.index,s.active.index=U(e),!s.working&&s.active.index!==s.oldIndex){if(s.working=!0,d=s.settings.onSlideBefore.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index),"undefined"!=typeof d&&!d)return s.active.index=s.oldIndex,void(s.working=!1);"next"===i?s.settings.onSlideNext.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1):"prev"===i&&(s.settings.onSlidePrev.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1)),s.active.last=s.active.index>=f()-1,(s.settings.pager||s.settings.pagerCustom)&&I(s.active.index),s.settings.controls&&D(),"fade"===s.settings.mode?(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){t(this).css("zIndex",s.settings.slideZIndex),q()})):(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),!s.settings.infiniteLoop&&s.carousel&&s.active.last?"horizontal"===s.settings.mode?(u=s.children.eq(s.children.length-1),g=u.position(),c=s.viewport.width()-u.outerWidth()):(n=s.children.length-s.settings.minSlides,g=s.children.eq(n).position()):s.carousel&&s.active.last&&"prev"===i?(r=1===s.settings.moveSlides?s.settings.maxSlides-x():(f()-1)*x()-(s.children.length-s.settings.maxSlides),u=o.children(".bx-clone").eq(r),g=u.position()):"next"===i&&0===s.active.index?(g=o.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1):e>=0&&(l=e*parseInt(x()),g=s.children.eq(l).position()),"undefined"!=typeof g?(a="horizontal"===s.settings.mode?-(g.left-c):-g.top,S(a,"slide",s.settings.speed)):s.working=!1),s.settings.ariaHidden&&B(s.active.index*x())}},o.goToNextSlide=function(){if(s.settings.infiniteLoop||!s.active.last){var t=parseInt(s.active.index)+1;o.goToSlide(t,"next")}},o.goToPrevSlide=function(){if(s.settings.infiniteLoop||0!==s.active.index){var t=parseInt(s.active.index)-1;o.goToSlide(t,"prev")}},o.startAuto=function(t){s.interval||(s.interval=setInterval(function(){"next"===s.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},s.settings.pause),s.settings.autoControls&&t!==!0&&A("stop"))},o.stopAuto=function(t){s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.autoControls&&t!==!0&&A("start"))},o.getCurrentSlide=function(){return s.active.index},o.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},o.getSlideElement=function(t){return s.children.eq(t)},o.getSlideCount=function(){return s.children.length},o.isWorking=function(){return s.working},o.redrawSlider=function(){s.children.add(o.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",p()),s.settings.ticker||m(),s.active.last&&(s.active.index=f()-1),s.active.index>=f()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(b(),I(s.active.index)),s.settings.ariaHidden&&B(s.active.index*x())},o.destroySlider=function(){s.initialized&&(s.initialized=!1,t(".bx-clone",this).remove(),s.children.each(function(){void 0!==t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!==t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&!s.settings.pagerCustom&&s.pagerEl.remove(),t(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&t(window).unbind("resize",Z),s.settings.keyboardEnabled&&t(document).unbind("
899keydown",F),t(this).removeData("bxSlider"))},o.reloadSlider=function(e){void 0!==e&&(n=e),o.destroySlider(),l(),t(o).data("bxSlider",this)},l(),t(o).data("bxSlider",this),this}}}(jQuery); 900/*! 901 * Kwicks: Sexy Sliding Panels for jQuery - v2.2.1 902 * http://devsmash.com/projects/kwicks 903 * 904 * Copyright 2013 Jeremy Martin (jmar777) 905 * Contributors: Duke Speer (Duke3D), Guillermo Guerrero (gguerrero) 906 * Released under the MIT license 907 * http://www.opensource.org/licenses/mit-license.php 908 */ 909!function(a){var b={init:function(b){var d={maxSize:-1,minSize:-1,spacing:5,duration:500,isVertical:!1,easing:void 0,autoResize:!0,behavior:null,delayMouseIn:0,delayMouseOut:0,selectOnClick:!0,deselectOnClick:!1,interval:2500,interactive:!0},e=a.extend(d,b);if(-1!==e.minSize&&-1!==e.maxSize)throw new Error("Kwicks options minSize and maxSize may not both be set");if(e.behavior&&"menu"!==e.behavior&&"slideshow"!==e.behavior)throw new Error("Unrecognized Kwicks behavior specified: "+e.behavior);return a.each(["minSize","maxSize","spacing"],function(a,b){var c=e[b];switch(typeof c){case"number":e[b+"Units"]="px";break;case"string":if("%"===c.slice(-1))e[b+"Units"]="%",e[b]=+c.slice(0,-1)/100;else{if("px"!==c.slice(-2))throw new Error("Invalid value for Kwicks option "+b+": "+c);e[b+"Units"]="px",e[b]=+c.slice(0,-2)}break;default:throw new Error("Invalid value for Kwicks option "+b+": "+c)}}),this.each(function(){a(this).data("kwicks",new c(this,e))})},expand:function(b,c){"object"==typeof b&&(c=b,b=void 0);var d=c&&c.delay||0;return this.each(function(){var c=a(this),e=c.data("kwicks");if(e)b="number"==typeof b?b:-1;else{if(!(e=c.parent().data("kwicks")))return;b=c.index()}var f=function(){if(b!==e.expandedIndex){var a=e.$panels,c=a[b]||null;e.$container.trigger("expand.kwicks",{index:b,expanded:c,collapsed:a.not(c).get(),oldIndex:e.expandedIndex,oldExpanded:e.getExpandedPanel(),isAnimated:e.isAnimated})}},g=e.$container.data("kwicks-timeout-id");g&&(e.$container.removeData("kwicks-timeout-id"),clearTimeout(g)),d>0?e.$container.data("kwicks-timeout-id",setTimeout(f,d)):f()})},expanded:function(){var a=this.first().data("kwicks");if(a)return a.expandedIndex},select:function(b){return this.each(function(){var c=a(this),d=c.data("kwicks");if(d)b="number"==typeof b?b:-1;else{if(!(d=c.parent().data("kwicks")))return;b=c.index()}if(b!==d.selectedIndex){var e=d.$panels,f=e[b]||null;d.$container.trigger("select.kwicks",{index:b,selected:f,unselected:e.not(f).get(),oldIndex:d.selectedIndex,oldSelected:d.getSelectedPanel()})}d.$container.kwicks("expand",b)})},selected:function(){var a=this.first().data("kwicks");if(a)return a.selectedIndex},resize:function(){return this.each(function(){var b=a(this),c=b.data("kwicks");c&&c.resize()})},destroy:function(){return this.each(function(){var b=a(this),c=b.data("kwicks");c&&c.destroy()})}};a.fn.kwicks=function(a){if(b[a])return b[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!=typeof a&&a)throw new Error("Unrecognized kwicks method: "+a);return b.init.apply(this,arguments)},a.event.special.expand={_default:function(b,c){if("kwicks"===b.namespace){var d=a(b.target).data("kwicks");d&&d.expand(c.index)}}},a.event.special.select={_default:function(b,c){if("kwicks"===b.namespace){var d=a(b.target).data("kwicks");d&&d.select(c.index)}}};var c=function(b,c){var d=this;this.opts=c,this.onDestroyHandlers=[];var e=c.isVertical?"vertical":"horizontal";this.$container=a(b),this.$panels=this.$container.children();var f=["kwicks","kwicks-"+e];a.each(f,function(a){d.$container.hasClass(a)||(d.$container.addClass(a),d.onDestroy(function(){d.$container.removeClass(a)}))}),this.selectedIndex=this.$panels.filter(".kwicks-selected").index(),this.expandedIndex=this.selectedIndex,this.primaryDimension=c.isVertical?"height":"width",this.secondaryDimension=c.isVertical?"width":"height",this.calculatePanelSizes(),this.primaryAlignment=c.isVertical?"top":"left",this.secondaryAlignment=c.isVertical?"bottom":"right",this.$timer=a({progress:0}),this.isAnimated=!1,this.offsets=this.getOffsetsForExpanded(),this.updatePanelStyles(),this.initBehavior(),this.initWindowResizeHandler(),setTimeout(function(){d.updatePanelStyles()},100)};c.prototype.calculatePanelSizes=function(){var a=this.opts,b=this.getContainerSize(!0);this.panelSpacing="%"===a.spacingUnits?b*a.spacing:a.spacing;var c=this.$panels.length,d=this.panelSpacing*(c-1),e=b-d;this.panelSize=e/c,-1===a.minSize?(this.panelMaxSize=-1===a.maxSize?5>c?2*(b/3):b/3:"%"===a.maxSizeUnits?e*a.maxSize:a.maxSize,this.panelMinSize=(e-this.panelMaxSize)/(c-1)):-1===a.maxSize&&(this.panelMinSize="%"===a.minSizeUnits?e*a.minSize:a.minSize,this.panelMaxSize=e-this.panelMinSize*(c-1))},c.prototype.getOffsetsForExpanded=function(){for(var a=this.expandedIndex,b=this.$panels.length,c=this.panelSpacing,d=this.panelSize,e=this.panelMinSize,f=this.panelMaxSize,g=[0],h=1;b>h;h++)g[h]=-1===a?h*(d+c):a>=h?h*(e+c):f+e*(h-1)+h*c;return g},c.prototype.setStyle=function(){return a.support.style?function(a,b){a.setAttribute("style",b)}:function(a,b){a.style.cssText=b}}(),c.prototype.updatePanelStyles=function(){for(var a,b,c,d,e=this.offsets,f=this.$panels,g=this.primaryDimension,h=this.primaryAlignment,i=this.secondaryAlignment,j=this.panelSpacing,k=this.getContainerSize(),l=this._stylesInited?"":"position:absolute;",m=f.length;m--;)c=a,a=Math.round(e[m]),m===f.length-1?(b=k-a,d=i+":0;"+g+":"+b+"px;"):(b=c-a-j,d=h+":"+a+"px;"+g+":"+b+"px;"),this.setStyle(f[m],l+d);this._stylesInited||(this.$container.addClass("kwicks-processed"),this._stylesInited=!0)},c.prototype.initBehavior=function(){if(this.opts.behavior)switch(this.opts.behavior){case"menu":this.initMenuBehavior();break;case"slideshow":this.initSlideshowBehavior();break;default:throw new Error("Unrecognized behavior option: "+this.opts.behavior)}},c.prototype.initMenuBehavior=function(){var b=this,c=b.opts;this.addEventHandler(this.$container,"mouseleave",function(){b.$container.kwicks("expand",-1,{delay:c.delayMouseOut})}),this.addEventHandler(this.$panels,"mouseenter",function(){a(this).kwicks("expand",{delay:c.delayMouseIn})}),(c.selectOnClick||c.deselectOnClick)&&this.addEventHandler(this.$panels,"click",function(){var b=a(this),d=b.hasClass("kwicks-selected");d&&c.deselectOnClick?b.parent().kwicks("select",-1):!d&&c.selectOnClick&&b.kwicks("select")})},c.prototype.initSlideshowBehavior=function(){var b,c=this,d=this.$panels.length,e=0,f=!1,g=function(){f||(b=setInterval(function(){c.$container.kwicks("expand",++e%d)},c.opts.interval),f=!0)},h=function(){clearInterval(b),f=!1};g(),this.onDestroy(h),this.opts.interactive&&(this.addEventHandler(this.$container,"mouseenter",h),this.addEventHandler(this.$container,"mouseleave",g),this.addEventHandler(this.$panels,"mouseenter",function(){e=a(this).kwicks("expand").index()}))},c.prototype.initWindowResizeHandler=function(){if(this.opts.autoResize){var b=this,c=0,d=!1,e=a(window),f=function(a){a||(d=!1);var e=+new Date;if(20>e-c){if(d)return;return setTimeout(f,20-(e-c)),d=!0,void 0}c=e,b.resize()};this.addEventHandler(e,"resize",f)}},c.prototype.getContainerSize=function(a){var b=this._containerSize;return(a||!b)&&(b=this._containerSize=this.$container[this.primaryDimension]()),b},c.prototype.getExpandedPanel=function(){return this.$panels[this.expandedIndex]||null},c.prototype.getCollapsedPanels=function(){return-1===this.expandedIndex?[]:this.$panels.not(this.getExpandedPanel()).get()},c.prototype.getSelectedPanel=function(){return this.$panels[this.selectedIndex]||null},c.prototype.getUnselectedPanels=function(){return this.$panels.not(this.getSelectedPanel()).get()},c.prototype.onDestroy=function(a){this.onDestroyHandlers.push(a)},c.prototype.addEventHandler=function(a,b,c){a.on(b,c),this.onDestroy(function(){a.off(b,c)})},c.prototype.destroy=function(){this.$timer.stop();for(var a=0,b=this.onDestroyHandlers.length;b>a;a++)this.onDestroyHandlers[a]();this.$panels.attr("style","").removeClass("kwicks-expanded kwicks-selected kwicks-collapsed"),this.$container.removeClass("kwicks-processed").removeData("kwicks")},c.prototype.resize=function(){this.getContainerSize()!==this.getContainerSize(!0)&&(this.calculatePanelSizes(),this.offsets=this.getOffsetsForExpanded(),this.isAnimated?this._dirtyOffsets=!0:this.updatePanelStyles())},c.prototype.select=function(b){b!==this.selectedIndex&&(a(this.getSelectedPanel()).removeClass("kwicks-selected"),this.selectedIndex=b,a(this.getSelectedPanel()).addClass("kwicks-selected"))},c.prototype.expand=function(b){var c=this,d=this.expandedIndex,e=this.getExpandedPanel();if(-1===b&&(b=this.selectedIndex),b!==this.expandedIndex){a(this.getExpandedPanel()).removeClass("kwicks-expanded"),a(this.getCollapsedPanels()).removeClass("kwicks-collapsed"),this.expandedIndex=b,a(this.getExpandedPanel()).addClass("kwicks-expanded"),a(this.getCollapsedPanels()).addClass("kwicks-collapsed");var f=this.$timer,g=this.$panels.length,h=this.offsets.slice(),i=this.offsets,j=this.getOffsetsForExpanded();f.stop()[0].progress=0,this.isAnimated=!0,f.animate({progress:1},{duration:this.opts.duration,easing:this.opts.easing,step:function(a){c._dirtyOffsets&&(i=c.offsets,j=c.getOffsetsForExpanded(),c._dirtyOffsets=!1),i.length=0;for(var b=0;g>b;b++){var d=j[b],e=d-(d-h[b])*(1-a);i[b]=e}c.updatePanelStyles()},complete:function(){c.isAnimated=!1,c.$container.trigger("expand-complete.kwicks",{index:b,expanded:c.getExpandedPanel(),collapsed:c.getCollapsedPanels(),oldIndex:d,oldExpanded:e,isAnimated:!1})}})}}}(jQuery); 910/*! 911 * SlickNav Responsive Mobile Menu v1.0.6 912 * (c) 2015 Josh Cope 913 * licensed under MIT 914 */ 915!function(e,n,t){function a(n,t){this.element=n,this.settings=e.extend({},i,t),this._defaults=i,this._name=s,this.init()}var i={label:"MENU",duplicate:!0,duration:200,easingOpen:"swing",easingClose:"swing",closedSymbol:"►",openedSymbol:"▼",prependTo:"body",appendTo:"",parentTag:"a",closeOnClick:!1,allowParentLinks:!1,nestedParentLinks:!0,showChildren:!1,removeIds:!1,removeClasses:!1,removeStyles:!1,brand:"",init:function(){},beforeOpen:function(){},beforeClose:function(){},afterOpen:function(){},afterClose:function(){}},s="slicknav",l="slicknav";a.prototype.init=function(){var t,a,i=this,s=e(this.element),o=this.settings;if(o.duplicate?(i.mobileNav=s.clone(),i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("id")})):(i.mobileNav=s,i.mobileNav.removeAttr("id"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("id")})),o.removeClasses&&(i.mobileNav.removeAttr("class"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("class")})),o.removeStyles&&(i.mobileNav.removeAttr("style"),i.mobileNav.find("*").each(function(n,t){e(t).removeAttr("style")})),t=l+"_icon",""===o.label&&(t+=" "+l+"_no-text"),"a"==o.parentTag&&(o.parentTag='a href="#"'),i.mobileNav.attr("class",l+"_nav"),a=e('<div class="'+l+'_menu"></div>'),""!==o.brand){var r=e('<div class="'+l+'_brand">
915'+o.brand+"</div>");e(a).append(r)}i.btn=e(["<"+o.parentTag+' aria-haspopup="true" tabindex="0" class="'+l+"_btn "+l+'_collapsed">','<span class="'+l+'_menutxt">'+o.label+"</span>",'<span class="'+t+'">','<span class="'+l+'_icon-bar"></span>','<span class="'+l+'_icon-bar"></span>','<span class="'+l+'_icon-bar"></span>',"</span>","</"+o.parentTag+">"].join("")),e(a).append(i.btn),""!==o.appendTo?e(o.appendTo).append(a):e(o.prependTo).prepend(a),a.append(i.mobileNav);var d=i.mobileNav.find("li");e(d).each(function(){var n=e(this),t={};if(t.children=n.children("ul").attr("role","menu"),n.data("menu",t),t.children.length>0){var a=n.contents(),s=!1,r=[];e(a).each(function(){return e(this).is("ul")?!1:(r.push(this),void(e(this).is("a")&&(s=!0)))});var d=e("<"+o.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+l+'_item"/>');if(o.allowParentLinks&&!o.nestedParentLinks&&s)e(r).wrapAll('<span class="'+l+"_parent-link "+l+'_row"/>').parent();else{var c=e(r).wrapAll(d).parent();c.addClass(l+"_row")}o.showChildren?n.addClass(l+"_open"):n.addClass(l+"_collapsed"),n.addClass(l+"_parent");var p=e('<span class="'+l+'_arrow">'+(o.showChildren?o.openedSymbol:o.closedSymbol)+"</span>");o.allowParentLinks&&!o.nestedParentLinks&&s&&(p=p.wrap(d).parent()),e(r).last().after(p)}else 0===n.children().length&&n.addClass(l+"_txtnode");n.children("a").attr("role","menuitem").click(function(n){o.closeOnClick&&!e(n.target).parent().closest("li").hasClass(l+"_parent")&&e(i.btn).click()}),o.closeOnClick&&o.allowParentLinks&&(n.children("a").children("a").click(function(n){e(i.btn).click()}),n.find("."+l+"_parent-link a:not(."+l+"_item)").click(function(n){e(i.btn).click()}))}),e(d).each(function(){var n=e(this).data("menu");o.showChildren||i._visibilityToggle(n.children,null,!1,null,!0)}),i._visibilityToggle(i.mobileNav,null,!1,"init",!0),i.mobileNav.attr("role","menu"),e(n).mousedown(function(){i._outlines(!1)}),e(n).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventDefault(),i._menuToggle()}),i.mobileNav.on("click","."+l+"_item",function(n){n.preventDefault(),i._itemClick(e(this))}),e(i.btn).keydown(function(e){var n=e||event;13==n.keyCode&&(e.preventDefault(),i._menuToggle())}),i.mobileNav.on("keydown","."+l+"_item",function(n){var t=n||event;13==t.keyCode&&(n.preventDefault(),i._itemClick(e(n.target)))}),o.allowParentLinks&&o.nestedParentLinks&&e("."+l+"_item a").click(function(e){e.stopImmediatePropagation()})},a.prototype._menuToggle=function(e){var n=this,t=n.btn,a=n.mobileNav;t.hasClass(l+"_collapsed")?(t.removeClass(l+"_collapsed"),t.addClass(l+"_open")):(t.removeClass(l+"_open"),t.addClass(l+"_collapsed")),t.addClass(l+"_animating"),n._visibilityToggle(a,t.parent(),!0,t)},a.prototype._itemClick=function(e){var n=this,t=n.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+l+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasClass(l+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasClass(l+"_collapsed")?(a.arrow.html(t.openedSymbol),a.parent.removeClass(l+"_collapsed"),a.parent.addClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e)):(a.arrow.html(t.closedSymbol),a.parent.addClass(l+"_collapsed"),a.parent.removeClass(l+"_open"),a.parent.addClass(l+"_animating"),n._visibilityToggle(a.ul,a.parent,!0,e))},a.prototype._visibilityToggle=function(n,t,a,i,s){var o=this,r=o.settings,d=o._getActionItems(n),c=0;a&&(c=r.duration),n.hasClass(l+"_hidden")?(n.removeClass(l+"_hidden"),s||r.beforeOpen(i),n.slideDown(c,r.easingOpen,function(){e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s||r.afterOpen(i)}),n.attr("aria-hidden","false"),d.attr("tabindex","0"),o._setVisAttr(n,!1)):(n.addClass(l+"_hidden"),s||r.beforeClose(i),n.slideUp(c,this.settings.easingClose,function(){n.attr("aria-hidden","true"),d.attr("tabindex","-1"),o._setVisAttr(n,!0),n.hide(),e(i).removeClass(l+"_animating"),e(t).removeClass(l+"_animating"),s?"init"==i&&r.init():r.afterClose(i)}))},a.prototype._setVisAttr=function(n,t){var a=this,i=n.children("li").children("ul").not("."+l+"_hidden");t?i.each(function(){var n=e(this);n.attr("aria-hidden","true");var i=a._getActionItems(n);i.attr("tabindex","-1"),a._setVisAttr(n,t)}):i.each(function(){var n=e(this);n.attr("aria-hidden","false");var i=a._getActionItems(n);i.attr("tabindex","0"),a._setVisAttr(n,t)})},a.prototype._getActionItems=function(e){var n=e.data("menu");if(!n){n={};var t=e.children("li"),a=t.find("a");n.links=a.add(t.find("."+l+"_item")),e.data("menu",n)}return n.links},a.prototype._outlines=function(n){n?e("."+l+"_item, ."+l+"_btn").css("outline",""):e("."+l+"_item, ."+l+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menuToggle()},a.prototype.open=function(){var e=this;e.btn.hasClass(l+"_collapsed")&&e._menuToggle()},a.prototype.close=function(){var e=this;e.btn.hasClass(l+"_open")&&e._menuToggle()},e.fn[s]=function(n){var t=arguments;if(void 0===n||"object"==typeof n)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,n))});if("string"==typeof n&&"_"!==n[0]&&"init"!==n){var i;return this.each(function(){var l=e.data(this,"plugin_"+s);l instanceof a&&"function"==typeof l[n]&&(i=l[n].apply(l,Array.prototype.slice.call(t,1)))}),void 0!==i?i:this}}}(jQuery,document,window); 916/*! 917Waypoints - 4.0.0 918Copyright © 2011-2015 Caleb Troughton 919Licensed under the MIT license. 920https://github.com/imakewebthings/waypoints/blog/master/licenses.txt 921*/ 922!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: 6,526 bytes, line 922
922this.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.invokeAll("enable")},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,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);t&&e&&(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],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.viewportHeight():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=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:[],r
922ight:[]}},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))}(); 923/*! 924Waypoints Sticky Element Shortcut - 4.0.0 925Copyright © 2011-2015 Caleb Troughton 926Licensed under the MIT license. 927https://github.com/imakewebthings/waypoints/blog/master/licenses.txt 928*/ 929!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}(); 930/* 931 * jQuery Superfish Menu Plugin 932 * Copyright (c) 2013 Joel Birch 933 * 934 * Dual licensed under the MIT and GPL licenses: 935 * http://www.opensource.org/licenses/mit-license.php 936 * http://www.gnu.org/licenses/gpl.html 937 */ 938 939// IMPORTANT: SUPERFISH WILL NOT DISPLAY WHEN LOGGED INTO WORDPRESS. ONLY WORKS WHEN LOGGED OUT. 940 941(function ($) { 942 "use strict"; 943 944 var methods = (function () { 945 // private properties and methods go here 946 var c = { 947 bcClass: 'sf-breadcrumb', 948 menuClass: 'sf-js-enabled', 949 anchorClass: 'sf-with-ul', 950 menuArrowClass: 'sf-arrows' 951 }, 952 ios = (function () { 953 var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent); 954 if (ios) { 955 // iOS clicks only bubble as far as body children 956 $(window).load(function () { 957 $('body').children().on('click', $.noop); 958 }); 959 } 960 return ios; 961 })(), 962 wp7 = (function () { 963 var style = document.documentElement.style; 964 return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent)); 965 })(), 966 toggleMenuClasses = function ($menu, o) { 967 var classes = c.menuClass; 968 if (o.cssArrows) { 969 classes += ' ' + c.menuArrowClass; 970 }
vendor: 5,624 bytes, lines 971-1170
971 $menu.toggleClass(classes); 972 }, 973 setPathToCurrent = function ($menu, o) { 974 return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) 975 .addClass(o.hoverClass + ' ' + c.bcClass) 976 .filter(function () { 977 return ($(this).children(o.popUpSelector).hide().show().length); 978 }).removeClass(o.pathClass); 979 }, 980 toggleAnchorClass = function ($li) { 981 $li.children('a').toggleClass(c.anchorClass); 982 }, 983 toggleTouchAction = function ($menu) { 984 var touchAction = $menu.css('ms-touch-action'); 985 touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y'; 986 $menu.css('ms-touch-action', touchAction); 987 }, 988 applyHandlers = function ($menu, o) { 989 var targets = 'li:has(' + o.popUpSelector + ')'; 990 if ($.fn.hoverIntent && !o.disableHI) { 991 $menu.hoverIntent(over, out, targets); 992 } 993 else { 994 $menu 995 .on('mouseenter.superfish', targets, over) 996 .on('mouseleave.superfish', targets, out); 997 } 998 var touchevent = 'MSPointerDown.superfish'; 999 if (!ios) { 1000 touchevent += ' touchend.superfish'; 1001 } 1002 if (wp7) { 1003 touchevent += ' mousedown.superfish'; 1004 } 1005 $menu 1006 .on('focusin.superfish', 'li', over) 1007 .on('focusout.superfish', 'li', out) 1008 .on(touchevent, 'a', o, touchHandler); 1009 }, 1010 touchHandler = function (e) { 1011 var $this = $(this), 1012 $ul = $this.siblings(e.data.popUpSelector); 1013 1014 if ($ul.length > 0 && $ul.is(':hidden')) { 1015 $this.one('click.superfish', false); 1016 if (e.type === 'MSPointerDown') { 1017 $this.trigger('focus'); 1018 } else { 1019 $.proxy(over, $this.parent('li'))(); 1020 } 1021 } 1022 }, 1023 over = function () { 1024 var $this = $(this), 1025 o = getOptions($this); 1026 clearTimeout(o.sfTimer); 1027 $this.siblings().superfish('hide').end().superfish('show'); 1028 }, 1029 out = function () { 1030 var $this = $(this), 1031 o = getOptions($this); 1032 if (ios) { 1033 $.proxy(close, $this, o)(); 1034 } 1035 else { 1036 clearTimeout(o.sfTimer); 1037 o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay); 1038 } 1039 }, 1040 close = function (o) { 1041 o.retainPath = ($.inArray(this[0], o.$path) > -1); 1042 this.superfish('hide'); 1043 1044 if (!this.parents('.' + o.hoverClass).length) { 1045 o.onIdle.call(getMenu(this)); 1046 if (o.$path.length) { 1047 $.proxy(over, o.$path)(); 1048 } 1049 } 1050 }, 1051 getMenu = function ($el) { 1052 return $el.closest('.' + c.menuClass); 1053 }, 1054 getOptions = function ($el) { 1055 return getMenu($el).data('sf-options'); 1056 }; 1057 1058 return { 1059 // public methods 1060 hide: function (instant) { 1061 if (this.length) { 1062 var $this = this, 1063 o = getOptions($this); 1064 if (!o) { 1065 return this; 1066 } 1067 var not = (o.retainPath === true) ? o.$path : '', 1068 $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), 1069 speed = o.speedOut; 1070 1071 if (instant) { 1072 $ul.show(); 1073 speed = 0; 1074 } 1075 o.retainPath = false; 1076 o.onBeforeHide.call($ul); 1077 $ul.stop(true, true).animate(o.animationOut, speed, function () { 1078 var $this = $(this); 1079 o.onHide.call($this); 1080 }); 1081 } 1082 return this; 1083 }, 1084 show: function () { 1085 var o = getOptions(this); 1086 if (!o) { 1087 return this; 1088 } 1089 var $this = this.addClass(o.hoverClass), 1090 $ul = $this.children(o.popUpSelector); 1091 1092 o.onBeforeShow.call($ul); 1093 $ul.stop(true, true).animate(o.animation, o.speed, function () { 1094 o.onShow.call($ul); 1095 }); 1096 return this; 1097 }, 1098 destroy: function () { 1099 return this.each(function () { 1100 var $this = $(this), 1101 o = $this.data('sf-options'), 1102 $hasPopUp; 1103 if (!o) { 1104 return false; 1105 } 1106 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 1107 clearTimeout(o.sfTimer); 1108 toggleMenuClasses($this, o); 1109 toggleAnchorClass($hasPopUp); 1110 toggleTouchAction($this); 1111 // remove event handlers 1112 $this.off('.superfish').off('.hoverIntent'); 1113 // clear animation's inline display style 1114 $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) { 1115 return style.replace(/display[^;]+;?/g, ''); 1116 }); 1117 // reset 'current' path classes 1118 o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); 1119 $this.find('.' + o.hoverClass).removeClass(o.hoverClass); 1120 o.onDestroy.call($this); 1121 $this.removeData('sf-options'); 1122 }); 1123 }, 1124 init: function (op) { 1125 return this.each(function () { 1126 var $this = $(this); 1127 if ($this.data('sf-options')) { 1128 return false; 1129 } 1130 var o = $.extend({}, $.fn.superfish.defaults, op), 1131 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 1132 o.$path = setPathToCurrent($this, o); 1133 1134 $this.data('sf-options', o); 1135 1136 toggleMenuClasses($this, o); 1137 toggleAnchorClass($hasPopUp); 1138 toggleTouchAction($this); 1139 applyHandlers($this, o); 1140 1141 $hasPopUp.not('.' + c.bcClass).superfish('hide', true); 1142 1143 o.onInit.call(this); 1144 }); 1145 } 1146 }; 1147 })(); 1148 1149 $.fn.superfish = function (method, args) { 1150 if (methods[method]) { 1151 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 1152 } 1153 else if (typeof method === 'object' || ! method) { 1154 return methods.init.apply(this, arguments); 1155 } 1156 else { 1157 return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); 1158 } 1159 }; 1160 1161 $.fn.superfish.defaults = { 1162 popUpSelector: 'ul,.sf-mega', // within menu context 1163 hoverClass: 'sfHover', 1164 pathClass: 'overrideThisToUse', 1165 pathLevels: 1, 1166 delay: 0, 1167 animation: {opacity: 'show', height: 'show'}, 1168 animationOut: {opacity: 'hide', height: 'hide'}, 1169 speed: 100, 1170 speedOut: 100,
1171 cssArrows: false, 1172 disableHI: true, 1173 onInit: $.noop, 1174 onBeforeShow: $.noop, 1175 onShow: $.noop, 1176 onBeforeHide: $.noop, 1177 onHide: $.noop, 1178 onIdle: $.noop, 1179 onDestroy: $.noop 1180 }; 1181 1182 // soon to be deprecated 1183 $.fn.extend({ 1184 hideSuperfishUl: methods.hide, 1185 showSuperfishUl: methods.show 1186 }); 1187 1188})(jQuery); 1189 1190/* 1191 * Supersubs v0.3b - jQuery plugin 1192 * Copyright (c) 2013 Joel Birch 1193 * 1194 * Dual licensed under the MIT and GPL licenses: 1195 * http://www.opensource.org/licenses/mit-license.php 1196 * http://www.gnu.org/licenses/gpl.html 1197 * 1198 * 1199 * This plugin automatically a 1200djusts submenu widths of suckerfish-style menus to that of 1201 * their longest list item children. If you use this, please expect bugs and report them 1202 * to the jQuery Google Group with the word 'Superfish' in the subject line. 1203 * 1204 */ 1205 1206;(function($){ // $ will refer to jQuery within this closure 1207 1208 $.fn.supersubs = function(options){ 1209 var opts = $.extend({}, $.fn.supersubs.defaults, options); 1210 // return original object to support chaining 1211 return this.each(function() { 1212 // cache selections 1213 var $$ = $(this); 1214 // support metadata 1215 var o = $.meta ? $.extend({}, opts, $$.data()) : opts; 1216 // cache all ul elements and show them in preparation for measurements 1217 $ULs = $$.find('ul').show(); 1218 // get the font size of menu. 1219 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 1220 var fontsize = $('<li id="menu-fontsize">—</li>').css({ 1221 'padding' : 0, 1222 'position' : 'absolute', 1223 'top' : '-999em', 1224 'width' : 'auto' 1225 }).appendTo($$)[0].clientWidth; //clientWidth is faster than .width() 1226 // remove em dash 1227 $('#menu-fontsize').remove(); 1228 // loop through each ul in menu 1229 $ULs.each(function(i) { 1230 // cache this ul 1231 var $ul = $(this); 1232 // get all (li) children of this ul 1233 var $LIs = $ul.children(); 1234 // get all anchor grand-children 1235 var $As = $LIs.children('a'); 1236 // force content to one line and save current float property 1237 var liFloat = $LIs.css('white-space','nowrap').css('float'); 1238 // remove width restrictions and floats so elements remain vertically stacked 1239 $ul.add($LIs).add($As).css({ 1240 'float' : 'none', 1241 'width' : 'auto' 1242 }); 1243 // this ul will now be shrink-wrapped to longest li due to position:absolute 1244 // so save its width as ems. 1245 var emWidth = $ul[0].clientWidth / fontsize; 1246 // add more width to ensure lines don't turn over at certain sizes in various browsers 1247 emWidth += o.extraWidth; 1248 // restrict to at least minWidth and at most maxWidth 1249 if (emWidth > o.maxWidth) { emWidth = o.maxWidth; } 1250 else if (emWidth < o.minWidth) { emWidth = o.minWidth; } 1251 emWidth += 'em'; 1252 // set ul to width in ems 1253 $ul.css('width',emWidth); 1254 // restore li floats to avoid IE bugs 1255 // set li width to full width of this ul 1256 // revert white-space to normal 1257 $LIs.css({ 1258 'float' : liFloat, 1259 'width' : '100%', 1260 'white-space' : 'normal' 1261 }) 1262 // update offset position of descendant ul to reflect new width of parent. 1263 // set it to 100% in case it isn't already set to this in the CSS 1264 .each(function(){ 1265 var $childUl = $(this).children('ul'); 1266 var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right'; 1267 $childUl.css(offsetDirection,'100%'); 1268 }); 1269 }).hide(); 1270 1271 }); 1272 }; 1273 // expose defaults 1274 $.fn.supersubs.defaults = { 1275 minWidth : 9, // requires em unit. 1276 maxWidth : 25, // requires em unit. 1277 extraWidth : 0 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 1278 }; 1279 1280})(jQuery); // plugin code ends 1281 1282/*! WOW - v1.1.2 - 2015-04-07 1283* Copyright (c) 2015 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}
vendor: 5,135 bytes, line 1283
1283,a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}
vendor: 1,781 bytes, line 1283
1283,e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
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.