PageSourceSearch

https://foadadeli.ir/js/plugins.js

js foadadeli.ir collected 2026-10-02 05:17:06 UTC 221,117 bytes, 3,728 lines download raw bytes

1/*
2 * Copyright (c) 2022 Marketify
3 * Author: Marketify
4 * This file is made for CURRENT TEMPLATE
5*/
6
7
8/*------------------------------------------------------------------*/
9/*	01) ISOTOPE
10/*------------------------------------------------------------------*/
11
12/*!
13 * Isotope PACKAGED v3.0.6
14 *
15 * Licensed GPLv3 for open source use
16 * or Isotope Commercial License for commercial use
17 *
18 * https://isotope.metafizzy.co
19 * Copyright 2010-2018 Metafizzy
vendor: 39,423 bytes, lines 19-1581
19
20 */
21
22/**
23 * Bridget makes jQuery widgets
24 * v2.0.1
25 * MIT license
26 */
27
28/* jshint browser: true, strict: true, undef: true, unused: true */
29
30( function( window, factory ) {
31  // universal module definition
32  /*jshint strict: false */ /* globals define, module, require */
33  if ( typeof define == 'function' && define.amd ) {
34    // AMD
35    define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
36      return factory( window, jQuery );
37    });
38  } else if ( typeof module == 'object' && module.exports ) {
39    // CommonJS
40    module.exports = factory(
41      window,
42      require('jquery')
43    );
44  } else {
45    // browser global
46    window.jQueryBridget = factory(
47      window,
48      window.jQuery
49    );
50  }
51
52}( window, function factory( window, jQuery ) {
53'use strict';
54
55// ----- utils ----- //
56
57var arraySlice = Array.prototype.slice;
58
59// helper function for logging errors
60// $.error breaks jQuery chaining
61var console = window.console;
62var logError = typeof console == 'undefined' ? function() {} :
63  function( message ) {
64    console.error( message );
65  };
66
67// ----- jQueryBridget ----- //
68
69function jQueryBridget( namespace, PluginClass, $ ) {
70  $ = $ || jQuery || window.jQuery;
71  if ( !$ ) {
72    return;
73  }
74
75  // add option method -> $().plugin('option', {...})
76  if ( !PluginClass.prototype.option ) {
77    // option setter
78    PluginClass.prototype.option = function( opts ) {
79      // bail out if not an object
80      if ( !$.isPlainObject( opts ) ){
81        return;
82      }
83      this.options = $.extend( true, this.options, opts );
84    };
85  }
86
87  // make jQuery plugin
88  $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
89    if ( typeof arg0 == 'string' ) {
90      // method call $().plugin( 'methodName', { options } )
91      // shift arguments by 1
92      var args = arraySlice.call( arguments, 1 );
93      return methodCall( this, arg0, args );
94    }
95    // just $().plugin({ options })
96    plainCall( this, arg0 );
97    return this;
98  };
99
100  // $().plugin('methodName')
101  function methodCall( $elems, methodName, args ) {
102    var returnValue;
103    var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
104
105    $elems.each( function( i, elem ) {
106      // get instance
107      var instance = $.data( elem, namespace );
108      if ( !instance ) {
109        logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
110          pluginMethodStr );
111        return;
112      }
113
114      var method = instance[ methodName ];
115      if ( !method || methodName.charAt(0) == '_' ) {
116        logError( pluginMethodStr + ' is not a valid method' );
117        return;
118      }
119
120      // apply method, get return value
121      var value = method.apply( instance, args );
122      // set return value if value is returned, use only first value
123      returnValue = returnValue === undefined ? value : returnValue;
124    });
125
126    return returnValue !== undefined ? returnValue : $elems;
127  }
128
129  function plainCall( $elems, options ) {
130    $elems.each( function( i, elem ) {
131      var instance = $.data( elem, namespace );
132      if ( instance ) {
133        // set options & init
134        instance.option( options );
135        instance._init();
136      } else {
137        // initialize new instance
138        instance = new PluginClass( elem, options );
139        $.data( elem, namespace, instance );
140      }
141    });
142  }
143
144  updateJQuery( $ );
145
146}
147
148// ----- updateJQuery ----- //
149
150// set $.bridget for v1 backwards compatibility
151function updateJQuery( $ ) {
152  if ( !$ || ( $ && $.bridget ) ) {
153    return;
154  }
155  $.bridget = jQueryBridget;
156}
157
158updateJQuery( jQuery || window.jQuery );
159
160// -----  ----- //
161
162return jQueryBridget;
163
164}));
165
166/**
167 * EvEmitter v1.1.0
168 * Lil' event emitter
169 * MIT License
170 */
171
172/* jshint unused: true, undef: true, strict: true */
173
174( function( global, factory ) {
175  // universal module definition
176  /* jshint strict: false */ /* globals define, module, window */
177  if ( typeof define == 'function' && define.amd ) {
178    // AMD - RequireJS
179    define( 'ev-emitter/ev-emitter',factory );
180  } else if ( typeof module == 'object' && module.exports ) {
181    // CommonJS - Browserify, Webpack
182    module.exports = factory();
183  } else {
184    // Browser globals
185    global.EvEmitter = factory();
186  }
187
188}( typeof window != 'undefined' ? window : this, function() {
189
190
191
192function EvEmitter() {}
193
194var proto = EvEmitter.prototype;
195
196proto.on = function( eventName, listener ) {
197  if ( !eventName || !listener ) {
198    return;
199  }
200  // set events hash
201  var events = this._events = this._events || {};
202  // set listeners array
203  var listeners = events[ eventName ] = events[ eventName ] || [];
204  // only add once
205  if ( listeners.indexOf( listener ) == -1 ) {
206    listeners.push( listener );
207  }
208
209  return this;
210};
211
212proto.once = function( eventName, listener ) {
213  if ( !eventName || !listener ) {
214    return;
215  }
216  // add event
217  this.on( eventName, listener );
218  // set once flag
219  // set onceEvents hash
220  var onceEvents = this._onceEvents = this._onceEvents || {};
221  // set onceListeners object
222  var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
223  // set flag
224  onceListeners[ listener ] = true;
225
226  return this;
227};
228
229proto.off = function( eventName, listener ) {
230  var listeners = this._events && this._events[ eventName ];
231  if ( !listeners || !listeners.length ) {
232    return;
233  }
234  var index = listeners.indexOf( listener );
235  if ( index != -1 ) {
236    listeners.splice( index, 1 );
237  }
238
239  return this;
240};
241
242proto.emitEvent = function( eventName, args ) {
243  var listeners = this._events && this._events[ eventName ];
244  if ( !listeners || !listeners.length ) {
245    return;
246  }
247  // copy over to avoid interference if .off() in listener
248  listeners = listeners.slice(0);
249  args = args || [];
250  // once stuff
251  var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
252
253  for ( var i=0; i < listeners.length; i++ ) {
254    var listener = listeners[i]
255    var isOnce = onceListeners && onceListeners[ listener ];
256    if ( isOnce ) {
257      // remove listener
258      // remove before trigger to prevent recursion
259      this.off( eventName, listener );
260      // unset once flag
261      delete onceListeners[ listener ];
262    }
263    // trigger listener
264    listener.apply( this, args );
265  }
266
267  return this;
268};
269
270proto.allOff = function() {
271  delete this._events;
272  delete this._onceEvents;
273};
274
275return EvEmitter;
276
277}));
278
279/*!
280 * getSize v2.0.3
281 * measure size of elements
282 * MIT license
283 */
284
285/* jshint browser: true, strict: true, undef: true, unused: true */
286/* globals console: false */
287
288( function( window, factory ) {
289  /* jshint strict: false */ /* globals define, module */
290  if ( typeof define == 'function' && define.amd ) {
291    // AMD
292    define( 'get-size/get-size',factory );
293  } else if ( typeof module == 'object' && module.exports ) {
294    // CommonJS
295    module.exports = factory();
296  } else {
297    // browser global
298    window.getSize = factory();
299  }
300
301})( window, function factory() {
302'use strict';
303
304// -------------------------- helpers -------------------------- //
305
306// get a number from a string, not a percentage
307function getStyleSize( value ) {
308  var num = parseFloat( value );
309  // not a percent like '100%', and a number
310  var isValid = value.indexOf('%') == -1 && !isNaN( num );
311  return isValid && num;
312}
313
314function noop() {}
315
316var logError = typeof console == 'undefined' ? noop :
317  function( message ) {
318    console.error( message );
319  };
320
321// -------------------------- measurements -------------------------- //
322
323var measurements = [
324  'paddingLeft',
325  'paddingRight',
326  'paddingTop',
327  'paddingBottom',
328  'marginLeft',
329  'marginRight',
330  'marginTop',
331  'marginBottom',
332  'borderLeftWidth',
333  'borderRightWidth',
334  'borderTopWidth',
335  'borderBottomWidth'
336];
337
338var measurementsLength = measurements.length;
339
340function getZeroSize() {
341  var size = {
342    width: 0,
343    height: 0,
344    innerWidth: 0,
345    innerHeight: 0,
346    outerWidth: 0,
347    outerHeight: 0
348  };
349  for ( var i=0; i < measurementsLength; i++ ) {
350    var measurement = measurements[i];
351    size[ measurement ] = 0;
352  }
353  return size;
354}
355
356// -------------------------- getStyle -------------------------- //
357
358/**
359 * getStyle, get style of element, check for Firefox bug
360 * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
361 */
362function getStyle( elem ) {
363  var style = getComputedStyle( elem );
364  if ( !style ) {
365    logError( 'Style returned ' + style +
366      '. Are you running this code in a hidden iframe on Firefox? ' +
367      'See https://bit.ly/getsizebug1' );
368  }
369  return style;
370}
371
372// -------------------------- setup -------------------------- //
373
374var isSetup = false;
375
376var isBoxSizeOuter;
377
378/**
379 * setup
380 * check isBoxSizerOuter
381 * do on first getSize() rather than on page load for Firefox bug
382 */
383function setup() {
384  // setup once
385  if ( isSetup ) {
386    return;
387  }
388  isSetup = true;
389
390  // -------------------------- box sizing -------------------------- //
391
392  /**
393   * Chrome & Safari measure the outer-width on style.width on border-box elems
394   * IE11 & Firefox<29 measures the inner-width
395   */
396  var div = document.createElement('div');
397  div.style.width = '200px';
398  div.style.padding = '1px 2px 3px 4px';
399  div.style.borderStyle = 'solid';
400  div.style.borderWidth = '1px 2px 3px 4px';
401  div.style.boxSizing = 'border-box';
402
403  var body = document.body || document.documentElement;
404  body.appendChild( div );
405  var style = getStyle( div );
406  // round value for browser zoom. desandro/masonry#928
407  isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
408  getSize.isBoxSizeOuter = isBoxSizeOuter;
409
410  body.removeChild( div );
411}
412
413// -------------------------- getSize -------------------------- //
414
415function getSize( elem ) {
416  setup();
417
418  // use querySeletor if elem is string
419  if ( typeof elem == 'string' ) {
420    elem = document.querySelector( elem );
421  }
422
423  // do not proceed on non-objects
424  if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
425    return;
426  }
427
428  var style = getStyle( elem );
429
430  // if hidden, everything is 0
431  if ( style.display == 'none' ) {
432    return getZeroSize();
433  }
434
435  var size = {};
436  size.width = elem.offsetWidth;
437  size.height = elem.offsetHeight;
438
439  var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
440
441  // get all measurements
442  for ( var i=0; i < measurementsLength; i++ ) {
443    var measurement = measurements[i];
444    var value = style[ measurement ];
445    var num = parseFloat( value );
446    // any 'auto', 'medium' value will be 0
447    size[ measurement ] = !isNaN( num ) ? num : 0;
448  }
449
450  var paddingWidth = size.paddingLeft + size.paddingRight;
451  var paddingHeight = size.paddingTop + size.paddingBottom;
452  var marginWidth = size.marginLeft + size.marginRight;
453  var marginHeight = size.marginTop + size.marginBottom;
454  var borderWidth = size.borderLeftWidth + size.borderRightWidth;
455  var borderHeight = size.borderTopWidth + size.borderBottomWidth;
456
457  var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
458
459  // overwrite width and height if we can get it from style
460  var styleWidth = getStyleSize( style.width );
461  if ( styleWidth !== false ) {
462    size.width = styleWidth +
463      // add padding and border unless it's already including it
464      ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
465  }
466
467  var styleHeight = getStyleSize( style.height );
468  if ( styleHeight !== false ) {
469    size.height = styleHeight +
470      // add padding and border unless it's already including it
471      ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
472  }
473
474  size.innerWidth = size.width - ( paddingWidth + borderWidth );
475  size.innerHeight = size.height - ( paddingHeight + borderHeight );
476
477  size.outerWidth = size.width + marginWidth;
478  size.outerHeight = size.height + marginHeight;
479
480  return size;
481}
482
483return getSize;
484
485});
486
487/**
488 * matchesSelector v2.0.2
489 * matchesSelector( element, '.selector' )
490 * MIT license
491 */
492
493/*jshint browser: true, strict: true, undef: true, unused: true */
494
495( function( window, factory ) {
496  /*global define: false, module: false */
497  'use strict';
498  // universal module definition
499  if ( typeof define == 'function' && define.amd ) {
500    // AMD
501    define( 'desandro-matches-selector/matches-selector',factory );
502  } else if ( typeof module == 'object' && module.exports ) {
503    // CommonJS
504    module.exports = factory();
505  } else {
506    // browser global
507    window.matchesSelector = factory();
508  }
509
510}( window, function factory() {
511  'use strict';
512
513  var matchesMethod = ( function() {
514    var ElemProto = window.Element.prototype;
515    // check for the standard method name first
516    if ( ElemProto.matches ) {
517      return 'matches';
518    }
519    // check un-prefixed
520    if ( ElemProto.matchesSelector ) {
521      return 'matchesSelector';
522    }
523    // check vendor prefixes
524    var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
525
526    for ( var i=0; i < prefixes.length; i++ ) {
527      var prefix = prefixes[i];
528      var method = prefix + 'MatchesSelector';
529      if ( ElemProto[ method ] ) {
530        return method;
531      }
532    }
533  })();
534
535  return function matchesSelector( elem, selector ) {
536    return elem[ matchesMethod ]( selector );
537  };
538
539}));
540
541/**
542 * Fizzy UI utils v2.0.7
543 * MIT license
544 */
545
546/*jshint browser: true, undef: true, unused: true, strict: true */
547
548( function( window, factory ) {
549  // universal module definition
550  /*jshint strict: false */ /*globals define, module, require */
551
552  if ( typeof define == 'function' && define.amd ) {
553    // AMD
554    define( 'fizzy-ui-utils/utils',[
555      'desandro-matches-selector/matches-selector'
556    ], function( matchesSelector ) {
557      return factory( window, matchesSelector );
558    });
559  } else if ( typeof module == 'object' && module.exports ) {
560    // CommonJS
561    module.exports = factory(
562      window,
563      require('desandro-matches-selector')
564    );
565  } else {
566    // browser global
567    window.fizzyUIUtils = factory(
568      window,
569      window.matchesSelector
570    );
571  }
572
573}( window, function factory( window, matchesSelector ) {
574
575
576
577var utils = {};
578
579// ----- extend ----- //
580
581// extends objects
582utils.extend = function( a, b ) {
583  for ( var prop in b ) {
584    a[ prop ] = b[ prop ];
585  }
586  return a;
587};
588
589// ----- modulo ----- //
590
591utils.modulo = function( num, div ) {
592  return ( ( num % div ) + div ) % div;
593};
594
595// ----- makeArray ----- //
596
597var arraySlice = Array.prototype.slice;
598
599// turn element or nodeList into an array
600utils.makeArray = function( obj ) {
601  if ( Array.isArray( obj ) ) {
602    // use object if already an array
603    return obj;
604  }
605  // return empty array if undefined or null. #6
606  if ( obj === null || obj === undefined ) {
607    return [];
608  }
609
610  var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
611  if ( isArrayLike ) {
612    // convert nodeList to array
613    return arraySlice.call( obj );
614  }
615
616  // array of single index
617  return [ obj ];
618};
619
620// ----- removeFrom ----- //
621
622utils.removeFrom = function( ary, obj ) {
623  var index = ary.indexOf( obj );
624  if ( index != -1 ) {
625    ary.splice( index, 1 );
626  }
627};
628
629// ----- getParent ----- //
630
631utils.getParent = function( elem, selector ) {
632  while ( elem.parentNode && elem != document.body ) {
633    elem = elem.parentNode;
634    if ( matchesSelector( elem, selector ) ) {
635      return elem;
636    }
637  }
638};
639
640// ----- getQueryElement ----- //
641
642// use element as selector string
643utils.getQueryElement = function( elem ) {
644  if ( typeof elem == 'string' ) {
645    return document.querySelector( elem );
646  }
647  return elem;
648};
649
650// ----- handleEvent ----- //
651
652// enable .ontype to trigger from .addEventListener( elem, 'type' )
653utils.handleEvent = function( event ) {
654  var method = 'on' + event.type;
655  if ( this[ method ] ) {
656    this[ method ]( event );
657  }
658};
659
660// ----- filterFindElements ----- //
661
662utils.filterFindElements = function( elems, selector ) {
663  // make array of elems
664  elems = utils.makeArray( elems );
665  var ffElems = [];
666
667  elems.forEach( function( elem ) {
668    // check that elem is an actual element
669    if ( !( elem instanceof HTMLElement ) ) {
670      return;
671    }
672    // add elem if no selector
673    if ( !selector ) {
674      ffElems.push( elem );
675      return;
676    }
677    // filter & find items if we have a selector
678    // filter
679    if ( matchesSelector( elem, selector ) ) {
680      ffElems.push( elem );
681    }
682    // find children
683    var childElems = elem.querySelectorAll( selector );
684    // concat childElems to filterFound array
685    for ( var i=0; i < childElems.length; i++ ) {
686      ffElems.push( childElems[i] );
687    }
688  });
689
690  return ffElems;
691};
692
693// ----- debounceMethod ----- //
694
695utils.debounceMethod = function( _class, methodName, threshold ) {
696  threshold = threshold || 100;
697  // original method
698  var method = _class.prototype[ methodName ];
699  var timeoutName = methodName + 'Timeout';
700
701  _class.prototype[ methodName ] = function() {
702    var timeout = this[ timeoutName ];
703    clearTimeout( timeout );
704
705    var args = arguments;
706    var _this = this;
707    this[ timeoutName ] = setTimeout( function() {
708      method.apply( _this, args );
709      delete _this[ timeoutName ];
710    }, threshold );
711  };
712};
713
714// ----- docReady ----- //
715
716utils.docReady = function( callback ) {
717  var readyState = document.readyState;
718  if ( readyState == 'complete' || readyState == 'interactive' ) {
719    // do async to allow for other scripts to run. metafizzy/flickity#441
720    setTimeout( callback );
721  } else {
722    document.addEventListener( 'DOMContentLoaded', callback );
723  }
724};
725
726// ----- htmlInit ----- //
727
728// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
729utils.toDashed = function( str ) {
730  return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
731    return $1 + '-' + $2;
732  }).toLowerCase();
733};
734
735var console = window.console;
736/**
737 * allow user to initialize classes via [data-namespace] or .js-namespace class
738 * htmlInit( Widget, 'widgetName' )
739 * options are parsed from data-namespace-options
740 */
741utils.htmlInit = function( WidgetClass, namespace ) {
742  utils.docReady( function() {
743    var dashedNamespace = utils.toDashed( namespace );
744    var dataAttr = 'data-' + dashedNamespace;
745    var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
746    var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
747    var elems = utils.makeArray( dataAttrElems )
748      .concat( utils.makeArray( jsDashElems ) );
749    var dataOptionsAttr = dataAttr + '-options';
750    var jQuery = window.jQuery;
751
752    elems.forEach( function( elem ) {
753      var attr = elem.getAttribute( dataAttr ) ||
754        elem.getAttribute( dataOptionsAttr );
755      var options;
756      try {
757        options = attr && JSON.parse( attr );
758      } catch ( error ) {
759        // log error, do not initialize
760        if ( console ) {
761          console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
762          ': ' + error );
763        }
764        return;
765      }
766      // initialize
767      var instance = new WidgetClass( elem, options );
768      // make available via $().data('namespace')
769      if ( jQuery ) {
770        jQuery.data( elem, namespace, instance );
771      }
772    });
773
774  });
775};
776
777// -----  ----- //
778
779return utils;
780
781}));
782
783/**
784 * Outlayer Item
785 */
786
787( function( window, factory ) {
788  // universal module definition
789  /* jshint strict: false */ /* globals define, module, require */
790  if ( typeof define == 'function' && define.amd ) {
791    // AMD - RequireJS
792    define( 'outlayer/item',[
793        'ev-emitter/ev-emitter',
794        'get-size/get-size'
795      ],
796      factory
797    );
798  } else if ( typeof module == 'object' && module.exports ) {
799    // CommonJS - Browserify, Webpack
800    module.exports = factory(
801      require('ev-emitter'),
802      require('get-size')
803    );
804  } else {
805    // browser global
806    window.Outlayer = {};
807    window.Outlayer.Item = factory(
808      window.EvEmitter,
809      window.getSize
810    );
811  }
812
813}( window, function factory( EvEmitter, getSize ) {
814'use strict';
815
816// ----- helpers ----- //
817
818function isEmptyObj( obj ) {
819  for ( var prop in obj ) {
820    return false;
821  }
822  prop = null;
823  return true;
824}
825
826// -------------------------- CSS3 support -------------------------- //
827
828
829var docElemStyle = document.documentElement.style;
830
831var transitionProperty = typeof docElemStyle.transition == 'string' ?
832  'transition' : 'WebkitTransition';
833var transformProperty = typeof docElemStyle.transform == 'string' ?
834  'transform' : 'WebkitTransform';
835
836var transitionEndEvent = {
837  WebkitTransition: 'webkitTransitionEnd',
838  transition: 'transitionend'
839}[ transitionProperty ];
840
841// cache all vendor properties that could have vendor prefix
842var vendorProperties = {
843  transform: transformProperty,
844  transition: transitionProperty,
845  transitionDuration: transitionProperty + 'Duration',
846  transitionProperty: transitionProperty + 'Property',
847  transitionDelay: transitionProperty + 'Delay'
848};
849
850// -------------------------- Item -------------------------- //
851
852function Item( element, layout ) {
853  if ( !element ) {
854    return;
855  }
856
857  this.element = element;
858  // parent layout class, i.e. Masonry, Isotope, or Packery
859  this.layout = layout;
860  this.position = {
861    x: 0,
862    y: 0
863  };
864
865  this._create();
866}
867
868// inherit EvEmitter
869var proto = Item.prototype = Object.create( EvEmitter.prototype );
870proto.constructor = Item;
871
872proto._create = function() {
873  // transition objects
874  this._transn = {
875    ingProperties: {},
876    clean: {},
877    onEnd: {}
878  };
879
880  this.css({
881    position: 'absolute'
882  });
883};
884
885// trigger specified handler for event type
886proto.handleEvent = function( event ) {
887  var method = 'on' + event.type;
888  if ( this[ method ] ) {
889    this[ method ]( event );
890  }
891};
892
893proto.getSize = function() {
894  this.size = getSize( this.element );
895};
896
897/**
898 * apply CSS styles to element
899 * @param {Object} style
900 */
901proto.css = function( style ) {
902  var elemStyle = this.element.style;
903
904  for ( var prop in style ) {
905    // use vendor property if available
906    var supportedProp = vendorProperties[ prop ] || prop;
907    elemStyle[ supportedProp ] = style[ prop ];
908  }
909};
910
911 // measure position, and sets it
912proto.getPosition = function() {
913  var style = getComputedStyle( this.element );
914  var isOriginLeft = this.layout._getOption('originLeft');
915  var isOriginTop = this.layout._getOption('originTop');
916  var xValue = style[ isOriginLeft ? 'left' : 'right' ];
917  var yValue = style[ isOriginTop ? 'top' : 'bottom' ];
918  var x = parseFloat( xValue );
919  var y = parseFloat( yValue );
920  // convert percent to pixels
921  var layoutSize = this.layout.size;
922  if ( xValue.indexOf('%') != -1 ) {
923    x = ( x / 100 ) * layoutSize.width;
924  }
925  if ( yValue.indexOf('%') != -1 ) {
926    y = ( y / 100 ) * layoutSize.height;
927  }
928  // clean up 'auto' or other non-integer values
929  x = isNaN( x ) ? 0 : x;
930  y = isNaN( y ) ? 0 : y;
931  // remove padding from measurement
932  x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
933  y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
934
935  this.position.x = x;
936  this.position.y = y;
937};
938
939// set settled position, apply padding
940proto.layoutPosition = function() {
941  var layoutSize = this.layout.size;
942  var style = {};
943  var isOriginLeft = this.layout._getOption('originLeft');
944  var isOriginTop = this.layout._getOption('originTop');
945
946  // x
947  var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';
948  var xProperty = isOriginLeft ? 'left' : 'right';
949  var xResetProperty = isOriginLeft ? 'right' : 'left';
950
951  var x = this.position.x + layoutSize[ xPadding ];
952  // set in percentage or pixels
953  style[ xProperty ] = this.getXValue( x );
954  // reset other property
955  style[ xResetProperty ] = '';
956
957  // y
958  var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';
959  var yProperty = isOriginTop ? 'top' : 'bottom';
960  var yResetProperty = isOriginTop ? 'bottom' : 'top';
961
962  var y = this.position.y + layoutSize[ yPadding ];
963  // set in percentage or pixels
964  style[ yProperty ] = this.getYValue( y );
965  // reset other property
966  style[ yResetProperty ] = '';
967
968  this.css( style );
969  this.emitEvent( 'layout', [ this ] );
970};
971
972proto.getXValue = function( x ) {
973  var isHorizontal = this.layout._getOption('horizontal');
974  return this.layout.options.percentPosition && !isHorizontal ?
975    ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';
976};
977
978proto.getYValue = function( y ) {
979  var isHorizontal = this.layout._getOption('horizontal');
980  return this.layout.options.percentPosition && isHorizontal ?
981    ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';
982};
983
984proto._transitionTo = function( x, y ) {
985  this.getPosition();
986  // get current x & y from top/left
987  var curX = this.position.x;
988  var curY = this.position.y;
989
990  var didNotMove = x == this.position.x && y == this.position.y;
991
992  // save end position
993  this.setPosition( x, y );
994
995  // if did not move and not transitioning, just go to layout
996  if ( didNotMove && !this.isTransitioning ) {
997    this.layoutPosition();
998    return;
999  }
1000
1001  var transX = x - curX;
1002  var transY = y - curY;
1003  var transitionStyle = {};
1004  transitionStyle.transform = this.getTranslate( transX, transY );
1005
1006  this.transition({
1007    to: transitionStyle,
1008    onTransitionEnd: {
1009      transform: this.layoutPosition
1010    },
1011    isCleaning: true
1012  });
1013};
1014
1015proto.getTranslate = function( x, y ) {
1016  // flip cooridinates if origin on right or bottom
1017  var isOriginLeft = this.layout._getOption('originLeft');
1018  var isOriginTop = this.layout._getOption('originTop');
1019  x = isOriginLeft ? x : -x;
1020  y = isOriginTop ? y : -y;
1021  return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
1022};
1023
1024// non transition + transform support
1025proto.goTo = function( x, y ) {
1026  this.setPosition( x, y );
1027  this.layoutPosition();
1028};
1029
1030proto.moveTo = proto._transitionTo;
1031
1032proto.setPosition = function( x, y ) {
1033  this.position.x = parseFloat( x );
1034  this.position.y = parseFloat( y );
1035};
1036
1037// ----- transition ----- //
1038
1039/**
1040 * @param {Object} style - CSS
1041 * @param {Function} onTransitionEnd
1042 */
1043
1044// non transition, just trigger callback
1045proto._nonTransition = function( args ) {
1046  this.css( args.to );
1047  if ( args.isCleaning ) {
1048    this._removeStyles( args.to );
1049  }
1050  for ( var prop in args.onTransitionEnd ) {
1051    args.onTransitionEnd[ prop ].call( this );
1052  }
1053};
1054
1055/**
1056 * proper transition
1057 * @param {Object} args - arguments
1058 *   @param {Object} to - style to transition to
1059 *   @param {Object} from - style to start transition from
1060 *   @param {Boolean} isCleaning - removes transition styles after transition
1061 *   @param {Function} onTransitionEnd - callback
1062 */
1063proto.transition = function( args ) {
1064  // redirect to nonTransition if no transition duration
1065  if ( !parseFloat( this.layout.options.transitionDuration ) ) {
1066    this._nonTransition( args );
1067    return;
1068  }
1069
1070  var _transition = this._transn;
1071  // keep track of onTransitionEnd callback by css property
1072  for ( var prop in args.onTransitionEnd ) {
1073    _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
1074  }
1075  // keep track of properties that are transitioning
1076  for ( prop in args.to ) {
1077    _transition.ingProperties[ prop ] = true;
1078    // keep track of properties to clean up when transition is done
1079    if ( args.isCleaning ) {
1080      _transition.clean[ prop ] = true;
1081    }
1082  }
1083
1084  // set from styles
1085  if ( args.from ) {
1086    this.css( args.from );
1087    // force redraw. http://blog.alexmaccaw.com/css-transitions
1088    var h = this.element.offsetHeight;
1089    // hack for JSHint to hush about unused var
1090    h = null;
1091  }
1092  // enable transition
1093  this.enableTransition( args.to );
1094  // set styles that are transitioning
1095  this.css( args.to );
1096
1097  this.isTransitioning = true;
1098
1099};
1100
1101// dash before all cap letters, including first for
1102// WebkitTransform => -webkit-transform
1103function toDashedAll( str ) {
1104  return str.replace( /([A-Z])/g, function( $1 ) {
1105    return '-' + $1.toLowerCase();
1106  });
1107}
1108
1109var transitionProps = 'opacity,' + toDashedAll( transformProperty );
1110
1111proto.enableTransition = function(/* style */) {
1112  // HACK changing transitionProperty during a transition
1113  // will cause transition to jump
1114  if ( this.isTransitioning ) {
1115    return;
1116  }
1117
1118  // make `transition: foo, bar, baz` from style object
1119  // HACK un-comment this when enableTransition can work
1120  // while a transition is happening
1121  // var transitionValues = [];
1122  // for ( var prop in style ) {
1123  //   // dash-ify camelCased properties like WebkitTransition
1124  //   prop = vendorProperties[ prop ] || prop;
1125  //   transitionValues.push( toDashedAll( prop ) );
1126  // }
1127  // munge number to millisecond, to match stagger
1128  var duration = this.layout.options.transitionDuration;
1129  duration = typeof duration == 'number' ? duration + 'ms' : duration;
1130  // enable transition styles
1131  this.css({
1132    transitionProperty: transitionProps,
1133    transitionDuration: duration,
1134    transitionDelay: this.staggerDelay || 0
1135  });
1136  // listen for transition end event
1137  this.element.addEventListener( transitionEndEvent, this, false );
1138};
1139
1140// ----- events ----- //
1141
1142proto.onwebkitTransitionEnd = function( event ) {
1143  this.ontransitionend( event );
1144};
1145
1146proto.onotransitionend = function( event ) {
1147  this.ontransitionend( event );
1148};
1149
1150// properties that I munge to make my life easier
1151var dashedVendorProperties = {
1152  '-webkit-transform': 'transform'
1153};
1154
1155proto.ontransitionend = function( event ) {
1156  // disregard bubbled events from children
1157  if ( event.target !== this.element ) {
1158    return;
1159  }
1160  var _transition = this._transn;
1161  // get property name of transitioned property, convert to prefix-free
1162  var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
1163
1164  // remove property that has completed transitioning
1165  delete _transition.ingProperties[ propertyName ];
1166  // check if any properties are still transitioning
1167  if ( isEmptyObj( _transition.ingProperties ) ) {
1168    // all properties have completed transitioning
1169    this.disableTransition();
1170  }
1171  // clean style
1172  if ( propertyName in _transition.clean ) {
1173    // clean up style
1174    this.element.style[ event.propertyName ] = '';
1175    delete _transition.clean[ propertyName ];
1176  }
1177  // trigger onTransitionEnd callback
1178  if ( propertyName in _transition.onEnd ) {
1179    var onTransitionEnd = _transition.onEnd[ propertyName ];
1180    onTransitionEnd.call( this );
1181    delete _transition.onEnd[ propertyName ];
1182  }
1183
1184  this.emitEvent( 'transitionEnd', [ this ] );
1185};
1186
1187proto.disableTransition = function() {
1188  this.removeTransitionStyles();
1189  this.element.removeEventListener( transitionEndEvent, this, false );
1190  this.isTransitioning = false;
1191};
1192
1193/**
1194 * removes style property from element
1195 * @param {Object} style
1196**/
1197proto._removeStyles = function( style ) {
1198  // clean up transition styles
1199  var cleanStyle = {};
1200  for ( var prop in style ) {
1201    cleanStyle[ prop ] = '';
1202  }
1203  this.css( cleanStyle );
1204};
1205
1206var cleanTransitionStyle = {
1207  transitionProperty: '',
1208  transitionDuration: '',
1209  transitionDelay: ''
1210};
1211
1212proto.removeTransitionStyles = function() {
1213  // remove transition
1214  this.css( cleanTransitionStyle );
1215};
1216
1217// ----- stagger ----- //
1218
1219proto.stagger = function( delay ) {
1220  delay = isNaN( delay ) ? 0 : delay;
1221  this.staggerDelay = delay + 'ms';
1222};
1223
1224// ----- show/hide/remove ----- //
1225
1226// remove element from DOM
1227proto.removeElem = function() {
1228  this.element.parentNode.removeChild( this.element );
1229  // remove display: none
1230  this.css({ display: '' });
1231  this.emitEvent( 'remove', [ this ] );
1232};
1233
1234proto.remove = function() {
1235  // just remove element if no transition support or no transition
1236  if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
1237    this.removeElem();
1238    return;
1239  }
1240
1241  // start transition
1242  this.once( 'transitionEnd', function() {
1243    this.removeElem();
1244  });
1245  this.hide();
1246};
1247
1248proto.reveal = function() {
1249  delete this.isHidden;
1250  // remove display: none
1251  this.css({ display: '' });
1252
1253  var options = this.layout.options;
1254
1255  var onTransitionEnd = {};
1256  var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');
1257  onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;
1258
1259  this.transition({
1260    from: options.hiddenStyle,
1261    to: options.visibleStyle,
1262    isCleaning: true,
1263    onTransitionEnd: onTransitionEnd
1264  });
1265};
1266
1267proto.onRevealTransitionEnd = function() {
1268  // check if still visible
1269  // during transition, item may have been hidden
1270  if ( !this.isHidden ) {
1271    this.emitEvent('reveal');
1272  }
1273};
1274
1275/**
1276 * get style property use for hide/reveal transition end
1277 * @param {String} styleProperty - hiddenStyle/visibleStyle
1278 * @returns {String}
1279 */
1280proto.getHideRevealTransitionEndProperty = function( styleProperty ) {
1281  var optionStyle = this.layout.options[ styleProperty ];
1282  // use opacity
1283  if ( optionStyle.opacity ) {
1284    return 'opacity';
1285  }
1286  // get first property
1287  for ( var prop in optionStyle ) {
1288    return prop;
1289  }
1290};
1291
1292proto.hide = function() {
1293  // set flag
1294  this.isHidden = true;
1295  // remove display: none
1296  this.css({ display: '' });
1297
1298  var options = this.layout.options;
1299
1300  var onTransitionEnd = {};
1301  var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');
1302  onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;
1303
1304  this.transition({
1305    from: options.visibleStyle,
1306    to: options.hiddenStyle,
1307    // keep hidden stuff hidden
1308    isCleaning: true,
1309    onTransitionEnd: onTransitionEnd
1310  });
1311};
1312
1313proto.onHideTransitionEnd = function() {
1314  // check if still hidden
1315  // during transition, item may have been un-hidden
1316  if ( this.isHidden ) {
1317    this.css({ display: 'none' });
1318    this.emitEvent('hide');
1319  }
1320};
1321
1322proto.destroy = function() {
1323  this.css({
1324    position: '',
1325    left: '',
1326    right: '',
1327    top: '',
1328    bottom: '',
1329    transition: '',
1330    transform: ''
1331  });
1332};
1333
1334return Item;
1335
1336}));
1337
1338/*!
1339 * Outlayer v2.1.1
1340 * the brains and guts of a layout library
1341 * MIT license
1342 */
1343
1344( function( window, factory ) {
1345  'use strict';
1346  // universal module definition
1347  /* jshint strict: false */ /* globals define, module, require */
1348  if ( typeof define == 'function' && define.amd ) {
1349    // AMD - RequireJS
1350    define( 'outlayer/outlayer',[
1351        'ev-emitter/ev-emitter',
1352        'get-size/get-size',
1353        'fizzy-ui-utils/utils',
1354        './item'
1355      ],
1356      function( EvEmitter, getSize, utils, Item ) {
1357        return factory( window, EvEmitter, getSize, utils, Item);
1358      }
1359    );
1360  } else if ( typeof module == 'object' && module.exports ) {
1361    // CommonJS - Browserify, Webpack
1362    module.exports = factory(
1363      window,
1364      require('ev-emitter'),
1365      require('get-size'),
1366      require('fizzy-ui-utils'),
1367      require('./item')
1368    );
1369  } else {
1370    // browser global
1371    window.Outlayer = factory(
1372      window,
1373      window.EvEmitter,
1374      window.getSize,
1375      window.fizzyUIUtils,
1376      window.Outlayer.Item
1377    );
1378  }
1379
1380}( window, function factory( window, EvEmitter, getSize, utils, Item ) {
1381'use strict';
1382
1383// ----- vars ----- //
1384
1385var console = window.console;
1386var jQuery = window.jQuery;
1387var noop = function() {};
1388
1389// -------------------------- Outlayer -------------------------- //
1390
1391// globally unique identifiers
1392var GUID = 0;
1393// internal store of all Outlayer intances
1394var instances = {};
1395
1396
1397/**
1398 * @param {Element, String} element
1399 * @param {Object} options
1400 * @constructor
1401 */
1402function Outlayer( element, options ) {
1403  var queryElement = utils.getQueryElement( element );
1404  if ( !queryElement ) {
1405    if ( console ) {
1406      console.error( 'Bad element for ' + this.constructor.namespace +
1407        ': ' + ( queryElement || element ) );
1408    }
1409    return;
1410  }
1411  this.element = queryElement;
1412  // add jQuery
1413  if ( jQuery ) {
1414    this.$element = jQuery( this.element );
1415  }
1416
1417  // options
1418  this.options = utils.extend( {}, this.constructor.defaults );
1419  this.option( options );
1420
1421  // add id for Outlayer.getFromElement
1422  var id = ++GUID;
1423  this.element.outlayerGUID = id; // expando
1424  instances[ id ] = this; // associate via id
1425
1426  // kick it off
1427  this._create();
1428
1429  var isInitLayout = this._getOption('initLayout');
1430  if ( isInitLayout ) {
1431    this.layout();
1432  }
1433}
1434
1435// settings are for internal use only
1436Outlayer.namespace = 'outlayer';
1437Outlayer.Item = Item;
1438
1439// default options
1440Outlayer.defaults = {
1441  containerStyle: {
1442    position: 'relative'
1443  },
1444  initLayout: true,
1445  originLeft: true,
1446  originTop: true,
1447  resize: true,
1448  resizeContainer: true,
1449  // item options
1450  transitionDuration: '0.4s',
1451  hiddenStyle: {
1452    opacity: 0,
1453    transform: 'scale(0.001)'
1454  },
1455  visibleStyle: {
1456    opacity: 1,
1457    transform: 'scale(1)'
1458  }
1459};
1460
1461var proto = Outlayer.prototype;
1462// inherit EvEmitter
1463utils.extend( proto, EvEmitter.prototype );
1464
1465/**
1466 * set options
1467 * @param {Object} opts
1468 */
1469proto.option = function( opts ) {
1470  utils.extend( this.options, opts );
1471};
1472
1473/**
1474 * get backwards compatible option value, check old name
1475 */
1476proto._getOption = function( option ) {
1477  var oldOption = this.constructor.compatOptions[ option ];
1478  return oldOption && this.options[ oldOption ] !== undefined ?
1479    this.options[ oldOption ] : this.options[ option ];
1480};
1481
1482Outlayer.compatOptions = {
1483  // currentName: oldName
1484  initLayout: 'isInitLayout',
1485  horizontal: 'isHorizontal',
1486  layoutInstant: 'isLayoutInstant',
1487  originLeft: 'isOriginLeft',
1488  originTop: 'isOriginTop',
1489  resize: 'isResizeBound',
1490  resizeContainer: 'isResizingContainer'
1491};
1492
1493proto._create = function() {
1494  // get items from children
1495  this.reloadItems();
1496  // elements that affect layout, but are not laid out
1497  this.stamps = [];
1498  this.stamp( this.options.stamp );
1499  // set container style
1500  utils.extend( this.element.style, this.options.containerStyle );
1501
1502  // bind resize method
1503  var canBindResize = this._getOption('resize');
1504  if ( canBindResize ) {
1505    this.bindResize();
1506  }
1507};
1508
1509// goes through all children again and gets bricks in proper order
1510proto.reloadItems = function() {
1511  // collection of item elements
1512  this.items = this._itemize( this.element.children );
1513};
1514
1515
1516/**
1517 * turn elements into Outlayer.Items to be used in layout
1518 * @param {Array or NodeList or HTMLElement} elems
1519 * @returns {Array} items - collection of new Outlayer Items
1520 */
1521proto._itemize = function( elems ) {
1522
1523  var itemElems = this._filterFindItemElements( elems );
1524  var Item = this.constructor.Item;
1525
1526  // create new Outlayer Items for collection
1527  var items = [];
1528  for ( var i=0; i < itemElems.length; i++ ) {
1529    var elem = itemElems[i];
1530    var item = new Item( elem, this );
1531    items.push( item );
1532  }
1533
1534  return items;
1535};
1536
1537/**
1538 * get item elements to be used in layout
1539 * @param {Array or NodeList or HTMLElement} elems
1540 * @returns {Array} items - item elements
1541 */
1542proto._filterFindItemElements = function( elems ) {
1543  return utils.filterFindElements( elems, this.options.itemSelector );
1544};
1545
1546/**
1547 * getter method for getting item elements
1548 * @returns {Array} elems - collection of item elements
1549 */
1550proto.getItemElements = function() {
1551  return this.items.map( function( item ) {
1552    return item.element;
1553  });
1554};
1555
1556// ----- init & layout ----- //
1557
1558/**
1559 * lays out all items
1560 */
1561proto.layout = function() {
1562  this._resetLayout();
1563  this._manageStamps();
1564
1565  // don't animate first layout
1566  var layoutInstant = this._getOption('layoutInstant');
1567  var isInstant = layoutInstant !== undefined ?
1568    layoutInstant : !this._isLayoutInited;
1569  this.layoutItems( this.items, isInstant );
1570
1571  // flag for initalized
1572  this._isLayoutInited = true;
1573};
1574
1575// _init is alias for layout
1576proto._init = proto.layout;
1577
1578/**
1579 * logic before any new layout
1580 */
1581proto._resetLayout = function() {
vendor: 16,308 bytes, lines 1582-2279
1582  this.getSize();
1583};
1584
1585
1586proto.getSize = function() {
1587  this.size = getSize( this.element );
1588};
1589
1590/**
1591 * get measurement from option, for columnWidth, rowHeight, gutter
1592 * if option is String -> get element from selector string, & get size of element
1593 * if option is Element -> get size of element
1594 * else use option as a number
1595 *
1596 * @param {String} measurement
1597 * @param {String} size - width or height
1598 * @private
1599 */
1600proto._getMeasurement = function( measurement, size ) {
1601  var option = this.options[ measurement ];
1602  var elem;
1603  if ( !option ) {
1604    // default to 0
1605    this[ measurement ] = 0;
1606  } else {
1607    // use option as an element
1608    if ( typeof option == 'string' ) {
1609      elem = this.element.querySelector( option );
1610    } else if ( option instanceof HTMLElement ) {
1611      elem = option;
1612    }
1613    // use size of element, if element
1614    this[ measurement ] = elem ? getSize( elem )[ size ] : option;
1615  }
1616};
1617
1618/**
1619 * layout a collection of item elements
1620 * @api public
1621 */
1622proto.layoutItems = function( items, isInstant ) {
1623  items = this._getItemsForLayout( items );
1624
1625  this._layoutItems( items, isInstant );
1626
1627  this._postLayout();
1628};
1629
1630/**
1631 * get the items to be laid out
1632 * you may want to skip over some items
1633 * @param {Array} items
1634 * @returns {Array} items
1635 */
1636proto._getItemsForLayout = function( items ) {
1637  return items.filter( function( item ) {
1638    return !item.isIgnored;
1639  });
1640};
1641
1642/**
1643 * layout items
1644 * @param {Array} items
1645 * @param {Boolean} isInstant
1646 */
1647proto._layoutItems = function( items, isInstant ) {
1648  this._emitCompleteOnItems( 'layout', items );
1649
1650  if ( !items || !items.length ) {
1651    // no items, emit event with empty array
1652    return;
1653  }
1654
1655  var queue = [];
1656
1657  items.forEach( function( item ) {
1658    // get x/y object from method
1659    var position = this._getItemLayoutPosition( item );
1660    // enqueue
1661    position.item = item;
1662    position.isInstant = isInstant || item.isLayoutInstant;
1663    queue.push( position );
1664  }, this );
1665
1666  this._processLayoutQueue( queue );
1667};
1668
1669/**
1670 * get item layout position
1671 * @param {Outlayer.Item} item
1672 * @returns {Object} x and y position
1673 */
1674proto._getItemLayoutPosition = function( /* item */ ) {
1675  return {
1676    x: 0,
1677    y: 0
1678  };
1679};
1680
1681/**
1682 * iterate over array and position each item
1683 * Reason being - separating this logic prevents 'layout invalidation'
1684 * thx @paul_irish
1685 * @param {Array} queue
1686 */
1687proto._processLayoutQueue = function( queue ) {
1688  this.updateStagger();
1689  queue.forEach( function( obj, i ) {
1690    this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );
1691  }, this );
1692};
1693
1694// set stagger from option in milliseconds number
1695proto.updateStagger = function() {
1696  var stagger = this.options.stagger;
1697  if ( stagger === null || stagger === undefined ) {
1698    this.stagger = 0;
1699    return;
1700  }
1701  this.stagger = getMilliseconds( stagger );
1702  return this.stagger;
1703};
1704
1705/**
1706 * Sets position of item in DOM
1707 * @param {Outlayer.Item} item
1708 * @param {Number} x - horizontal position
1709 * @param {Number} y - vertical position
1710 * @param {Boolean} isInstant - disables transitions
1711 */
1712proto._positionItem = function( item, x, y, isInstant, i ) {
1713  if ( isInstant ) {
1714    // if not transition, just set CSS
1715    item.goTo( x, y );
1716  } else {
1717    item.stagger( i * this.stagger );
1718    item.moveTo( x, y );
1719  }
1720};
1721
1722/**
1723 * Any logic you want to do after each layout,
1724 * i.e. size the container
1725 */
1726proto._postLayout = function() {
1727  this.resizeContainer();
1728};
1729
1730proto.resizeContainer = function() {
1731  var isResizingContainer = this._getOption('resizeContainer');
1732  if ( !isResizingContainer ) {
1733    return;
1734  }
1735  var size = this._getContainerSize();
1736  if ( size ) {
1737    this._setContainerMeasure( size.width, true );
1738    this._setContainerMeasure( size.height, false );
1739  }
1740};
1741
1742/**
1743 * Sets width or height of container if returned
1744 * @returns {Object} size
1745 *   @param {Number} width
1746 *   @param {Number} height
1747 */
1748proto._getContainerSize = noop;
1749
1750/**
1751 * @param {Number} measure - size of width or height
1752 * @param {Boolean} isWidth
1753 */
1754proto._setContainerMeasure = function( measure, isWidth ) {
1755  if ( measure === undefined ) {
1756    return;
1757  }
1758
1759  var elemSize = this.size;
1760  // add padding and border width if border box
1761  if ( elemSize.isBorderBox ) {
1762    measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
1763      elemSize.borderLeftWidth + elemSize.borderRightWidth :
1764      elemSize.paddingBottom + elemSize.paddingTop +
1765      elemSize.borderTopWidth + elemSize.borderBottomWidth;
1766  }
1767
1768  measure = Math.max( measure, 0 );
1769  this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
1770};
1771
1772/**
1773 * emit eventComplete on a collection of items events
1774 * @param {String} eventName
1775 * @param {Array} items - Outlayer.Items
1776 */
1777proto._emitCompleteOnItems = function( eventName, items ) {
1778  var _this = this;
1779  function onComplete() {
1780    _this.dispatchEvent( eventName + 'Complete', null, [ items ] );
1781  }
1782
1783  var count = items.length;
1784  if ( !items || !count ) {
1785    onComplete();
1786    return;
1787  }
1788
1789  var doneCount = 0;
1790  function tick() {
1791    doneCount++;
1792    if ( doneCount == count ) {
1793      onComplete();
1794    }
1795  }
1796
1797  // bind callback
1798  items.forEach( function( item ) {
1799    item.once( eventName, tick );
1800  });
1801};
1802
1803/**
1804 * emits events via EvEmitter and jQuery events
1805 * @param {String} type - name of event
1806 * @param {Event} event - original event
1807 * @param {Array} args - extra arguments
1808 */
1809proto.dispatchEvent = function( type, event, args ) {
1810  // add original event to arguments
1811  var emitArgs = event ? [ event ].concat( args ) : args;
1812  this.emitEvent( type, emitArgs );
1813
1814  if ( jQuery ) {
1815    // set this.$element
1816    this.$element = this.$element || jQuery( this.element );
1817    if ( event ) {
1818      // create jQuery event
1819      var $event = jQuery.Event( event );
1820      $event.type = type;
1821      this.$element.trigger( $event, args );
1822    } else {
1823      // just trigger with type if no event available
1824      this.$element.trigger( type, args );
1825    }
1826  }
1827};
1828
1829// -------------------------- ignore & stamps -------------------------- //
1830
1831
1832/**
1833 * keep item in collection, but do not lay it out
1834 * ignored items do not get skipped in layout
1835 * @param {Element} elem
1836 */
1837proto.ignore = function( elem ) {
1838  var item = this.getItem( elem );
1839  if ( item ) {
1840    item.isIgnored = true;
1841  }
1842};
1843
1844/**
1845 * return item to layout collection
1846 * @param {Element} elem
1847 */
1848proto.unignore = function( elem ) {
1849  var item = this.getItem( elem );
1850  if ( item ) {
1851    delete item.isIgnored;
1852  }
1853};
1854
1855/**
1856 * adds elements to stamps
1857 * @param {NodeList, Array, Element, or String} elems
1858 */
1859proto.stamp = function( elems ) {
1860  elems = this._find( elems );
1861  if ( !elems ) {
1862    return;
1863  }
1864
1865  this.stamps = this.stamps.concat( elems );
1866  // ignore
1867  elems.forEach( this.ignore, this );
1868};
1869
1870/**
1871 * removes elements to stamps
1872 * @param {NodeList, Array, or Element} elems
1873 */
1874proto.unstamp = function( elems ) {
1875  elems = this._find( elems );
1876  if ( !elems ){
1877    return;
1878  }
1879
1880  elems.forEach( function( elem ) {
1881    // filter out removed stamp elements
1882    utils.removeFrom( this.stamps, elem );
1883    this.unignore( elem );
1884  }, this );
1885};
1886
1887/**
1888 * finds child elements
1889 * @param {NodeList, Array, Element, or String} elems
1890 * @returns {Array} elems
1891 */
1892proto._find = function( elems ) {
1893  if ( !elems ) {
1894    return;
1895  }
1896  // if string, use argument as selector string
1897  if ( typeof elems == 'string' ) {
1898    elems = this.element.querySelectorAll( elems );
1899  }
1900  elems = utils.makeArray( elems );
1901  return elems;
1902};
1903
1904proto._manageStamps = function() {
1905  if ( !this.stamps || !this.stamps.length ) {
1906    return;
1907  }
1908
1909  this._getBoundingRect();
1910
1911  this.stamps.forEach( this._manageStamp, this );
1912};
1913
1914// update boundingLeft / Top
1915proto._getBoundingRect = function() {
1916  // get bounding rect for container element
1917  var boundingRect = this.element.getBoundingClientRect();
1918  var size = this.size;
1919  this._boundingRect = {
1920    left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
1921    top: boundingRect.top + size.paddingTop + size.borderTopWidth,
1922    right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
1923    bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
1924  };
1925};
1926
1927/**
1928 * @param {Element} stamp
1929**/
1930proto._manageStamp = noop;
1931
1932/**
1933 * get x/y position of element relative to container element
1934 * @param {Element} elem
1935 * @returns {Object} offset - has left, top, right, bottom
1936 */
1937proto._getElementOffset = function( elem ) {
1938  var boundingRect = elem.getBoundingClientRect();
1939  var thisRect = this._boundingRect;
1940  var size = getSize( elem );
1941  var offset = {
1942    left: boundingRect.left - thisRect.left - size.marginLeft,
1943    top: boundingRect.top - thisRect.top - size.marginTop,
1944    right: thisRect.right - boundingRect.right - size.marginRight,
1945    bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
1946  };
1947  return offset;
1948};
1949
1950// -------------------------- resize -------------------------- //
1951
1952// enable event handlers for listeners
1953// i.e. resize -> onresize
1954proto.handleEvent = utils.handleEvent;
1955
1956/**
1957 * Bind layout to window resizing
1958 */
1959proto.bindResize = function() {
1960  window.addEventListener( 'resize', this );
1961  this.isResizeBound = true;
1962};
1963
1964/**
1965 * Unbind layout to window resizing
1966 */
1967proto.unbindResize = function() {
1968  window.removeEventListener( 'resize', this );
1969  this.isResizeBound = false;
1970};
1971
1972proto.onresize = function() {
1973  this.resize();
1974};
1975
1976utils.debounceMethod( Outlayer, 'onresize', 100 );
1977
1978proto.resize = function() {
1979  // don't trigger if size did not change
1980  // or if resize was unbound. See #9
1981  if ( !this.isResizeBound || !this.needsResizeLayout() ) {
1982    return;
1983  }
1984
1985  this.layout();
1986};
1987
1988/**
1989 * check if layout is needed post layout
1990 * @returns Boolean
1991 */
1992proto.needsResizeLayout = function() {
1993  var size = getSize( this.element );
1994  // check that this.size and size are there
1995  // IE8 triggers resize on body size change, so they might not be
1996  var hasSizes = this.size && size;
1997  return hasSizes && size.innerWidth !== this.size.innerWidth;
1998};
1999
2000// -------------------------- methods -------------------------- //
2001
2002/**
2003 * add items to Outlayer instance
2004 * @param {Array or NodeList or Element} elems
2005 * @returns {Array} items - Outlayer.Items
2006**/
2007proto.addItems = function( elems ) {
2008  var items = this._itemize( elems );
2009  // add items to collection
2010  if ( items.length ) {
2011    this.items = this.items.concat( items );
2012  }
2013  return items;
2014};
2015
2016/**
2017 * Layout newly-appended item elements
2018 * @param {Array or NodeList or Element} elems
2019 */
2020proto.appended = function( elems ) {
2021  var items = this.addItems( elems );
2022  if ( !items.length ) {
2023    return;
2024  }
2025  // layout and reveal just the new items
2026  this.layoutItems( items, true );
2027  this.reveal( items );
2028};
2029
2030/**
2031 * Layout prepended elements
2032 * @param {Array or NodeList or Element} elems
2033 */
2034proto.prepended = function( elems ) {
2035  var items = this._itemize( elems );
2036  if ( !items.length ) {
2037    return;
2038  }
2039  // add items to beginning of collection
2040  var previousItems = this.items.slice(0);
2041  this.items = items.concat( previousItems );
2042  // start new layout
2043  this._resetLayout();
2044  this._manageStamps();
2045  // layout new stuff without transition
2046  this.layoutItems( items, true );
2047  this.reveal( items );
2048  // layout previous items
2049  this.layoutItems( previousItems );
2050};
2051
2052/**
2053 * reveal a collection of items
2054 * @param {Array of Outlayer.Items} items
2055 */
2056proto.reveal = function( items ) {
2057  this._emitCompleteOnItems( 'reveal', items );
2058  if ( !items || !items.length ) {
2059    return;
2060  }
2061  var stagger = this.updateStagger();
2062  items.forEach( function( item, i ) {
2063    item.stagger( i * stagger );
2064    item.reveal();
2065  });
2066};
2067
2068/**
2069 * hide a collection of items
2070 * @param {Array of Outlayer.Items} items
2071 */
2072proto.hide = function( items ) {
2073  this._emitCompleteOnItems( 'hide', items );
2074  if ( !items || !items.length ) {
2075    return;
2076  }
2077  var stagger = this.updateStagger();
2078  items.forEach( function( item, i ) {
2079    item.stagger( i * stagger );
2080    item.hide();
2081  });
2082};
2083
2084/**
2085 * reveal item elements
2086 * @param {Array}, {Element}, {NodeList} items
2087 */
2088proto.revealItemElements = function( elems ) {
2089  var items = this.getItems( elems );
2090  this.reveal( items );
2091};
2092
2093/**
2094 * hide item elements
2095 * @param {Array}, {Element}, {NodeList} items
2096 */
2097proto.hideItemElements = function( elems ) {
2098  var items = this.getItems( elems );
2099  this.hide( items );
2100};
2101
2102/**
2103 * get Outlayer.Item, given an Element
2104 * @param {Element} elem
2105 * @param {Function} callback
2106 * @returns {Outlayer.Item} item
2107 */
2108proto.getItem = function( elem ) {
2109  // loop through items to get the one that matches
2110  for ( var i=0; i < this.items.length; i++ ) {
2111    var item = this.items[i];
2112    if ( item.element == elem ) {
2113      // return item
2114      return item;
2115    }
2116  }
2117};
2118
2119/**
2120 * get collection of Outlayer.Items, given Elements
2121 * @param {Array} elems
2122 * @returns {Array} items - Outlayer.Items
2123 */
2124proto.getItems = function( elems ) {
2125  elems = utils.makeArray( elems );
2126  var items = [];
2127  elems.forEach( function( elem ) {
2128    var item = this.getItem( elem );
2129    if ( item ) {
2130      items.push( item );
2131    }
2132  }, this );
2133
2134  return items;
2135};
2136
2137/**
2138 * remove element(s) from instance and DOM
2139 * @param {Array or NodeList or Element} elems
2140 */
2141proto.remove = function( elems ) {
2142  var removeItems = this.getItems( elems );
2143
2144  this._emitCompleteOnItems( 'remove', removeItems );
2145
2146  // bail if no items to remove
2147  if ( !removeItems || !removeItems.length ) {
2148    return;
2149  }
2150
2151  removeItems.forEach( function( item ) {
2152    item.remove();
2153    // remove item from collection
2154    utils.removeFrom( this.items, item );
2155  }, this );
2156};
2157
2158// ----- destroy ----- //
2159
2160// remove and disable Outlayer instance
2161proto.destroy = function() {
2162  // clean up dynamic styles
2163  var style = this.element.style;
2164  style.height = '';
2165  style.position = '';
2166  style.width = '';
2167  // destroy items
2168  this.items.forEach( function( item ) {
2169    item.destroy();
2170  });
2171
2172  this.unbindResize();
2173
2174  var id = this.element.outlayerGUID;
2175  delete instances[ id ]; // remove reference to instance by id
2176  delete this.element.outlayerGUID;
2177  // remove data for jQuery
2178  if ( jQuery ) {
2179    jQuery.removeData( this.element, this.constructor.namespace );
2180  }
2181
2182};
2183
2184// -------------------------- data -------------------------- //
2185
2186/**
2187 * get Outlayer instance from element
2188 * @param {Element} elem
2189 * @returns {Outlayer}
2190 */
2191Outlayer.data = function( elem ) {
2192  elem = utils.getQueryElement( elem );
2193  var id = elem && elem.outlayerGUID;
2194  return id && instances[ id ];
2195};
2196
2197
2198// -------------------------- create Outlayer class -------------------------- //
2199
2200/**
2201 * create a layout class
2202 * @param {String} namespace
2203 */
2204Outlayer.create = function( namespace, options ) {
2205  // sub-class Outlayer
2206  var Layout = subclass( Outlayer );
2207  // apply new options and compatOptions
2208  Layout.defaults = utils.extend( {}, Outlayer.defaults );
2209  utils.extend( Layout.defaults, options );
2210  Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions  );
2211
2212  Layout.namespace = namespace;
2213
2214  Layout.data = Outlayer.data;
2215
2216  // sub-class Item
2217  Layout.Item = subclass( Item );
2218
2219  // -------------------------- declarative -------------------------- //
2220
2221  utils.htmlInit( Layout, namespace );
2222
2223  // -------------------------- jQuery bridge -------------------------- //
2224
2225  // make into jQuery plugin
2226  if ( jQuery && jQuery.bridget ) {
2227    jQuery.bridget( namespace, Layout );
2228  }
2229
2230  return Layout;
2231};
2232
2233function subclass( Parent ) {
2234  function SubClass() {
2235    Parent.apply( this, arguments );
2236  }
2237
2238  SubClass.prototype = Object.create( Parent.prototype );
2239  SubClass.prototype.constructor = SubClass;
2240
2241  return SubClass;
2242}
2243
2244// ----- helpers ----- //
2245
2246// how many milliseconds are in each unit
2247var msUnits = {
2248  ms: 1,
2249  s: 1000
2250};
2251
2252// munge time-like parameter into millisecond number
2253// '0.4s' -> 40
2254function getMilliseconds( time ) {
2255  if ( typeof time == 'number' ) {
2256    return time;
2257  }
2258  var matches = time.match( /(^\d*\.?\d*)(\w*)/ );
2259  var num = matches && matches[1];
2260  var unit = matches && matches[2];
2261  if ( !num.length ) {
2262    return 0;
2263  }
2264  num = parseFloat( num );
2265  var mult = msUnits[ unit ] || 1;
2266  return num * mult;
2267}
2268
2269// ----- fin ----- //
2270
2271// back in global
2272Outlayer.Item = Item;
2273
2274return Outlayer;
2275
2276}));
2277
2278/**
2279 * 
vendor: 2,966 bytes, lines 2279-2404
2279Isotope Item
2280**/
2281
2282( function( window, factory ) {
2283  // universal module definition
2284  /* jshint strict: false */ /*globals define, module, require */
2285  if ( typeof define == 'function' && define.amd ) {
2286    // AMD
2287    define( 'isotope-layout/js/item',[
2288        'outlayer/outlayer'
2289      ],
2290      factory );
2291  } else if ( typeof module == 'object' && module.exports ) {
2292    // CommonJS
2293    module.exports = factory(
2294      require('outlayer')
2295    );
2296  } else {
2297    // browser global
2298    window.Isotope = window.Isotope || {};
2299    window.Isotope.Item = factory(
2300      window.Outlayer
2301    );
2302  }
2303
2304}( window, function factory( Outlayer ) {
2305'use strict';
2306
2307// -------------------------- Item -------------------------- //
2308
2309// sub-class Outlayer Item
2310function Item() {
2311  Outlayer.Item.apply( this, arguments );
2312}
2313
2314var proto = Item.prototype = Object.create( Outlayer.Item.prototype );
2315
2316var _create = proto._create;
2317proto._create = function() {
2318  // assign id, used for original-order sorting
2319  this.id = this.layout.itemGUID++;
2320  _create.call( this );
2321  this.sortData = {};
2322};
2323
2324proto.updateSortData = function() {
2325  if ( this.isIgnored ) {
2326    return;
2327  }
2328  // default sorters
2329  this.sortData.id = this.id;
2330  // for backward compatibility
2331  this.sortData['original-order'] = this.id;
2332  this.sortData.random = Math.random();
2333  // go thru getSortData obj and apply the sorters
2334  var getSortData = this.layout.options.getSortData;
2335  var sorters = this.layout._sorters;
2336  for ( var key in getSortData ) {
2337    var sorter = sorters[ key ];
2338    this.sortData[ key ] = sorter( this.element, this );
2339  }
2340};
2341
2342var _destroy = proto.destroy;
2343proto.destroy = function() {
2344  // call super
2345  _destroy.apply( this, arguments );
2346  // reset display, #741
2347  this.css({
2348    display: ''
2349  });
2350};
2351
2352return Item;
2353
2354}));
2355
2356/**
2357 * Isotope LayoutMode
2358 */
2359
2360( function( window, factory ) {
2361  // universal module definition
2362  /* jshint strict: false */ /*globals define, module, require */
2363  if ( typeof define == 'function' && define.amd ) {
2364    // AMD
2365    define( 'isotope-layout/js/layout-mode',[
2366        'get-size/get-size',
2367        'outlayer/outlayer'
2368      ],
2369      factory );
2370  } else if ( typeof module == 'object' && module.exports ) {
2371    // CommonJS
2372    module.exports = factory(
2373      require('get-size'),
2374      require('outlayer')
2375    );
2376  } else {
2377    // browser global
2378    window.Isotope = window.Isotope || {};
2379    window.Isotope.LayoutMode = factory(
2380      window.getSize,
2381      window.Outlayer
2382    );
2383  }
2384
2385}( window, function factory( getSize, Outlayer ) {
2386  'use strict';
2387
2388  // layout mode class
2389  function LayoutMode( isotope ) {
2390    this.isotope = isotope;
2391    // link properties
2392    if ( isotope ) {
2393      this.options = isotope.options[ this.namespace ];
2394      this.element = isotope.element;
2395      this.items = isotope.filteredItems;
2396      this.size = isotope.size;
2397    }
2398  }
2399
2400  var proto = LayoutMode.prototype;
2401
2402  /**
2403   * some methods should just defer to default Outlayer method
2404
vendor: 32,512 bytes, lines 2405-3576
2405
2406   * and reference the Isotope instance as `this`
2407  **/
2408  var facadeMethods = [
2409    '_resetLayout',
2410    '_getItemLayoutPosition',
2411    '_manageStamp',
2412    '_getContainerSize',
2413    '_getElementOffset',
2414    'needsResizeLayout',
2415    '_getOption'
2416  ];
2417
2418  facadeMethods.forEach( function( methodName ) {
2419    proto[ methodName ] = function() {
2420      return Outlayer.prototype[ methodName ].apply( this.isotope, arguments );
2421    };
2422  });
2423
2424  // -----  ----- //
2425
2426  // for horizontal layout modes, check vertical size
2427  proto.needsVerticalResizeLayout = function() {
2428    // don't trigger if size did not change
2429    var size = getSize( this.isotope.element );
2430    // check that this.size and size are there
2431    // IE8 triggers resize on body size change, so they might not be
2432    var hasSizes = this.isotope.size && size;
2433    return hasSizes && size.innerHeight != this.isotope.size.innerHeight;
2434  };
2435
2436  // ----- measurements ----- //
2437
2438  proto._getMeasurement = function() {
2439    this.isotope._getMeasurement.apply( this, arguments );
2440  };
2441
2442  proto.getColumnWidth = function() {
2443    this.getSegmentSize( 'column', 'Width' );
2444  };
2445
2446  proto.getRowHeight = function() {
2447    this.getSegmentSize( 'row', 'Height' );
2448  };
2449
2450  /**
2451   * get columnWidth or rowHeight
2452   * segment: 'column' or 'row'
2453   * size 'Width' or 'Height'
2454  **/
2455  proto.getSegmentSize = function( segment, size ) {
2456    var segmentName = segment + size;
2457    var outerSize = 'outer' + size;
2458    // columnWidth / outerWidth // rowHeight / outerHeight
2459    this._getMeasurement( segmentName, outerSize );
2460    // got rowHeight or columnWidth, we can chill
2461    if ( this[ segmentName ] ) {
2462      return;
2463    }
2464    // fall back to item of first element
2465    var firstItemSize = this.getFirstItemSize();
2466    this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] ||
2467      // or size of container
2468      this.isotope.size[ 'inner' + size ];
2469  };
2470
2471  proto.getFirstItemSize = function() {
2472    var firstItem = this.isotope.filteredItems[0];
2473    return firstItem && firstItem.element && getSize( firstItem.element );
2474  };
2475
2476  // ----- methods that should reference isotope ----- //
2477
2478  proto.layout = function() {
2479    this.isotope.layout.apply( this.isotope, arguments );
2480  };
2481
2482  proto.getSize = function() {
2483    this.isotope.getSize();
2484    this.size = this.isotope.size;
2485  };
2486
2487  // -------------------------- create -------------------------- //
2488
2489  LayoutMode.modes = {};
2490
2491  LayoutMode.create = function( namespace, options ) {
2492
2493    function Mode() {
2494      LayoutMode.apply( this, arguments );
2495    }
2496
2497    Mode.prototype = Object.create( proto );
2498    Mode.prototype.constructor = Mode;
2499
2500    // default options
2501    if ( options ) {
2502      Mode.options = options;
2503    }
2504
2505    Mode.prototype.namespace = namespace;
2506    // register in Isotope
2507    LayoutMode.modes[ namespace ] = Mode;
2508
2509    return Mode;
2510  };
2511
2512  return LayoutMode;
2513
2514}));
2515
2516/*!
2517 * Masonry v4.2.1
2518 * Cascading grid layout library
2519 * https://masonry.desandro.com
2520 * MIT License
2521 * by David DeSandro
2522 */
2523
2524( function( window, factory ) {
2525  // universal module definition
2526  /* jshint strict: false */ /*globals define, module, require */
2527  if ( typeof define == 'function' && define.amd ) {
2528    // AMD
2529    define( 'masonry-layout/masonry',[
2530        'outlayer/outlayer',
2531        'get-size/get-size'
2532      ],
2533      factory );
2534  } else if ( typeof module == 'object' && module.exports ) {
2535    // CommonJS
2536    module.exports = factory(
2537      require('outlayer'),
2538      require('get-size')
2539    );
2540  } else {
2541    // browser global
2542    window.Masonry = factory(
2543      window.Outlayer,
2544      window.getSize
2545    );
2546  }
2547
2548}( window, function factory( Outlayer, getSize ) {
2549
2550
2551
2552// -------------------------- masonryDefinition -------------------------- //
2553
2554  // create an Outlayer layout class
2555  var Masonry = Outlayer.create('masonry');
2556  // isFitWidth -> fitWidth
2557  Masonry.compatOptions.fitWidth = 'isFitWidth';
2558
2559  var proto = Masonry.prototype;
2560
2561  proto._resetLayout = function() {
2562    this.getSize();
2563    this._getMeasurement( 'columnWidth', 'outerWidth' );
2564    this._getMeasurement( 'gutter', 'outerWidth' );
2565    this.measureColumns();
2566
2567    // reset column Y
2568    this.colYs = [];
2569    for ( var i=0; i < this.cols; i++ ) {
2570      this.colYs.push( 0 );
2571    }
2572
2573    this.maxY = 0;
2574    this.horizontalColIndex = 0;
2575  };
2576
2577  proto.measureColumns = function() {
2578    this.getContainerWidth();
2579    // if columnWidth is 0, default to outerWidth of first item
2580    if ( !this.columnWidth ) {
2581      var firstItem = this.items[0];
2582      var firstItemElem = firstItem && firstItem.element;
2583      // columnWidth fall back to item of first element
2584      this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
2585        // if first elem has no width, default to size of container
2586        this.containerWidth;
2587    }
2588
2589    var columnWidth = this.columnWidth += this.gutter;
2590
2591    // calculate columns
2592    var containerWidth = this.containerWidth + this.gutter;
2593    var cols = containerWidth / columnWidth;
2594    // fix rounding errors, typically with gutters
2595    var excess = columnWidth - containerWidth % columnWidth;
2596    // if overshoot is less than a pixel, round up, otherwise floor it
2597    var mathMethod = excess && excess < 1 ? 'round' : 'floor';
2598    cols = Math[ mathMethod ]( cols );
2599    this.cols = Math.max( cols, 1 );
2600  };
2601
2602  proto.getContainerWidth = function() {
2603    // container is parent if fit width
2604    var isFitWidth = this._getOption('fitWidth');
2605    var container = isFitWidth ? this.element.parentNode : this.element;
2606    // check that this.size and size are there
2607    // IE8 triggers resize on body size change, so they might not be
2608    var size = getSize( container );
2609    this.containerWidth = size && size.innerWidth;
2610  };
2611
2612  proto._getItemLayoutPosition = function( item ) {
2613    item.getSize();
2614    // how many columns does this brick span
2615    var remainder = item.size.outerWidth % this.columnWidth;
2616    var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
2617    // round if off by 1 pixel, otherwise use ceil
2618    var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
2619    colSpan = Math.min( colSpan, this.cols );
2620    // use horizontal or top column position
2621    var colPosMethod = this.options.horizontalOrder ?
2622      '_getHorizontalColPosition' : '_getTopColPosition';
2623    var colPosition = this[ colPosMethod ]( colSpan, item );
2624    // position the brick
2625    var position = {
2626      x: this.columnWidth * colPosition.col,
2627      y: colPosition.y
2628    };
2629    // apply setHeight to necessary columns
2630    var setHeight = colPosition.y + item.size.outerHeight;
2631    var setMax = colSpan + colPosition.col;
2632    for ( var i = colPosition.col; i < setMax; i++ ) {
2633      this.colYs[i] = setHeight;
2634    }
2635
2636    return position;
2637  };
2638
2639  proto._getTopColPosition = function( colSpan ) {
2640    var colGroup = this._getTopColGroup( colSpan );
2641    // get the minimum Y value from the columns
2642    var minimumY = Math.min.apply( Math, colGroup );
2643
2644    return {
2645      col: colGroup.indexOf( minimumY ),
2646      y: minimumY,
2647    };
2648  };
2649
2650  /**
2651   * @param {Number} colSpan - number of columns the element spans
2652   * @returns {Array} colGroup
2653   */
2654  proto._getTopColGroup = function( colSpan ) {
2655    if ( colSpan < 2 ) {
2656      // if brick spans only one column, use all the column Ys
2657      return this.colYs;
2658    }
2659
2660    var colGroup = [];
2661    // how many different places could this brick fit horizontally
2662    var groupCount = this.cols + 1 - colSpan;
2663    // for each group potential horizontal position
2664    for ( var i = 0; i < groupCount; i++ ) {
2665      colGroup[i] = this._getColGroupY( i, colSpan );
2666    }
2667    return colGroup;
2668  };
2669
2670  proto._getColGroupY = function( col, colSpan ) {
2671    if ( colSpan < 2 ) {
2672      return this.colYs[ col ];
2673    }
2674    // make an array of colY values for that one group
2675    var groupColYs = this.colYs.slice( col, col + colSpan );
2676    // and get the max value of the array
2677    return Math.max.apply( Math, groupColYs );
2678  };
2679
2680  // get column position based on horizontal index. #873
2681  proto._getHorizontalColPosition = function( colSpan, item ) {
2682    var col = this.horizontalColIndex % this.cols;
2683    var isOver = colSpan > 1 && col + colSpan > this.cols;
2684    // shift to next row if item can't fit on current row
2685    col = isOver ? 0 : col;
2686    // don't let zero-size items take up space
2687    var hasSize = item.size.outerWidth && item.size.outerHeight;
2688    this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;
2689
2690    return {
2691      col: col,
2692      y: this._getColGroupY( col, colSpan ),
2693    };
2694  };
2695
2696  proto._manageStamp = function( stamp ) {
2697    var stampSize = getSize( stamp );
2698    var offset = this._getElementOffset( stamp );
2699    // get the columns that this stamp affects
2700    var isOriginLeft = this._getOption('originLeft');
2701    var firstX = isOriginLeft ? offset.left : offset.right;
2702    var lastX = firstX + stampSize.outerWidth;
2703    var firstCol = Math.floor( firstX / this.columnWidth );
2704    firstCol = Math.max( 0, firstCol );
2705    var lastCol = Math.floor( lastX / this.columnWidth );
2706    // lastCol should not go over if multiple of columnWidth #425
2707    lastCol -= lastX % this.columnWidth ? 0 : 1;
2708    lastCol = Math.min( this.cols - 1, lastCol );
2709    // set colYs to bottom of the stamp
2710
2711    var isOriginTop = this._getOption('originTop');
2712    var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +
2713      stampSize.outerHeight;
2714    for ( var i = firstCol; i <= lastCol; i++ ) {
2715      this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
2716    }
2717  };
2718
2719  proto._getContainerSize = function() {
2720    this.maxY = Math.max.apply( Math, this.colYs );
2721    var size = {
2722      height: this.maxY
2723    };
2724
2725    if ( this._getOption('fitWidth') ) {
2726      size.width = this._getContainerFitWidth();
2727    }
2728
2729    return size;
2730  };
2731
2732  proto._getContainerFitWidth = function() {
2733    var unusedCols = 0;
2734    // count unused columns
2735    var i = this.cols;
2736    while ( --i ) {
2737      if ( this.colYs[i] !== 0 ) {
2738        break;
2739      }
2740      unusedCols++;
2741    }
2742    // fit container to columns that have been used
2743    return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
2744  };
2745
2746  proto.needsResizeLayout = function() {
2747    var previousWidth = this.containerWidth;
2748    this.getContainerWidth();
2749    return previousWidth != this.containerWidth;
2750  };
2751
2752  return Masonry;
2753
2754}));
2755
2756/*!
2757 * Masonry layout mode
2758 * sub-classes Masonry
2759 * https://masonry.desandro.com
2760 */
2761
2762( function( window, factory ) {
2763  // universal module definition
2764  /* jshint strict: false */ /*globals define, module, require */
2765  if ( typeof define == 'function' && define.amd ) {
2766    // AMD
2767    define( 'isotope-layout/js/layout-modes/masonry',[
2768        '../layout-mode',
2769        'masonry-layout/masonry'
2770      ],
2771      factory );
2772  } else if ( typeof module == 'object' && module.exports ) {
2773    // CommonJS
2774    module.exports = factory(
2775      require('../layout-mode'),
2776      require('masonry-layout')
2777    );
2778  } else {
2779    // browser global
2780    factory(
2781      window.Isotope.LayoutMode,
2782      window.Masonry
2783    );
2784  }
2785
2786}( window, function factory( LayoutMode, Masonry ) {
2787'use strict';
2788
2789// -------------------------- masonryDefinition -------------------------- //
2790
2791  // create an Outlayer layout class
2792  var MasonryMode = LayoutMode.create('masonry');
2793
2794  var proto = MasonryMode.prototype;
2795
2796  var keepModeMethods = {
2797    _getElementOffset: true,
2798    layout: true,
2799    _getMeasurement: true
2800  };
2801
2802  // inherit Masonry prototype
2803  for ( var method in Masonry.prototype ) {
2804    // do not inherit mode methods
2805    if ( !keepModeMethods[ method ] ) {
2806      proto[ method ] = Masonry.prototype[ method ];
2807    }
2808  }
2809
2810  var measureColumns = proto.measureColumns;
2811  proto.measureColumns = function() {
2812    // set items, used if measuring first item
2813    this.items = this.isotope.filteredItems;
2814    measureColumns.call( this );
2815  };
2816
2817  // point to mode options for fitWidth
2818  var _getOption = proto._getOption;
2819  proto._getOption = function( option ) {
2820    if ( option == 'fitWidth' ) {
2821      return this.options.isFitWidth !== undefined ?
2822        this.options.isFitWidth : this.options.fitWidth;
2823    }
2824    return _getOption.apply( this.isotope, arguments );
2825  };
2826
2827  return MasonryMode;
2828
2829}));
2830
2831/**
2832 * fitRows layout mode
2833 */
2834
2835( function( window, factory ) {
2836  // universal module definition
2837  /* jshint strict: false */ /*globals define, module, require */
2838  if ( typeof define == 'function' && define.amd ) {
2839    // AMD
2840    define( 'isotope-layout/js/layout-modes/fit-rows',[
2841        '../layout-mode'
2842      ],
2843      factory );
2844  } else if ( typeof exports == 'object' ) {
2845    // CommonJS
2846    module.exports = factory(
2847      require('../layout-mode')
2848    );
2849  } else {
2850    // browser global
2851    factory(
2852      window.Isotope.LayoutMode
2853    );
2854  }
2855
2856}( window, function factory( LayoutMode ) {
2857'use strict';
2858
2859var FitRows = LayoutMode.create('fitRows');
2860
2861var proto = FitRows.prototype;
2862
2863proto._resetLayout = function() {
2864  this.x = 0;
2865  this.y = 0;
2866  this.maxY = 0;
2867  this._getMeasurement( 'gutter', 'outerWidth' );
2868};
2869
2870proto._getItemLayoutPosition = function( item ) {
2871  item.getSize();
2872
2873  var itemWidth = item.size.outerWidth + this.gutter;
2874  // if this element cannot fit in the current row
2875  var containerWidth = this.isotope.size.innerWidth + this.gutter;
2876  if ( this.x !== 0 && itemWidth + this.x > containerWidth ) {
2877    this.x = 0;
2878    this.y = this.maxY;
2879  }
2880
2881  var position = {
2882    x: this.x,
2883    y: this.y
2884  };
2885
2886  this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );
2887  this.x += itemWidth;
2888
2889  return position;
2890};
2891
2892proto._getContainerSize = function() {
2893  return { height: this.maxY };
2894};
2895
2896return FitRows;
2897
2898}));
2899
2900/**
2901 * vertical layout mode
2902 */
2903
2904( function( window, factory ) {
2905  // universal module definition
2906  /* jshint strict: false */ /*globals define, module, require */
2907  if ( typeof define == 'function' && define.amd ) {
2908    // AMD
2909    define( 'isotope-layout/js/layout-modes/vertical',[
2910        '../layout-mode'
2911      ],
2912      factory );
2913  } else if ( typeof module == 'object' && module.exports ) {
2914    // CommonJS
2915    module.exports = factory(
2916      require('../layout-mode')
2917    );
2918  } else {
2919    // browser global
2920    factory(
2921      window.Isotope.LayoutMode
2922    );
2923  }
2924
2925}( window, function factory( LayoutMode ) {
2926'use strict';
2927
2928var Vertical = LayoutMode.create( 'vertical', {
2929  horizontalAlignment: 0
2930});
2931
2932var proto = Vertical.prototype;
2933
2934proto._resetLayout = function() {
2935  this.y = 0;
2936};
2937
2938proto._getItemLayoutPosition = function( item ) {
2939  item.getSize();
2940  var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) *
2941    this.options.horizontalAlignment;
2942  var y = this.y;
2943  this.y += item.size.outerHeight;
2944  return { x: x, y: y };
2945};
2946
2947proto._getContainerSize = function() {
2948  return { height: this.y };
2949};
2950
2951return Vertical;
2952
2953}));
2954
2955/*!
2956 * Isotope v3.0.6
2957 *
2958 * Licensed GPLv3 for open source use
2959 * or Isotope Commercial License for commercial use
2960 *
2961 * https://isotope.metafizzy.co
2962 * Copyright 2010-2018 Metafizzy
2963 */
2964
2965( function( window, factory ) {
2966  // universal module definition
2967  /* jshint strict: false */ /*globals define, module, require */
2968  if ( typeof define == 'function' && define.amd ) {
2969    // AMD
2970    define( [
2971        'outlayer/outlayer',
2972        'get-size/get-size',
2973        'desandro-matches-selector/matches-selector',
2974        'fizzy-ui-utils/utils',
2975        'isotope-layout/js/item',
2976        'isotope-layout/js/layout-mode',
2977        // include default layout modes
2978        'isotope-layout/js/layout-modes/masonry',
2979        'isotope-layout/js/layout-modes/fit-rows',
2980        'isotope-layout/js/layout-modes/vertical'
2981      ],
2982      function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {
2983        return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );
2984      });
2985  } else if ( typeof module == 'object' && module.exports ) {
2986    // CommonJS
2987    module.exports = factory(
2988      window,
2989      require('outlayer'),
2990      require('get-size'),
2991      require('desandro-matches-selector'),
2992      require('fizzy-ui-utils'),
2993      require('isotope-layout/js/item'),
2994      require('isotope-layout/js/layout-mode'),
2995      // include default layout modes
2996      require('isotope-layout/js/layout-modes/masonry'),
2997      require('isotope-layout/js/layout-modes/fit-rows'),
2998      require('isotope-layout/js/layout-modes/vertical')
2999    );
3000  } else {
3001    // browser global
3002    window.Isotope = factory(
3003      window,
3004      window.Outlayer,
3005      window.getSize,
3006      window.matchesSelector,
3007      window.fizzyUIUtils,
3008      window.Isotope.Item,
3009      window.Isotope.LayoutMode
3010    );
3011  }
3012
3013}( window, function factory( window, Outlayer, getSize, matchesSelector, utils,
3014  Item, LayoutMode ) {
3015
3016
3017
3018// -------------------------- vars -------------------------- //
3019
3020var jQuery = window.jQuery;
3021
3022// -------------------------- helpers -------------------------- //
3023
3024var trim = String.prototype.trim ?
3025  function( str ) {
3026    return str.trim();
3027  } :
3028  function( str ) {
3029    return str.replace( /^\s+|\s+$/g, '' );
3030  };
3031
3032// -------------------------- isotopeDefinition -------------------------- //
3033
3034  // create an Outlayer layout class
3035  var Isotope = Outlayer.create( 'isotope', {
3036    layoutMode: 'masonry',
3037    isJQueryFiltering: true,
3038    sortAscending: true
3039  });
3040
3041  Isotope.Item = Item;
3042  Isotope.LayoutMode = LayoutMode;
3043
3044  var proto = Isotope.prototype;
3045
3046  proto._create = function() {
3047    this.itemGUID = 0;
3048    // functions that sort items
3049    this._sorters = {};
3050    this._getSorters();
3051    // call super
3052    Outlayer.prototype._create.call( this );
3053
3054    // create layout modes
3055    this.modes = {};
3056    // start filteredItems with all items
3057    this.filteredItems = this.items;
3058    // keep of track of sortBys
3059    this.sortHistory = [ 'original-order' ];
3060    // create from registered layout modes
3061    for ( var name in LayoutMode.modes ) {
3062      this._initLayoutMode( name );
3063    }
3064  };
3065
3066  proto.reloadItems = function() {
3067    // reset item ID counter
3068    this.itemGUID = 0;
3069    // call super
3070    Outlayer.prototype.reloadItems.call( this );
3071  };
3072
3073  proto._itemize = function() {
3074    var items = Outlayer.prototype._itemize.apply( this, arguments );
3075    // assign ID for original-order
3076    for ( var i=0; i < items.length; i++ ) {
3077      var item = items[i];
3078      item.id = this.itemGUID++;
3079    }
3080    this._updateItemsSortData( items );
3081    return items;
3082  };
3083
3084
3085  // -------------------------- layout -------------------------- //
3086
3087  proto._initLayoutMode = function( name ) {
3088    var Mode = LayoutMode.modes[ name ];
3089    // set mode options
3090    // HACK extend initial options, back-fill in default options
3091    var initialOpts = this.options[ name ] || {};
3092    this.options[ name ] = Mode.options ?
3093      utils.extend( Mode.options, initialOpts ) : initialOpts;
3094    // init layout mode instance
3095    this.modes[ name ] = new Mode( this );
3096  };
3097
3098
3099  proto.layout = function() {
3100    // if first time doing layout, do all magic
3101    if ( !this._isLayoutInited && this._getOption('initLayout') ) {
3102      this.arrange();
3103      return;
3104    }
3105    this._layout();
3106  };
3107
3108  // private method to be used in layout() & magic()
3109  proto._layout = function() {
3110    // don't animate first layout
3111    var isInstant = this._getIsInstant();
3112    // layout flow
3113    this._resetLayout();
3114    this._manageStamps();
3115    this.layoutItems( this.filteredItems, isInstant );
3116
3117    // flag for initalized
3118    this._isLayoutInited = true;
3119  };
3120
3121  // filter + sort + layout
3122  proto.arrange = function( opts ) {
3123    // set any options pass
3124    this.option( opts );
3125    this._getIsInstant();
3126    // filter, sort, and layout
3127
3128    // filter
3129    var filtered = this._filter( this.items );
3130    this.filteredItems = filtered.matches;
3131
3132    this._bindArrangeComplete();
3133
3134    if ( this._isInstant ) {
3135      this._noTransition( this._hideReveal, [ filtered ] );
3136    } else {
3137      this._hideReveal( filtered );
3138    }
3139
3140    this._sort();
3141    this._layout();
3142  };
3143  // alias to _init for main plugin method
3144  proto._init = proto.arrange;
3145
3146  proto._hideReveal = function( filtered ) {
3147    this.reveal( filtered.needReveal );
3148    this.hide( filtered.needHide );
3149  };
3150
3151  // HACK
3152  // Don't animate/transition first layout
3153  // Or don't animate/transition other layouts
3154  proto._getIsInstant = function() {
3155    var isLayoutInstant = this._getOption('layoutInstant');
3156    var isInstant = isLayoutInstant !== undefined ? isLayoutInstant :
3157      !this._isLayoutInited;
3158    this._isInstant = isInstant;
3159    return isInstant;
3160  };
3161
3162  // listen for layoutComplete, hideComplete and revealComplete
3163  // to trigger arrangeComplete
3164  proto._bindArrangeComplete = function() {
3165    // listen for 3 events to trigger arrangeComplete
3166    var isLayoutComplete, isHideComplete, isRevealComplete;
3167    var _this = this;
3168    function arrangeParallelCallback() {
3169      if ( isLayoutComplete && isHideComplete && isRevealComplete ) {
3170        _this.dispatchEvent( 'arrangeComplete', null, [ _this.filteredItems ] );
3171      }
3172    }
3173    this.once( 'layoutComplete', function() {
3174      isLayoutComplete = true;
3175      arrangeParallelCallback();
3176    });
3177    this.once( 'hideComplete', function() {
3178      isHideComplete = true;
3179      arrangeParallelCallback();
3180    });
3181    this.once( 'revealComplete', function() {
3182      isRevealComplete = true;
3183      arrangeParallelCallback();
3184    });
3185  };
3186
3187  // -------------------------- filter -------------------------- //
3188
3189  proto._filter = function( items ) {
3190    var filter = this.options.filter;
3191    filter = filter || '*';
3192    var matches = [];
3193    var hiddenMatched = [];
3194    var visibleUnmatched = [];
3195
3196    var test = this._getFilterTest( filter );
3197
3198    // test each item
3199    for ( var i=0; i < items.length; i++ ) {
3200      var item = items[i];
3201      if ( item.isIgnored ) {
3202        continue;
3203      }
3204      // add item to either matched or unmatched group
3205      var isMatched = test( item );
3206      // item.isFilterMatched = isMatched;
3207      // add to matches if its a match
3208      if ( isMatched ) {
3209        matches.push( item );
3210      }
3211      // add to additional group if item needs to be hidden or revealed
3212      if ( isMatched && item.isHidden ) {
3213        hiddenMatched.push( item );
3214      } else if ( !isMatched && !item.isHidden ) {
3215        visibleUnmatched.push( item );
3216      }
3217    }
3218
3219    // return collections of items to be manipulated
3220    return {
3221      matches: matches,
3222      needReveal: hiddenMatched,
3223      needHide: visibleUnmatched
3224    };
3225  };
3226
3227  // get a jQuery, function, or a matchesSelector test given the filter
3228  proto._getFilterTest = function( filter ) {
3229    if ( jQuery && this.options.isJQueryFiltering ) {
3230      // use jQuery
3231      return function( item ) {
3232        return jQuery( item.element ).is( filter );
3233      };
3234    }
3235    if ( typeof filter == 'function' ) {
3236      // use filter as function
3237      return function( item ) {
3238        return filter( item.element );
3239      };
3240    }
3241    // default, use filter as selector string
3242    return function( item ) {
3243      return matchesSelector( item.element, filter );
3244    };
3245  };
3246
3247  // -------------------------- sorting -------------------------- //
3248
3249  /**
3250   * @params {Array} elems
3251   * @public
3252   */
3253  proto.updateSortData = function( elems ) {
3254    // get items
3255    var items;
3256    if ( elems ) {
3257      elems = utils.makeArray( elems );
3258      items = this.getItems( elems );
3259    } else {
3260      // update all items if no elems provided
3261      items = this.items;
3262    }
3263
3264    this._getSorters();
3265    this._updateItemsSortData( items );
3266  };
3267
3268  proto._getSorters = function() {
3269    var getSortData = this.options.getSortData;
3270    for ( var key in getSortData ) {
3271      var sorter = getSortData[ key ];
3272      this._sorters[ key ] = mungeSorter( sorter );
3273    }
3274  };
3275
3276  /**
3277   * @params {Array} items - of Isotope.Items
3278   * @private
3279   */
3280  proto._updateItemsSortData = function( items ) {
3281    // do not update if no items
3282    var len = items && items.length;
3283
3284    for ( var i=0; len && i < len; i++ ) {
3285      var item = items[i];
3286      item.updateSortData();
3287    }
3288  };
3289
3290  // ----- munge sorter ----- //
3291
3292  // encapsulate this, as we just need mungeSorter
3293  // other functions in here are just for munging
3294  var mungeSorter = ( function() {
3295    // add a magic layer to sorters for convienent shorthands
3296    // `.foo-bar` will use the text of .foo-bar querySelector
3297    // `[foo-bar]` will use attribute
3298    // you can also add parser
3299    // `.foo-bar parseInt` will parse that as a number
3300    function mungeSorter( sorter ) {
3301      // if not a string, return function or whatever it is
3302      if ( typeof sorter != 'string' ) {
3303        return sorter;
3304      }
3305      // parse the sorter string
3306      var args = trim( sorter ).split(' ');
3307      var query = args[0];
3308      // check if query looks like [an-attribute]
3309      var attrMatch = query.match( /^\[(.+)\]$/ );
3310      var attr = attrMatch && attrMatch[1];
3311      var getValue = getValueGetter( attr, query );
3312      // use second argument as a parser
3313      var parser = Isotope.sortDataParsers[ args[1] ];
3314      // parse the value, if there was a parser
3315      sorter = parser ? function( elem ) {
3316        return elem && parser( getValue( elem ) );
3317      } :
3318      // otherwise just return value
3319      function( elem ) {
3320        return elem && getValue( elem );
3321      };
3322
3323      return sorter;
3324    }
3325
3326    // get an attribute getter, or get text of the querySelector
3327    function getValueGetter( attr, query ) {
3328      // if query looks like [foo-bar], get attribute
3329      if ( attr ) {
3330        return function getAttribute( elem ) {
3331          return elem.getAttribute( attr );
3332        };
3333      }
3334
3335      // otherwise, assume its a querySelector, and get its text
3336      return function getChildText( elem ) {
3337        var child = elem.querySelector( query );
3338        return child && child.textContent;
3339      };
3340    }
3341
3342    return mungeSorter;
3343  })();
3344
3345  // parsers used in getSortData shortcut strings
3346  Isotope.sortDataParsers = {
3347    'parseInt': function( val ) {
3348      return parseInt( val, 10 );
3349    },
3350    'parseFloat': function( val ) {
3351      return parseFloat( val );
3352    }
3353  };
3354
3355  // ----- sort method ----- //
3356
3357  // sort filteredItem order
3358  proto._sort = function() {
3359    if ( !this.options.sortBy ) {
3360      return;
3361    }
3362    // keep track of sortBy History
3363    var sortBys = utils.makeArray( this.options.sortBy );
3364    if ( !this._getIsSameSortBy( sortBys ) ) {
3365      // concat all sortBy and sortHistory, add to front, oldest goes in last
3366      this.sortHistory = sortBys.concat( this.sortHistory );
3367    }
3368    // sort magic
3369    var itemSorter = getItemSorter( this.sortHistory, this.options.sortAscending );
3370    this.filteredItems.sort( itemSorter );
3371  };
3372
3373  // check if sortBys is same as start of sortHistory
3374  proto._getIsSameSortBy = function( sortBys ) {
3375    for ( var i=0; i < sortBys.length; i++ ) {
3376      if ( sortBys[i] != this.sortHistory[i] ) {
3377        return false;
3378      }
3379    }
3380    return true;
3381  };
3382
3383  // returns a function used for sorting
3384  function getItemSorter( sortBys, sortAsc ) {
3385    return function sorter( itemA, itemB ) {
3386      // cycle through all sortKeys
3387      for ( var i = 0; i < sortBys.length; i++ ) {
3388        var sortBy = sortBys[i];
3389        var a = itemA.sortData[ sortBy ];
3390        var b = itemB.sortData[ sortBy ];
3391        if ( a > b || a < b ) {
3392          // if sortAsc is an object, use the value given the sortBy key
3393          var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;
3394          var direction = isAscending ? 1 : -1;
3395          return ( a > b ? 1 : -1 ) * direction;
3396        }
3397      }
3398      return 0;
3399    };
3400  }
3401
3402  // -------------------------- methods -------------------------- //
3403
3404  // get layout mode
3405  proto._mode = function() {
3406    var layoutMode = this.options.layoutMode;
3407    var mode = this.modes[ layoutMode ];
3408    if ( !mode ) {
3409      // TODO console.error
3410      throw new Error( 'No layout mode: ' + layoutMode );
3411    }
3412    // HACK sync mode's options
3413    // any options set after init for layout mode need to be synced
3414    mode.options = this.options[ layoutMode ];
3415    return mode;
3416  };
3417
3418  proto._resetLayout = function() {
3419    // trigger original reset layout
3420    Outlayer.prototype._resetLayout.call( this );
3421    this._mode()._resetLayout();
3422  };
3423
3424  proto._getItemLayoutPosition = function( item  ) {
3425    return this._mode()._getItemLayoutPosition( item );
3426  };
3427
3428  proto._manageStamp = function( stamp ) {
3429    this._mode()._manageStamp( stamp );
3430  };
3431
3432  proto._getContainerSize = function() {
3433    return this._mode()._getContainerSize();
3434  };
3435
3436  proto.needsResizeLayout = function() {
3437    return this._mode().needsResizeLayout();
3438  };
3439
3440  // -------------------------- adding & removing -------------------------- //
3441
3442  // HEADS UP overwrites default Outlayer appended
3443  proto.appended = function( elems ) {
3444    var items = this.addItems( elems );
3445    if ( !items.length ) {
3446      return;
3447    }
3448    // filter, layout, reveal new items
3449    var filteredItems = this._filterRevealAdded( items );
3450    // add to filteredItems
3451    this.filteredItems = this.filteredItems.concat( filteredItems );
3452  };
3453
3454  // HEADS UP overwrites default Outlayer prepended
3455  proto.prepended = function( elems ) {
3456    var items = this._itemize( elems );
3457    if ( !items.length ) {
3458      return;
3459    }
3460    // start new layout
3461    this._resetLayout();
3462    this._manageStamps();
3463    // filter, layout, reveal new items
3464    var filteredItems = this._filterRevealAdded( items );
3465    // layout previous items
3466    this.layoutItems( this.filteredItems );
3467    // add to items and filteredItems
3468    this.filteredItems = filteredItems.concat( this.filteredItems );
3469    this.items = items.concat( this.items );
3470  };
3471
3472  proto._filterRevealAdded = function( items ) {
3473    var filtered = this._filter( items );
3474    this.hide( filtered.needHide );
3475    // reveal all new items
3476    this.reveal( filtered.matches );
3477    // layout new items, no transition
3478    this.layoutItems( filtered.matches, true );
3479    return filtered.matches;
3480  };
3481
3482  /**
3483   * Filter, sort, and layout newly-appended item elements
3484   * @param {Array or NodeList or Element} elems
3485   */
3486  proto.insert = function( elems ) {
3487    var items = this.addItems( elems );
3488    if ( !items.length ) {
3489      return;
3490    }
3491    // append item elements
3492    var i, item;
3493    var len = items.length;
3494    for ( i=0; i < len; i++ ) {
3495      item = items[i];
3496      this.element.appendChild( item.element );
3497    }
3498    // filter new stuff
3499    var filteredInsertItems = this._filter( items ).matches;
3500    // set flag
3501    for ( i=0; i < len; i++ ) {
3502      items[i].isLayoutInstant = true;
3503    }
3504    this.arrange();
3505    // reset flag
3506    for ( i=0; i < len; i++ ) {
3507      delete items[i].isLayoutInstant;
3508    }
3509    this.reveal( filteredInsertItems );
3510  };
3511
3512  var _remove = proto.remove;
3513  proto.remove = function( elems ) {
3514    elems = utils.makeArray( elems );
3515    var removeItems = this.getItems( elems );
3516    // do regular thing
3517    _remove.call( this, elems );
3518    // bail if no items to remove
3519    var len = removeItems && removeItems.length;
3520    // remove elems from filteredItems
3521    for ( var i=0; len && i < len; i++ ) {
3522      var item = removeItems[i];
3523      // remove item from collection
3524      utils.removeFrom( this.filteredItems, item );
3525    }
3526  };
3527
3528  proto.shuffle = function() {
3529    // update random sortData
3530    for ( var i=0; i < this.items.length; i++ ) {
3531      var item = this.items[i];
3532      item.sortData.random = Math.random();
3533    }
3534    this.options.sortBy = 'random';
3535    this._sort();
3536    this._layout();
3537  };
3538
3539  /**
3540   * trigger fn without transition
3541   * kind of hacky to have this in the first place
3542   * @param {Function} fn
3543   * @param {Array} args
3544   * @returns ret
3545   * @private
3546   */
3547  proto._noTransition = function( fn, args ) {
3548    // save transitionDuration before disabling
3549    var transitionDuration = this.options.transitionDuration;
3550    // disable transition
3551    this.options.transitionDuration = 0;
3552    // do it
3553    var returnValue = fn.apply( this, args );
3554    // re-enable transition for reveal
3555    this.options.transitionDuration = transitionDuration;
3556    return returnValue;
3557  };
3558
3559  // ----- helper methods ----- //
3560
3561  /**
3562   * getter method for getting filtered item elements
3563   * @returns {Array} elems - collection of item elements
3564   */
3565  proto.getFilteredItemElements = function() {
3566    return this.filteredItems.map( function( item ) {
3567      return item.element;
3568    });
3569  };
3570
3571  // -----  ----- //
3572
3573  return Isotope;
3574
3575}));
3576
3577/*------------------------------------------------------------------*/
3578/*	01) Owl Carousel
3579/*------------------------------------------------------------------*/
3580
vendor: 42,677 bytes, lines 3581-3583
3581
3582!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&e<=0&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.$element.is(":visible")&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&b<h+e?d=a:"right"===c&&b>h-f-e&&b<h-f+e?d=a+1:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),d===-1},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=f*-1*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&a.namespace.indexOf("owl")!==-1?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&e*-1||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};if(b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&rel=0&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},
3583a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
3583
3584
3585
3586
3587
3588/*------------------------------------------------------------------*/
3589/*	 WAYPOINTS
3590/*------------------------------------------------------------------*/
3591
3592/*!
vendor: 9,677 bytes, lines 3593-3606
3593Waypoints - 4.0.1
3594Copyright © 2011-2016 Caleb Troughton
3595Licensed under the MIT license.
3596https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
3597*/
3598!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");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.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=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
3599
3600
3601/*------------------------------------------------------------------*/
3602/*	02) NICESCROLL
3603/*------------------------------------------------------------------*/
3604
3605/* jquery.nicescroll 3.2.0 InuYaksa*2013 MIT http://areaaperta.com/nicescroll */
3606(function(e){var y=!1,D=!1,J=5E3,K=2E3,x=0,L=function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0<e.split("/").length?e.split("/").slice(0,-1).join("/")+"/":""}();Array.prototype.forEach||(Array.prototype.forEach=function(e,c){for(var h=0,l=this.length;h<l;++h)e.call(c,this[h],h,this)});var v=window.requestAnimationFrame||!1,w=window.cancelAnimationFrame||!1;
3606["ms","moz","webkit","o"].forEach(function(e){v||(v=window[e+"RequestAnimationFrame"]);w||(w=
3607window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"])});var z=window.MutationObserver||window.WebKitMutationObserver||!1,F={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"5px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,
3608preservenativescrolling:!0,railoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:0.3,rtlmode:!1,cursordragontouch:!1},
3609E=!1,M=function(){if(E)return E;var e=document.createElement("DIV"),c={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};c.isopera="opera"in window;c.isopera12=c.isopera&&"getUserMedia"in navigator;c.isie="all"in document&&"attachEvent"in e&&!c.isopera;c.isieold=c.isie&&!("msInterpolationMode"in e.style);c.isie7=c.isie&&!c.isieold&&(!("documentMode"in document)||7==document.documentMode);c.isie8=c.isie&&"documentMode"in document&&
36108==document.documentMode;c.isie9=c.isie&&"performance"in window&&9<=document.documentMode;c.isie10=c.isie&&"performance"in window&&10<=document.documentMode;c.isie9mobile=/iemobile.9/i.test(navigator.userAgent);c.isie9mobile&&(c.isie9=!1);c.isie7mobile=!c.isie9mobile&&c.isie7&&/iemobile/i.test(navigator.userAgent);c.ismozilla="MozAppearance"in e.style;c.iswebkit="WebkitAppearance"in e.style;c.ischrome="chrome"in window;c.ischrome22=c.ischrome&&c.haspointerlock;c.ischrome26=c.ischrome&&"transition"in
3611e.style;c.cantouch="ontouchstart"in document.documentElement||"ontouchstart"in window;c.hasmstouch=window.navigator.msPointerEnabled||!1;c.ismac=/^mac$/i.test(navigator.platform);c.isios=c.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform);c.isios4=c.isios&&!("seal"in Object);c.isandroid=/android/i.test(navigator.userAgent);c.trstyle=!1;c.hastransform=!1;c.hastranslate3d=!1;c.transitionstyle=!1;c.hastransition=!1;c.transitionend=!1;for(var h=["transform","msTransform","webkitTransform","MozTransform",
3612"OTransform"],l=0;l<h.length;l++)if("undefined"!=typeof e.style[h[l]]){c.trstyle=h[l];break}c.hastransform=!1!=c.trstyle;c.hastransform&&(e.style[c.trstyle]="translate3d(1px,2px,3px)",c.hastranslate3d=/translate3d/.test(e.style[c.trstyle]));c.transitionstyle=!1;c.prefixstyle="";c.transitionend=!1;for(var h="transition webkitTransition MozTransition OTransition OTransition msTransition KhtmlTransition".split(" "),n=" -webkit- -moz- -o- -o -ms- -khtml-".split(" "),t="transitionend webkitTransitionEnd transitionend otransitionend oTransitionEnd msTransitionEnd KhtmlTransitionEnd".split(" "),
3613l=0;l<h.length;l++)if(h[l]in e.style){c.transitionstyle=h[l];c.prefixstyle=n[l];c.transitionend=t[l];break}c.ischrome26&&(c.prefixstyle=n[1]);c.hastransition=c.transitionstyle;a:{h=["-moz-grab","-webkit-grab","grab"];
3613if(c.ischrome&&!c.ischrome22||c.isie)h=[];for(l=0;l<h.length;l++)if(n=h[l],e.style.cursor=n,e.style.cursor==n){h=n;break a}h="url(http://www.google.com/intl/en_ALL/mapfiles/openhand.cur),n-resize"}c.cursorgrabvalue=h;c.hasmousecapture="setCapture"in e;c.hasMutationObserver=!1!==z;return E=
3614c},N=function(k,c){function h(){var d=b.win;if("zIndex"in d)return d.zIndex();for(;0<d.length&&9!=d[0].nodeType;){var c=d.css("zIndex");if(!isNaN(c)&&0!=c)return parseInt(c);d=d.parent()}return!1}function l(d,c,g){c=d.css(c);d=parseFloat(c);return isNaN(d)?(d=u[c]||0,g=3==d?g?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&d&&(d+=1),g?d:0):d}function n(d,c,g,e){b._bind(d,c,function(b){b=b?b:window.event;var e={original:b,target:b.target||b.srcElement,type:"wheel",
3615deltaMode:"MozMousePixelScroll"==b.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){b.preventDefault?b.preventDefault():b.returnValue=!1;return!1},stopImmediatePropagation:function(){b.stopImmediatePropagation?b.stopImmediatePropagation():b.cancelBubble=!0}};"mousewheel"==c?(e.deltaY=-0.025*b.wheelDelta,b.wheelDeltaX&&(e.deltaX=-0.025*b.wheelDeltaX)):e.deltaY=b.detail;return g.call(d,e)},e)}function t(d,c,g){var e,f;0==d.deltaMode?(e=-Math.floor(d.deltaX*(b.opt.mousescrollstep/54)),f=-Math.floor(d.deltaY*
3616(b.opt.mousescrollstep/54))):1==d.deltaMode&&(e=-Math.floor(d.deltaX*b.opt.mousescrollstep),f=-Math.floor(d.deltaY*b.opt.mousescrollstep));c&&(0==e&&f)&&(e=f,f=0);
3616e&&(b.scrollmom&&b.scrollmom.stop(),b.lastdeltax+=e,b.debounced("mousewheelx",function(){var d=b.lastdeltax;b.lastdeltax=0;b.rail.drag||b.doScrollLeftBy(d)},120));if(f){if(b.opt.nativeparentscrolling&&g&&!b.ispage&&!b.zoomactive)if(0>f){if(b.getScrollTop()>=b.page.maxh)return!0}else if(0>=b.getScrollTop())return!0;b.scrollmom&&b.scrollmom.stop();
3617b.lastdeltay+=f;b.debounced("mousewheely",function(){var d=b.lastdeltay;b.lastdeltay=0;b.rail.drag||b.doScrollBy(d)},120)}d.stopImmediatePropagation();return d.preventDefault()}var b=this;this.version="3.4.0";this.name="nicescroll";this.me=c;this.opt={doc:e("body"),win:!1};e.extend(this.opt,F);this.opt.snapbackspeed=80;if(k)for(var q in b.opt)"undefined"!=typeof k[q]&&(b.opt[q]=k[q]);this.iddoc=(this.doc=b.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test(b.opt.win?b.opt.win[0].nodeName:
3618this.doc[0].nodeName);this.haswrapper=!1!==b.opt.win;this.win=b.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=b.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=
3619this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+K++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=
3620this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.overflowx=b.opt.overflowx;this.overflowy=b.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=M();var f=e.extend({},this.detected);this.ishwscroll=(this.canhwscroll=f.hastransform&&b.opt.hwacceleration)&&b.haswrapper;this.istouchcapable=!1;f.cantouch&&(f.ischrome&&!f.isios&&!f.isandroid)&&(this.istouchcapable=
3621!0,f.cantouch=!1);f.cantouch&&(f.ismozilla&&!f.isios)&&(this.istouchcapable=!0,f.cantouch=!1);b.opt.enablemouselockapi||(f.hasmousecapture=!1,f.haspointerlock=!1);this.delayed=function(d,c,g,e){var f=b.delaylist[d],h=(new Date).getTime();if(!e&&f&&f.tt)return!1;f&&f.tt&&clearTimeout(f.tt);if(f&&f.last+g>h&&!f.tt)b.delaylist[d]={last:h+g,tt:setTimeout(function(){b.delaylist[d].tt=0;c.call()},g)};else if(!f||!f.tt)b.delaylist[d]={last:h,tt:0},setTimeout(function(){c.call()},0)};this.debounced=function(d,
3622c,g){var f=b.delaylist[d];(new Date).getTime();b.delaylist[d]=c;f||setTimeout(function(){var c=b.delaylist[d];b.delaylist[d]=!1;c.call()},g)};this.synched=function(d,c){b.synclist[d]=c;(function(){b.onsync||(v(function(){b.onsync=!1;for(d in b.synclist){var c=b.synclist[d];c&&c.call(b);b.synclist[d]=!1}}),b.onsync=!0)})();return d};this.unsynched=function(d){b.synclist[d]&&(b.synclist[d]=!1)};this.css=function(d,c){for(var g in c)b.saved.css.push([d,g,d.css(g)]),d.css(g,c[g])};this.scrollTop=function(d){return"undefined"==
3623typeof d?b.getScrollTop():b.setScrollTop(d)};this.scrollLeft=function(d){return"undefined"==typeof d?b.getScrollLeft():b.setScrollLeft(d)};BezierClass=function(b,c,g,f,e,h,l){this.st=b;this.ed=c;this.spd=g;this.p1=f||0;this.p2=e||1;this.p3=h||0;this.p4=l||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(b){return 3*b*b*(1-b)},B3:function(b){return 3*b*(1-b)*(1-b)},B4:function(b){return(1-b)*(1-b)*(1-b)},getNow:function(){var b=1-((new Date).getTime()-this.ts)/
3624this.spd,c=this.B2(b)+this.B3(b)+this.B4(b);return 0>b?this.ed:this.st+Math.round(this.df*c)},update:function(b,c){this.st=this.getNow();this.ed=b;this.spd=c;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};f.hastranslate3d&&f.isios&&this.doc.css("-webkit-backface-visibility","hidden");
3624var r=function(){var d=b.doc.css(f.trstyle);return d&&"matrix"==d.substr(0,6)?d.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):
3625!1};this.getScrollTop=function(d){if(!d){if(d=r())return 16==d.length?-d[13]:-d[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(d){if(!d){if(d=r())return 16==d.length?-d[12]:-d[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(b){var c=document.createEvent("UIEvents");c.initUIEvent("scroll",!1,!0,window,1);b.dispatchEvent(c)}:
3626document.fireEvent?function(b){var c=document.createEventObject();b.fireEvent("onscroll");c.cancelBubble=!0}:function(b,c){};f.hastranslate3d&&b.opt.enabletranslate3d?(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1*d+"px";b.doc.css(f.trstyle,"translate3d("+b.doc.translate.tx+
3627","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1*d+"px";b.doc.css(f.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},
3628this.setScrollTop=function(d){return b.docscroll.scrollTop(d)},this.getScrollLeft=function(){return b.docscroll.scrollLeft()},this.setScrollLeft=function(d){return b.docscroll.scrollLeft(d)};this.getTarget=function(b){return!b?!1:b.target?b.target:b.srcElement?b.srcElement:!1};this.hasParent=function(b,c){if(!b)return!1;for(var g=b.target||b.srcElement||b||!1;g&&g.id!=c;)g=g.parentNode||!1;return!1!==g};var u={thin:1,medium:3,thick:5};this.getOffset=function(){if(b.isfixed)return{top:parseFloat(b.win.css("top")),
3629left:parseFloat(b.win.css("left"))};if(!b.viewport)return b.win.offset();var d=b.win.offset(),c=b.viewport.offset();return{top:d.top-c.top+b.viewport.scrollTop(),left:d.left-c.left+b.viewport.scrollLeft()}};this.updateScrollBar=function(d){if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()}
3629),b.railh&&b.railh.css({width:b.win.innerWidth()});else{var c=b.getOffset(),g=c.top,f=c.left,g=g+l(b.win,"border-top-width",!0);b.win.outerWidth();b.win.innerWidth();var f=f+(b.rail.align?b.win.outerWidth()-
3630l(b.win,"border-right-width")-b.rail.width:l(b.win,"border-left-width")),e=b.opt.railoffset;e&&(e.top&&(g+=e.top),b.rail.align&&e.left&&(f+=e.left));b.locked||b.rail.css({top:g,left:f,height:d?d.h:b.win.innerHeight()});b.zoom&&b.zoom.css({top:g+1,left:1==b.rail.align?f-20:f+b.rail.width+4});b.railh&&!b.locked&&(g=c.top,f=c.left,d=b.railh.align?g+l(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:g+l(b.win,"border-top-width",!0),f+=l(b.win,"border-left-width"),b.railh.css({top:d,left:f,
3631width:b.railh.width}))}};this.doRailClick=function(d,c,g){var f;b.locked||(b.cancelEvent(d),c?(c=g?b.doScrollLeft:b.doScrollTop,f=g?(d.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(d.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,c(f)):(c=g?b.doScrollLeftBy:b.doScrollBy,f=g?b.scroll.x:b.scroll.y,d=g?d.pageX-b.railh.offset().left:d.pageY-b.rail.offset().top,g=g?b.view.w:b.view.h,f>=d?c(g):c(-g)))};b.hasanimationframe=v;b.hascancelanimationframe=w;b.hasanimationframe?b.hascancelanimationframe||
3632(w=function(){b.cancelAnimationFrame=!0}):(v=function(b){return setTimeout(b,15-Math.floor(+new Date/1E3)%16)},w=clearInterval);this.init=function(){b.saved.css=[];if(f.isie7mobile)return!0;f.hasmstouch&&b.css(b.ispage?e("html"):b.win,{"-ms-touch-action":"none"});b.zindex="auto";b.zindex=!b.ispage&&"auto"==b.opt.zindex?h()||"auto":b.opt.zindex;!b.ispage&&"auto"!=b.zindex&&b.zindex>x&&(x=b.zindex);b.isie&&(0==b.zindex&&"auto"==b.opt.zindex)&&(b.zindex="auto");if(!b.ispage||!f.cantouch&&!f.isieold&&
3633!f.isie9mobile){var d=b.docscroll;b.ispage&&(d=b.haswrapper?b.win:b.doc);f.isie9mobile||b.css(d,{"overflow-y":"hidden"});b.ispage&&f.isie7&&("BODY"==b.doc[0].nodeName?b.css(e("html"),{"overflow-y":"hidden"}):"HTML"==b.doc[0].nodeName&&b.css(e("body"),{"overflow-y":"hidden"}));f.isios&&(!b.ispage&&!b.haswrapper)&&b.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var c=e(document.createElement("div"));c.css({position:"relative",top:0,"float":"right",width:b.opt.cursorwidth,height:"0px","background-color":b.opt.cursorcolor,
3634border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.hborder=parseFloat(c.outerHeight()-c.innerHeight());b.cursor=c;var g=e(document.createElement("div"));g.attr("id",b.id);g.addClass("nicescroll-rails");var l,k,n=["left","right"],G;for(G in n)k=n[G],(l=b.opt.railpadding[k])?g.css("padding-"+k,l+"px"):b.opt.railpadding[k]=0;g.append(c);g.width=Math.max(parseFloat(b.opt.cursorwidth),
3635c.outerWidth())+b.opt.railpadding.left+b.opt.railpadding.right;g.css({width:g.width+"px",zIndex:b.zindex,background:b.opt.background,cursor:"default"});g.visibility=!0;g.scrollable=!0;g.align="left"==b.opt.railalign?0:1;b.rail=g;c=b.rail.drag=!1;b.opt.boxzoom&&(!b.ispage&&!f.isieold)&&(c=document.createElement("div"),b.bind(c,"click",b.doZoom),b.zoom=e(c),b.zoom.css({cursor:"pointer","z-index":b.zindex,backgroundImage:"url("+L+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),b.opt.dblclickzoom&&
3636b.bind(b.win,"dblclick",b.doZoom),f.cantouch&&b.opt.gesturezoom&&(b.ongesturezoom=function(d){1.5<d.scale&&b.doZoomIn(d);0.8>d.scale&&b.doZoomOut(d);return b.cancelEvent(d)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(b.opt.horizrailenabled){b.css(d,{"overflow-x":"hidden"});c=e(document.createElement("div"));c.css({position:"relative",top:0,height:b.opt.cursorwidth,width:"0px","background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,
3637"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.wborder=parseFloat(c.outerWidth()-c.innerWidth());b.cursorh=c;var m=e(document.createElement("div"));m.attr("id",b.id+"-hr");m.addClass("nicescroll-rails");m.height=Math.max(parseFloat(b.opt.cursorwidth),c.outerHeight());m.css({height:m.height+"px",zIndex:b.zindex,background:b.opt.background});m.append(c);m.visibility=!0;m.scrollable=!0;m.align="top"==b.opt.railvalign?0:1;b.railh=m;b.railh.drag=!1}b.ispage?
3638(g.css({position:"fixed",top:"0px",height:"100%"}),g.align?g.css({right:"0px"}):g.css({left:"0px"}),b.body.append(g),b.railh&&(m.css({position:"fixed",left:"0px",width:"100%"}),m.align?m.css({bottom:"0px"}):m.css({top:"0px"}),b.body.append(m))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),d="HTML"==b.win[0].nodeName?b.body:b.win,b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":g.width+4}),d.append(b.zoom)),g.css({position:"absolute",top:0}),
3639g.align?g.css({right:0}):g.css({left:0}),d.append(g),m&&(m.css({position:"absolute",left:0,bottom:0}),m.align?m.css({bottom:0}):m.css({top:0}),d.append(m))):(b.isfixed="fixed"==b.win.css("position"),d=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,!1==/relative|absolute/.test(b.viewport.css("position"))&&b.css(b.viewport,{position:"relative"})),g.css({position:d}),b.zoom&&b.zoom.css({position:d}),b.updateScrollBar(),b.body.append(g),b.zoom&&
3640b.body.append(b.zoom),b.railh&&(m.css({position:d}),b.body.append(m))),f.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),f.isie&&b.opt.disableoutline&&b.win.attr("hideFocus","true"),f.iswebkit&&b.opt.disableoutline&&b.win.css({outline:"none"}));!1===b.opt.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:b.opt.cursoropacitymax}),b.railh&&b.railh.css({opacity:b.opt.cursoropacitymax})):!0===b.opt.autohidemode?(b.autohidedom=e().add(b.rail),f.isie8&&
3641(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&f.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==b.opt.autohidemode?(b.autohidedom=e().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==b.opt.autohidemode?(b.autohidedom=e().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==b.opt.autohidemode&&(b.autohidedom=!1,b.hide(),b.locked=!1);if(f.isie9mobile)b.scrollmom=new H(b),b.onmangotouch=
3642function(d){d=b.getScrollTop();var c=b.getScrollLeft();if(d==b.scrollmom.lastscrolly&&c==b.scrollmom.lastscrollx)return!0;var g=d-b.mangotouch.sy,f=c-b.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(f,2)+Math.pow(g,2)))){var p=0>g?-1:1,e=0>f?-1:1,h=+new Date;b.mangotouch.lazy&&clearTimeout(b.mangotouch.lazy);80<h-b.mangotouch.tm||b.mangotouch.dry!=p||b.mangotouch.drx!=e?(b.scrollmom.stop(),b.scrollmom.reset(c,d),b.mangotouch.sy=d,b.mangotouch.ly=d,b.mangotouch.sx=c,b.mangotouch.lx=c,b.mangotouch.dry=
3643p,b.mangotouch.drx=e,b.mangotouch.tm=h):(b.scrollmom.stop(),b.scrollmom.update(b.mangotouch.sx-f,b.mangotouch.sy-g),b.mangotouch.tm=h,g=Math.max(Math.abs(b.mangotouch.ly-d),Math.abs(b.mangotouch.lx-c)),b.mangotouch.ly=d,b.mangotouch.lx=c,2<g&&(b.mangotouch.lazy=setTimeout(function(){b.mangotouch.lazy=!1;b.mangotouch.dry=0;b.mangotouch.drx=0;b.mangotouch.tm=0;b.scrollmom.doMomentum(30)},100)))}},g=b.getScrollTop(),m=b.getScrollLeft(),b.mangotouch={sy:g,ly:g,dry:0,sx:m,lx:m,drx:0,lazy:!1,tm:0},b.bind(b.docscroll,
3644"scroll",b.onmangotouch);else{if(f.cantouch||b.istouchcapable||b.opt.touchbehavior||f.hasmstouch){b.scrollmom=new H(b);b.ontouchstart=function(d){if(d.pointerType&&2!=d.pointerType)return!1;if(!b.locked){if(f.hasmstouch)for(var c=d.target?d.target:!1;c;){var g=e(c).getNiceScroll();if(0<g.length&&g[0].me==b.me)break;
3644if(0<g.length)return!1;if("DIV"==c.nodeName&&c.id==b.id)break;c=c.parentNode?c.parentNode:!1}b.cancelScroll();if((c=b.getTarget(d))&&/INPUT/i.test(c.nodeName)&&/range/i.test(c.type))return b.stopPropagation(d);
3645!("clientX"in d)&&"changedTouches"in d&&(d.clientX=d.changedTouches[0].clientX,d.clientY=d.changedTouches[0].clientY);b.forcescreen&&(g=d,d={original:d.original?d.original:d},d.clientX=g.screenX,d.clientY=g.screenY);b.rail.drag={x:d.clientX,y:d.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1};if(b.ispage||!b.opt.directionlockdeadzone)b.rail.drag.dl="f";else{var g=e(window).width(),p=e(window).height(),h=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),
3646l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),p=Math.max(0,l-p),g=Math.max(0,h-g);b.rail.drag.ck=!b.rail.scrollable&&b.railh.scrollable?0<p?"v":!1:b.rail.scrollable&&!b.railh.scrollable?0<g?"h":!1:!1;b.rail.drag.ck||(b.rail.drag.dl="f")}b.opt.touchbehavior&&(b.isiframe&&f.isie)&&(g=b.win.position(),b.rail.drag.x+=g.left,b.rail.drag.y+=g.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(d.clientX,d.clientY);if(!f.cantouch&&!this.istouchcapable&&!f.hasmstouch){if(!c||
3647!/INPUT|SELECT|TEXTAREA/i.test(c.nodeName))return!b.ispage&&f.hasmousecapture&&c.setCapture(),b.cancelEvent(d);/SUBMIT|CANCEL|BUTTON/i.test(e(c).attr("type"))&&(pc={tg:c,click:!1},b.preventclick=pc)}}};b.ontouchend=function(d){if(d.pointerType&&2!=d.pointerType)return!1;if(b.rail.drag&&2==b.rail.drag.pt&&(b.scrollmom.doMomentum(),b.rail.drag=!1,b.hasmoving&&(b.hasmoving=!1,b.lastmouseup=!0,b.hideCursor(),f.hasmousecapture&&document.releaseCapture(),!f.cantouch)))return b.cancelEvent(d)};var q=b.opt.touchbehavior&&
3648b.isiframe&&!f.hasmousecapture;b.ontouchmove=function(d,c){if(d.pointerType&&2!=d.pointerType)return!1;if(b.rail.drag&&2==b.rail.drag.pt){if(f.cantouch&&"undefined"==typeof d.original)return!0;b.hasmoving=!0;b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick);d=e.extend({original:d},d);"changedTouches"in d&&(d.clientX=d.changedTouches[0].clientX,d.clientY=d.changedTouches[0].clientY);if(b.forcescreen){var g=d;d={original:d.original?
3649d.original:d};d.clientX=g.screenX;d.clientY=g.screenY}g=ofy=0;if(q&&!c){var p=b.win.position(),g=-p.left;ofy=-p.top}var h=d.clientY+ofy,p=h-b.rail.drag.y,l=d.clientX+g,k=l-b.rail.drag.x,s=b.rail.drag.st-p;b.ishwscroll&&b.opt.bouncescroll?0>s?s=Math.round(s/2):s>b.page.maxh&&(s=b.page.maxh+Math.round((s-b.page.maxh)/2)):(0>s&&(h=s=0),s>b.page.maxh&&(s=b.page.maxh,h=0));if(b.railh&&b.railh.scrollable){var m=b.rail.drag.sl-k;b.ishwscroll&&b.opt.bouncescroll?0>m?m=Math.round(m/2):m>b.page.maxw&&(m=b.page.maxw+
3650Math.round((m-b.page.maxw)/2)):(0>m&&(l=m=0),m>b.page.maxw&&(m=b.page.maxw,l=0))}g=!1;if(b.rail.drag.dl)g=!0,"v"==b.rail.drag.dl?m=b.rail.drag.sl:"h"==b.rail.drag.dl&&(s=b.rail.drag.st);else{var p=Math.abs(p),k=Math.abs(k),n=b.opt.directionlockdeadzone;if("v"==b.rail.drag.ck){if(p>n&&k<=0.3*p)return b.rail.drag=!1,!0;k>n&&(b.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==b.rail.drag.ck){if(k>n&&p<=0.3*az)return b.rail.drag=!1,!0;p>n&&(b.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}b.synched("touchmove",
3651function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.prepareTransition(0),b.rail.scrollable&&b.setScrollTop(s),b.scrollmom.update(l,h),b.railh&&b.railh.scrollable?(b.setScrollLeft(m),b.showCursor(s,m)):b.showCursor(s),f.isie10&&document.selection.clear())});f.ischrome&&b.istouchcapable&&(g=!1);if(g)return b.cancelEvent(d)}}}b.onmousedown=function(d,c){if(!(b.rail.drag&&1!=b.rail.drag.pt)){if(b.locked)return b.cancelEvent(d);b.cancelScroll();b.rail.drag={x:d.clientX,y:d.clientY,sx:b.scroll.x,
3652sy:b.scroll.y,pt:1,hr:!!c};var g=b.getTarget(d);!b.ispage&&f.hasmousecapture&&g.setCapture();b.isiframe&&!f.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(d)}};b.onmouseup=function(d){if(b.rail.drag&&(f.hasmousecapture&&document.releaseCapture(),b.isiframe&&!f.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),1==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(d)};b.onmousemove=function(d){if(b.rail.drag&&
36531==b.rail.drag.pt){if(f.ischrome&&0==d.which)return b.onmouseup(d);b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(d.clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var c=b.scrollvaluemaxw;b.scroll.x>c&&(b.scroll.x=c)}else b.scroll.y=b.rail.drag.sy+(d.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),c=b.scrollvaluemax,b.scroll.y>c&&(b.scroll.y=c);b.synched("mousemove",function(){b.rail.drag&&1==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*
3654b.scrollratio.x),b.opt.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),b.opt.cursordragspeed))});return b.cancelEvent(d)}};if(f.cantouch||b.opt.touchbehavior)b.onpreventclick=function(d){if(b.preventclick)return b.preventclick.tg.oncl
3654ick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(d)},b.bind(b.win,"mousedown",b.ontouchstart),b.onclick=f.isios?!1:function(d){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(d)):!0},b.opt.grabcursorenabled&&f.cursorgrabvalue&&(b.css(b.ispage?
3655b.doc:b.win,{cursor:f.cursorgrabvalue}),b.css(b.rail,{cursor:f.cursorgrabvalue}));else{var r=function(d){if(b.selectiondrag){if(d){var c=b.win.outerHeight();d=d.pageY-b.selectiondrag.top;0<d&&d<c&&(d=0);d>=c&&(d-=c);b.selectiondrag.df=d}0!=b.selectiondrag.df&&(b.doScrollBy(2*-Math.floor(b.selectiondrag.df/6)),b.debounced("doselectionscroll",function(){r()},50))}};b.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:"selection"in document?function(){return"None"!=
3656document.selection.type}:function(){return!1};b.onselectionstart=function(d){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(d){b.selectiondrag=!1};b.onselectiondrag=function(d){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){r(d)},250)}}f.hasmstouch&&(b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(document,"MSPointerUp",b.ontouchend),b.bind(document,"MSPointerMove",
3657b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(b){b.preventDefault()}),b.bind(b.cursor,"contextmenu",function(b){b.preventDefault()}));this.istouchcapable&&(b.bind(b.win,"touchstart",b.ontouchstart),b.bind(document,"touchend",b.ontouchend),b.bind(document,"touchcancel",b.ontouchend),b.bind(document,"touchmove",b.ontouchmove));b.bind(b.cursor,"mousedown",b.onmousedown);b.bind(b.cursor,"mouseup",b.onmouseup);b.railh&&(b.bind(b.cursorh,"mousedown",function(d){b.onmousedown(d,!0)}),b.bind(b.cursorh,
3658"mouseup",function(d){if(!(b.rail.drag&&2==b.rail.drag.pt))return b.rail.drag=!1,b.hasmoving=!1,b.hideCursor(),f.hasmousecapture&&document.releaseCapture(),b.cancelEvent(d)}));if(b.opt.cursordragontouch||!f.cantouch&&!b.opt.touchbehavior)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),b.opt.sensitiverail&&
3659(b.bind(b.rail,"click",function(d){b.doRailClick(d,!1,!1)}),b.bind(b.rail,"dblclick",function(d){b.doRailClick(d,!0,!1)}),b.bind(b.cursor,"click",function(d){b.cancelEvent(d)}),b.bind(b.cursor,"dblclick",function(d){b.cancelEvent(d)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),b.opt.sensitiverail&&(b.bind(b.railh,"click",function(d){b.doRailClick(d,
3660!1,!0)}),b.bind(b.railh,"dblclick",function(d){b.doRailClick(d,!0,!0)}),b.bind(b.cursorh,"click",function(d){b.cancelEvent(d)}),b.bind(b.cursorh,"dblclick",function(d){b.cancelEvent(d)})));!f.cantouch&&!b.opt.touchbehavior?(b.bind(f.hasmousecapture?b.win:document,"mouseup",b.onmouseup),b.bind(document,"mousemove",b.onmousemove),b.onclick&&b.bind(document,"click",b.onclick),!b.ispage&&b.opt.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(document,"mouseup",b.onselectionend),
3661b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(document,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}))):(b.bind(f.hasmousecapture?b.win:document,"mouseup",b.ontouchend),b.bind(document,"mousemove",b.ontouchmove),b.onclick&&b.bind(document,"click",b.onclick),b.opt.cursordragontouch&&
3662(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mousemove",b.onmousemove),b.cursorh&&b.bind(b.cursorh,"mousedown",b.onmousedown),b.cursorh&&b.bind(b.cursorh,"mousemove",b.onmousemove)));b.opt.enablemousewheel&&(b.isiframe||b.bind(f.isie&&b.ispage?document:b.docscroll,"mousewheel",b.onmousewheel),b.bind(b.rail,"mousewheel",b.onmousewheel),b.railh&&b.bind(b.railh,"mousewheel",b.onmousewheelhr));!b.ispage&&(!f.cantouch&&!/HTML|BODY/.test(b.win[0].nodeName))&&(b.win.attr("tabindex")||b.win.attr({tabindex:J++}),
3663b.jqbind(b.win,"focus",function(d){y=b.getTarget(d).id||!0;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.jqbind(b.win,"blur",function(d){y=!1;b.hasfocus=!1}),b.jqbind(b.win,"mouseenter",function(d){D=b.getTarget(d).id||!0;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.jqbind(b.win,"mouseleave",function(){D=!1;b.hasmousefocus=!1}))}b.onkeypress=function(d){if(b.locked&&0==b.page.maxh)return!0;d=d?d:window.e;var c=b.getTarget(d);if(c&&/INPUT|TEXTAREA|SELECT|OPTION/.test(c.nodeName)&&
3664(!c.getAttribute("type")&&!c.type||!/submit|button|cancel/i.tp))return!0;
3664if(b.hasfocus||b.hasmousefocus&&!y||b.ispage&&!y&&!D){c=d.keyCode;if(b.locked&&27!=c)return b.cancelEvent(d);var g=d.ctrlKey||!1,p=d.shiftKey||!1,f=!1;switch(c){case 38:case 63233:b.doScrollBy(72);f=!0;break;case 40:case 63235:b.doScrollBy(-72);f=!0;break;case 37:case 63232:b.railh&&(g?b.doScrollLeft(0):b.doScrollLeftBy(72),f=!0);break;case 39:case 63234:b.railh&&(g?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),f=!0);break;
3665case 33:case 63276:b.doScrollBy(b.view.h);f=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);f=!0;break;case 36:case 63273:b.railh&&g?b.doScrollPos(0,0):b.doScrollTo(0);f=!0;break;case 35:case 63275:b.railh&&g?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);f=!0;break;case 32:b.opt.spacebarenabled&&(p?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),f=!0);break;case 27:b.zoomactive&&(b.doZoom(),f=!0)}if(f)return b.cancelEvent(d)}};b.opt.enablekeyboard&&b.bind(document,f.isopera&&
3666!f.isopera12?"keypress":"keydown",b.onkeypress);b.bind(window,"resize",b.lazyResize);b.bind(window,"orientationchange",b.lazyResize);b.bind(window,"load",b.lazyResize);if(f.ischrome&&!b.ispage&&!b.haswrapper){var t=b.win.attr("style"),g=parseFloat(b.win.css("width"))+1;b.win.css("width",g);b.synched("chromefix",function(){b.win.attr("style",t)})}b.onAttributeChange=function(d){b.lazyResize(250)};!b.ispage&&!b.haswrapper&&(!1!==z?(b.observer=new z(function(d){d.forEach(b.onAttributeChange)}),b.observer.observe(b.win[0],
3667{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new z(function(d){d.forEach(function(d){if(0<d.removedNodes.length)for(var c in d.removedNodes)if(d.removedNodes[c]==b.win[0])return b.remove()})}),b.observerremover.observe(b.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(b.win,f.isie&&!f.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),f.isie9&&b.win[0].attachEvent("onpropertychange",b.onAttributeChange),b.bind(b.win,"DOMNodeRemoved",
3668function(d){d.target==b.win[0]&&b.remove()})));!b.ispage&&b.opt.boxzoom&&b.bind(window,"resize",b.resizeZoom);b.istextarea&&b.bind(b.win,"mouseup",b.lazyResize);b.checkrtlmode=!0;b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var I=function(d){b.iframexd=!1;try{var c="contentDocument"in this?this.contentDocument:this.contentWindow.document}catch(g){b.iframexd=!0,c=!1}if(b.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&
3669(b.iframe={doc:e(c),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=e(b.iframe.body));!f.isios&&(b.opt.iframeautoresize&&!b.isiframe)&&(b.win.scrollTop(0),b.doc.height(""),d=Math.max(c.getElementsByTagName("html")[0].scrollHeight,c.body.scrollHeight),b.doc.height(d));b.lazyResize(30);f.isie7&&
3670b.css(e(b.iframe.html),{"overflow-y":"hidden"});b.css(e(b.iframe.body),{"overflow-y":"hidden"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(c,"scroll",b.onscroll);b.opt.enablemousewheel&&b.bind(c,"mousewheel",b.onmousewheel);b.opt.enablekeyboard&&b.bind(c,f.isopera?"keypress":"keydown",b.onkeypress);if(f.cantouch||b.opt.touchbehavior)b.bind(c,"mousedown",b.onmousedown),b.bind(c,"mousemove",function(d){b.onmousemove(d,!0)}),b.opt.grabcursorenabled&&f.cursorgrabvalue&&
3671b.css(e(c.body),{cursor:f.cursorgrabvalue});b.bind(c,"mouseup",b.onmouseup);b.zoom&&(b.opt.dblclickzoom&&b.bind(c,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(c,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){I.call(b.doc[0],!1)},500);b.bind(this.doc,"load",I)}};this.showCursor=function(d,c){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);if(b.rail){b.autohidedom&&(b.autohidedom.stop().css({opacity:b.opt.cursoropacitymax}),
3672b.cursoractive=!0);if(!b.rail.drag||1!=b.rail.drag.pt)"undefined"!=typeof d&&!1!==d&&(b.scroll.y=Math.round(1*d/b.scrollratio.y)),"undefined"!=typeof c&&(b.scroll.x=Math.round(1*c/b.scrollratio.x));b.cursor.css({height:b.cursorheight,top:b.scroll.y});b.cursorh&&(!b.rail.align&&b.rail.visibility?b.cursorh.css({width:b.cursorwidth,left:b.scroll.x+b.rail.width}):b.cursorh.css({width:b.cursorwidth,left:b.scroll.x}),b.cursoractive=!0);b.zoom&&b.zoom.stop().css({opacity:b.opt.cursoropacitymax})}};this.hideCursor=
3673function(d){!b.cursortimeout&&(b.rail&&b.autohidedom)&&(b.cursortimeout=setTimeout(function(){if(!b.rail.active||!b.showonmouseevent)b.autohidedom.stop().animate({opacity:b.opt.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:b.opt.cursoropacitymin}),b.cursoractive=!1;
3673b.cursortimeout=0},d||b.opt.hidecursordelay))};this.noticeCursor=function(d,c,g){b.showCursor(c,g);b.rail.active||b.hideCursor(d)};this.getContentSize=b.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),
3674h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc.outerWidth()+parseInt(b.win.css("paddingLeft"))+parseInt(b.win.css("paddingRight")),h:b.doc.outerHeight()+parseInt(b.win.css("paddingTop"))+parseInt(b.win.css("paddingBottom"))}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(d,c){if(!b.win)return!1;if(!b.haswrapper&&!b.ispage){if("none"==b.win.css("display"))return b.visibility&&
3675b.hideRail().hideRailHr(),!1;!b.hidden&&!b.visibility&&b.showRail().showRailHr()}var g=b.page.maxh,f=b.page.maxw,e=b.view.w;b.view={w:b.ispage?b.win.width():parseInt(b.win[0].clientWidth),h:b.ispage?b.win.height():parseInt(b.win[0].clientHeight)};b.page=c?c:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==f&&b.view.w==e){if(b.ispage)return b;g=b.win.offset();if(b.lastposition&&(f=b.lastposition,f.top==g.top&&f.left==
3676g.left))return b;b.lastposition=g}0==b.page.maxh?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail.scrollable=!1):b.rail.scrollable=!0;0==b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh.scrollable=!1):b.railh.scrollable=!0;b.locked=0==b.page.maxh&&0==b.page.maxw;if(b.locked)return b.ispage||b.updateScrollBar(b.view),!1;!b.hidden&&!b.visibility?b.showRail().showRailHr():
3677!b.hidden&&!b.railh.visibility&&b.showRailHr();b.istextarea&&(b.win.css("resize")&&"none"!=b.win.css("resize"))&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h*(b.view.h/b.page.h)));b.cursorheight=b.opt.cursorfixedheight?b.opt.cursorfixedheight:Math.max(b.opt.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w*(b.view.w/b.page.w)));b.cursorwidth=b.opt.cursorfixedheight?b.opt.cursorfixedheight:Math.max(b.opt.cursorminheight,b.cursorwidth);b.scrollvaluemax=
3678b.view.h-b.cursorheight-b.cursor.hborder;b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-b.cursorh.wborder);b.checkrtlmode&&b.railh&&(b.checkrtlmode=!1,b.opt.rtlmode&&0==b.scroll.x&&b.setScrollLeft(b.page.maxw));b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),
3679b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)),b.cursoractive&&b.noticeCursor());b.scroll.y&&0==b.getScrollTop()&&b.doScrollTo(Math.floor(b.scroll.y*b.scrollratio.y));return b};this.resize=b.onResize;this.lazyResize=function(d){d=isNaN(d)?30:d;b.delayed("resize",b.resize,d);return b};this._bind=function(d,c,g,f){b.events.push({e:d,n:c,f:g,b:f,q:!1});d.addEventListener?d.addEventListener(c,g,f||!1):d.attachEvent?d.attachEvent("on"+c,g):d["on"+c]=g};this.jqbind=function(d,c,g){b.events.push({e:d,
3680n:c,f:g,q:!0});e(d).bind(c,g)};this.bind=function(d,c,g,e){var h="jquery"in d?d[0]:d;"mousewheel"==c?"onwheel"in b.win?b._bind(h,"wheel",g,e||!1):(d="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",n(h,d,g,e||!1),"DOMMouseScroll"==d&&n(h,"MozMousePixelScroll",g,e||!1)):h.addEventListener?(f.cantouch&&/mouseup|mousedown|mousemove/.test(c)&&b._bind(h,"mousedown"==c?"touchstart":"mouseup"==c?"touchend":"touchmove",function(b){if(b.touches){if(2>b.touches.length){var d=b.touches.length?
3681b.touches[0]:b;d.original=b;g.call(this,d)}}else b.changedTouches&&(d=b.changedTouches[0],d.original=b,g.call(this,d))},e||!1),b._bind(h,c,g,e||!1),f.cantouch&&"mouseup"==c&&b._bind(h,"touchcancel",g,e||!1)):b._bind(h,c,function(d){if((d=d||window.event||!1)&&d.srcElement)d.target=d.srcElement;"pageY"in d||(d.pageX=d.clientX+document.documentElement.scrollLeft,d.pageY=d.clientY+document.documentElement.scrollTop);return!1===g.call(h,d)||!1===e?b.cancelEvent(d):!0})};this._unbind=function(b,c,g,f){b.removeEventListener?
3682b.removeEventListener(c,g,f):b.detachEvent?b.detachEvent("on"+c,g):b["on"+c]=!1};this.unbindAll=function(){for(var d=0;d<b.events.length;d++){var c=b.events[d];c.q?c.e.unbind(c.n,c.f):b._unbind(c.e,c.n,c.f,c.b)}};this.cancelEvent=function(b){b=b.original?b.original:b?b:window.event||!1;if(!b)return!1;b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();b.preventManipulation&&b.preventManipulation();b.cancelBubble=!0;b.cancel=!0;return b.returnValue=!1};this.stopPropagation=
3683function(b){b=b.original?b.original:b?b:window.event||!1;if(!b)return!1;if(b.stopPropagation)return b.stopPropagation();b.cancelBubble&&(b.cancelBubble=!0);return!1};this.showRail=function(){if(0!=b.page.maxh&&(b.ispage||"none"!=b.win.css("display")))b.visibility=!0,b.rail.visibility=!0,b.rail.css("display","block");return b};this.showRailHr=function(){if(!b.railh)return b;if(0!=b.page.maxw&&(b.ispage||"none"!=b.win.css("display")))b.railh.visibility=!0,b.railh.css("display","block");return b};this.hideRail=
3684function(){b.visibility=!1;b.rail.visibility=!1;b.rail.css("display","none");return b};this.hideRailHr=function(){if(!b.railh)return b;b.railh.visibility=!1;b.railh.css("display","none");return b};this.show=function(){b.hidden=!1;b.locked=!1;return b.showRail().showRailHr()};this.hide=function(){b.hidden=!0;b.locked=!0;return b.hideRail().hideRailHr()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);b.doZoomOut();
3685b.unbindAll();!1!==b.observer&&b.observer.disconnect();!1!==b.observerremover&&b.observerremover.disconnect();b.events=[];
3685b.cursor&&(b.cursor.remove(),b.cursor=null);b.cursorh&&(b.cursorh.remove(),b.cursorh=null);b.rail&&(b.rail.remove(),b.rail=null);b.railh&&(b.railh.remove(),b.railh=null);b.zoom&&(b.zoom.remove(),b.zoom=null);for(var d=0;d<b.saved.css.length;d++){var c=b.saved.css[d];c[0].css(c[1],"undefined"==typeof c[2]?"":c[2])}b.saved=!1;b.me.data("__nicescroll","");b.me=null;b.doc=null;b.docscroll=
3686null;b.win=null;return b};this.scrollstart=function(d){this.onscrollstart=d;return b};this.scrollend=function(d){this.onscrollend=d;return b};this.scrollcancel=function(d){this.onscrollcancel=d;return b};this.zoomin=function(d){this.onzoomin=d;return b};this.zoomout=function(d){this.onzoomout=d;return b};this.isScrollable=function(b){b=b.target?b.target:b;if("OPTION"==b.nodeName)return!0;for(;b&&1==b.nodeType&&!/BODY|HTML/.test(b.nodeName);){var c=e(b),c=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||
3687"";if(/scroll|auto/.test(c))return b.clientHeight!=b.scrollHeight;b=b.parentNode?b.parentNode:!1}return!1};this.getViewport=function(b){for(b=b&&b.parentNode?b.parentNode:!1;b&&1==b.nodeType&&!/BODY|HTML/.test(b.nodeName);){var c=e(b),g=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(g)&&b.clientHeight!=b.scrollHeight||0<c.getNiceScroll().length)return c;b=b.parentNode?b.parentNode:!1}return!1};this.onmousewheel=function(d){if(b.locked)return!0;if(b.rail.drag)return b.cancelEvent(d);
3688if(!b.rail.scrollable)return b.railh&&b.railh.scrollable?b.onmousewheelhr(d):!0;var c=+new Date,g=!1;b.opt.preservenativescrolling&&b.checkarea+600<c&&(b.nativescrollingarea=b.isScrollable(d),g=!0);b.checkarea=c;if(b.nativescrollingarea)return!0;if(d=t(d,!1,g))b.checkarea=0;return d};this.onmousewheelhr=function(d){if(b.locked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(d);var c=+new Date,g=!1;b.opt.preservenativescrolling&&b.checkarea+600<c&&(b.nativescrollingarea=b.isScrollable(d),
3689g=!0);b.checkarea=c;return b.nativescrollingarea?!0:b.locked?b.cancelEvent(d):t(d,!0,g)};this.stop=function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(c){var f=Math.round(10*b.opt.scrollspeed);c=Math.min(f,Math.round(c/20*b.opt.scrollspeed));return 20<c?c:0};b.opt.smoothscroll?b.ishwscroll&&f.hastransition&&b.opt.usetransition?(this.prepareTransition=function(c,
3690e){var g=e?20<c?c:0:b.getTransitionSpeed(c),h=g?f.prefixstyle+"transform "+g+"ms ease-out":"";if(!b.lasttransitionstyle||b.lasttransitionstyle!=h)b.lasttransitionstyle=h,b.doc.css(f.transitionstyle,h);return g},this.doScrollLeft=function(c,f){var g=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,g,f)},this.doScrollTop=function(c,f){var g=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(g,c,f)},this.doScrollPos=function(c,e,g){var h=b.getScrollTop(),l=b.getScrollLeft();(0>
3691(b.newscrolly-h)*(e-h)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();!1==b.opt.bouncescroll&&(0>e?e=0:e>b.page.maxh&&(e=b.page.maxh),0>c?c=0:c>b.page.maxw&&(c=b.page.maxw));if(b.scrollrunning&&c==b.newscrollx&&e==b.newscrolly)return!1;b.newscrolly=e;b.newscrollx=c;b.newscrollspeed=g||!1;if(b.timer)return!1;b.timer=setTimeout(function(){var g=b.getScrollTop(),h=b.getScrollLeft(),l,k;l=c-h;k=e-g;l=Math.round(Math.sqrt(Math.pow(l,2)+Math.pow(k,2)));l=b.newscrollspeed&&1<b.newscrollspeed?b.newscrollspeed:
3692b.getTransitionSpeed(l);b.newscrollspeed&&1>=b.newscrollspeed&&(l*=b.newscrollspeed);b.prepareTransition(l,!0);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);0<l&&(!b.scrollrunning&&b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:h,y:g},request:{x:c,y:e},end:{x:b.newscrollx,y:b.newscrolly},speed:l}),f.transitionend?b.scrollendtrapped||(b.scrollendtrapped=!0,b.bind(b.doc,f.transitionend,b.onScrollEnd,!1)):(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),
3693b.scrollendtrapped=setTimeout(b.onScrollEnd,l)),b.timerscroll={bz:new BezierClass(g,b.newscrolly,l,0,0,0.58,1),bh:new BezierClass(h,b.newscrollx,l,0,0,0.58,1)},b.cursorfreezed||(b.timerscroll.tm=setInterval(function(){b.showCursor(b.getScrollTop(),b.getScrollLeft())},60)));b.synched("doScroll-set",function(){b.timer=0;b.scrollendtrapped&&(b.scrollrunning=!0);b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx);if(!b.scrollendtrapped)b.onScrollEnd()})},50)},this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;
3694var c=b.getScrollTop(),e=b.getScrollLeft();b.scrollrunning=!1;f.transitionend||clearTimeout(f.transitionend);b.scrollendtrapped=!1;b._unbind(b.doc,f.transitionend,b.onScrollEnd);b.prepareTransition(0);b.setScrollTop(c);b.railh&&b.setScrollLeft(e);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;
3694b.cursorfreezed=!1;b.showCursor(c,e);return b},this.onScrollEnd=function(){b.scrollendtrapped&&b._unbind(b.doc,f.transitionend,b.onScrollEnd);b.scrollendtrapped=!1;b.prepareTransition(0);
3695b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;var c=b.getScrollTop(),e=b.getScrollLeft();b.setScrollTop(c);b.railh&&b.setScrollLeft(e);b.noticeCursor(!1,c,e);b.cursorfreezed=!1;0>c?c=0:c>b.page.maxh&&(c=b.page.maxh);0>e?e=0:e>b.page.maxw&&(e=b.page.maxw);if(c!=b.newscrolly||e!=b.newscrollx)return b.doScrollPos(e,c,b.opt.snapbackspeed);b.onscrollend&&b.scrollrunning&&b.onscrollend.call(b,{type:"scrollend",current:{x:e,y:c},end:{x:b.newscrollx,y:b.newscrolly}});b.scrollrunning=
3696!1}):(this.doScrollLeft=function(c,f){var g=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,g,f)},this.doScrollTop=function(c,f){var g=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(g,c,f)},this.doScrollPos=function(c,f,g){function e(){if(b.cancelAnimationFrame)return!0;b.scrollrunning=!0;if(r=1-r)return b.timer=v(e)||1;var c=0,d=sy=b.getScrollTop();if(b.dst.ay){var d=b.bzscroll?b.dst.py+b.bzscroll.getNow()*b.dst.ay:b.newscrolly,g=d-sy;if(0>g&&d<b.newscrolly||0<g&&d>b.newscrolly)d=
3697b.newscrolly;b.setScrollTop(d);d==b.newscrolly&&(c=1)}else c=1;var f=sx=b.getScrollLeft();if(b.dst.ax){f=b.bzscroll?b.dst.px+b.bzscroll.getNow()*b.dst.ax:b.newscrollx;g=f-sx;if(0>g&&f<b.newscrollx||0<g&&f>b.newscrollx)f=b.newscrollx;b.setScrollLeft(f);f==b.newscrollx&&(c+=1)}else c+=1;2==c?(b.timer=0,b.cursorfreezed=!1,b.bzscroll=!1,b.scrollrunning=!1,0>d?d=0:d>b.page.maxh&&(d=b.page.maxh),0>f?f=0:f>b.page.maxw&&(f=b.page.maxw),f!=b.newscrollx||d!=b.newscrolly?b.doScrollPos(f,d):b.onscrollend&&b.onscrollend.call(b,
3698{type:"scrollend",current:{x:sx,y:sy},end:{x:b.newscrollx,y:b.newscrolly}})):b.timer=v(e)||1}f="undefined"==typeof f||!1===f?b.getScrollTop(!0):f;if(b.timer&&b.newscrolly==f&&b.newscrollx==c)return!0;b.timer&&w(b.timer);b.timer=0;var h=b.getScrollTop(),l=b.getScrollLeft();(0>(b.newscrolly-h)*(f-h)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();b.newscrolly=f;b.newscrollx=c;if(!b.bouncescroll||!b.rail.visibility)0>b.newscrolly?b.newscrolly=0:b.newscrolly>b.page.maxh&&(b.newscrolly=b.page.maxh);if(!b.bouncescroll||
3699!b.railh.visibility)0>b.newscrollx?b.newscrollx=0:b.newscrollx>b.page.maxw&&(b.newscrollx=b.page.maxw);b.dst={};b.dst.x=c-l;b.dst.y=f-h;b.dst.px=l;b.dst.py=h;var k=Math.round(Math.sqrt(Math.pow(b.dst.x,2)+Math.pow(b.dst.y,2)));b.dst.ax=b.dst.x/k;b.dst.ay=b.dst.y/k;var n=0,q=k;0==b.dst.x?(n=h,q=f,b.dst.ay=1,b.dst.py=0):0==b.dst.y&&(n=l,q=c,b.dst.ax=1,b.dst.px=0);k=b.getTransitionSpeed(k);g&&1>=g&&(k*=g);b.bzscroll=0<k?b.bzscroll?b.bzscroll.update(q,k):new BezierClass(n,q,k,0,1,0,1):!1;if(!b.timer){(h==
3700b.page.maxh&&f>=b.page.maxh||l==b.page.maxw&&c>=b.page.maxw)&&b.checkContentSize();var r=1;b.cancelAnimationFrame=!1;b.timer=1;b.onscrollstart&&!b.scrollrunning&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:l,y:h},request:{x:c,y:f},end:{x:b.newscrollx,y:b.newscrolly},speed:k});e();(h==b.page.maxh&&f>=h||l==b.page.maxw&&c>=l)&&b.checkContentSize();b.noticeCursor()}},this.cancelScroll=function(){b.timer&&w(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b}):(this.doScrollLeft=function(c,
3701f){var g=b.getScrollTop();b.doScrollPos(c,g,f)},this.doScrollTop=function(c,f){var g=b.getScrollLeft();b.doScrollPos(g,c,f)},this.doScrollPos=function(c,f,g){var e=c>b.page.maxw?b.page.maxw:c;0>e&&(e=0);var h=f>b.page.maxh?b.page.maxh:f;0>h&&(h=0);b.synched("scroll",function(){b.setScrollTop(h);b.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(c,f){var g=0,g=f?Math.floor((b.scroll.y-c)*b.scrollratio.y):(b.timer?b.newscrolly:b.getScrollTop(!0))-c;if(b.bouncescroll){var e=
3702Math.round(b.view.h/2);g<-e?g=-e:g>b.page.maxh+e&&(g=b.page.maxh+e)}b.cursorfreezed=!1;py=b.getScrollTop(!0);if(0>g&&0>=py)return b.noticeCursor();if(g>b.page.maxh&&py>=b.page.maxh)return b.checkContentSize(),b.noticeCursor();b.doScrollTop(g)};this.doScrollLeftBy=function(c,f){var g=0,g=f?Math.floor((b.scroll.x-c)*b.scrollratio.x):(b.timer?b.newscrollx:b.getScrollLeft(!0))-c;if(b.bouncescroll){var e=Math.round(b.view.w/2);g<-e?g=-e:g>b.page.maxw+e&&(g=b.page.maxw+e)}b.cursorfreezed=!1;px=b.getScrollLeft(!0);
3703if(0>g&&0>=px||g>b.page.maxw&&px>=b.page.maxw)return b.noticeCursor();b.doScrollLeft(g)};this.doScrollTo=function(c,f){f&&Math.round(c*b.scrollratio.y);b.cursorfreezed=!1;b.doScrollTop(c)};this.checkContentSize=function(){var c=b.getContentSize();(c.h!=b.page.h||c.w!=b.page.w)&&b.resize(!1,c)};b.onscroll=function(c){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)));
3704b.noticeCursor()})};
3704b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(c){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var h="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),g=b.win[0].style,l;for(l in h){var k=h[l];b.zoomrestore.style[k]="undefined"!=typeof g[k]?g[k]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-
3705b.win.height()};f.isios4&&(b.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0));b.win.css({position:f.isios4?"absolute":"fixed",top:0,left:0,"z-index":x+100,margin:"0px"});h=b.win.css("backgroundColor");(""==h||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(h))&&b.win.css("backgroundColor","#fff");b.rail.css({"z-index":x+101});b.zoom.css({"z-index":x+102});b.zoom.css("backgroundPosition","0px -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(c)}};this.doZoomOut=
3706function(c){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),f.isios4&&e(window).scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0px 0px"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(c)};this.doZoom=function(c){return b.zoomactive?b.doZoomOut(c):b.doZoomIn(c)};this.resizeZoom=function(){if(b.zoomactive){var c=b.getScrollTop();b.win.css({width:e(window).width()-
3707b.zoomrestore.padding.w+"px",height:e(window).height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,c))}};this.init();e.nicescroll.push(this)},H=function(e){var c=this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,l){c.stop();var k=c.time();c.steptime=
37080;c.lasttime=k;c.speedx=0;c.speedy=0;c.lastx=e;c.lasty=l;c.lastscrollx=-1;c.lastscrolly=-1};this.update=function(e,l){var k=c.time();c.steptime=k-c.lasttime;c.lasttime=k;var k=l-c.lasty,t=e-c.lastx,b=c.nc.getScrollTop(),q=c.nc.getScrollLeft(),b=b+k,q=q+t;c.snapx=0>q||q>c.nc.page.maxw;c.snapy=0>b||b>c.nc.page.maxh;c.speedx=t;c.speedy=k;c.lastx=e;c.lasty=l};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(e,
3709l){var k=!1;0>l?(l=0,k=!0):l>c.nc.page.maxh&&(l=c.nc.page.maxh,k=!0);0>e?(e=0,k=!0):e>c.nc.page.maxw&&(e=c.nc.page.maxw,k=!0);k&&c.nc.doScrollPos(e,l,c.nc.opt.snapbackspeed)};this.doMomentum=function(e){var l=c.time(),k=e?l+e:c.lasttime;e=c.nc.getScrollLeft();var t=c.nc.getScrollTop(),b=c.nc.page.maxh,q=c.nc.page.maxw;c.speedx=0<q?Math.min(60,c.speedx):0;c.speedy=0<b?Math.min(60,c.speedy):0;k=k&&50>=l-k;if(0>t||t>b||0>e||e>q)k=!1;e=c.speedx&&k?c.speedx:!1;if(c.speedy&&k&&c.speedy||e){var f=Math.max(16,
3710c.steptime);50<f&&(e=f/50,c.speedx*=e,c.speedy*=e,f=50);c.demulxy=0;c.lastscrollx=c.nc.getScrollLeft();c.chkx=c.lastscrollx;c.lastscrolly=c.nc.getScrollTop();c.chky=c.lastscrolly;var r=c.lastscrollx,u=c.lastscrolly,d=function(){var e=600<c.time()-l?0.04:0.02;if(c.speedx&&(r=Math.floor(c.lastscrollx-c.speedx*(1-c.demulxy)),c.lastscrollx=r,0>r||r>q))e=0.1;if(c.speedy&&(u=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=u,0>u||u>b))e=0.1;c.demulxy=Math.min(1,c.demulxy+e);c.nc.synched("domomentum2d",
3711function(){c.speedx&&(c.nc.getScrollLeft()!=c.chkx&&c.stop(),c.chkx=r,c.nc.setScrollLeft(r));c.speedy&&(c.nc.getScrollTop()!=c.chky&&c.stop(),c.chky=u,c.nc.setScrollTop(u));c.timer||(c.nc.hideCursor(),c.doSnapy(r,u))});1>c.demulxy?c.timer=setTimeout(d,f):(c.stop(),c.nc.hideCursor(),c.doSnapy(r,u))};d()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},A=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(k,c,h){return(c=e.data(k,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():A.call(k)},
3712set:function(k,c){var h=e.data(k,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollTop(parseInt(c)):A.call(k,c);return this}};e.fn.scrollTop=function(k){if("undefined"==typeof k){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():A.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;
3712c&&c.ishwscroll?c.setScrollTop(parseInt(k)):A.call(e(this),k)})};var B=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(k,c,h){return(c=e.data(k,"__nicescroll")||
3713!1)&&c.ishwscroll?c.getScrollLeft():B.call(k)},set:function(k,c){var h=e.data(k,"__nicescroll")||!1;h&&h.ishwscroll?h.setScrollLeft(parseInt(c)):B.call(k,c);return this}};e.fn.scrollLeft=function(k){if("undefined"==typeof k){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():B.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(k)):B.call(e(this),k)})};var C=function(k){var c=this;this.length=
37140;this.name="nicescrollarray";this.each=function(e){for(var h=0;h<c.length;h++)e.call(c[h]);return c};this.push=function(e){c[c.length]=e;c.length++};this.eq=function(e){return c[e]};if(k)for(a=0;a<k.length;a++){var h=e.data(k[a],"__nicescroll")||!1;h&&(this[this.length]=h,this.length++)}return this};(function(e,c,h){for(var l=0;l<c.length;l++)h(e,c[l])})(C.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(e,c){e[c]=function(){var e=arguments;return this.each(function(){this[c].apply(this,
3715e)})}});e.fn.getNiceScroll=function(k){return"undefined"==typeof k?new C(this):e.data(this[k],"__nicescroll")||!1};e.extend(e.expr[":"],{nicescroll:function(k){return e.data(k,"__nicescroll")?!0:!1}});e.fn.niceScroll=function(k,c){"undefined"==typeof c&&("object"==typeof k&&!("jquery"in k))&&(c=k,k=!1);var h=new C;"undefined"==typeof c&&(c={});k&&(c.doc=e(k),c.win=e(this));var l=!("doc"in c);!l&&!("win"in c)&&(c.win=e(this));this.each(function(){var k=e(this).data("__nicescroll")||!1;k||(c.doc=l?
3716e(this):c.doc,k=new N(c,e(this)),e(this).data("__nicescroll",k));h.push(k)});return 1==h.length?h[0]:h};window.NiceScroll={getjQuery:function(){return e}};e.nicescroll||(e.nicescroll=new C,e.nicescroll.options=F)})(jQuery);
3717
3718
3719
3720/*------------------------------------------------------------------*/ 
3721/*	MAGNIFIC POPUP
3722/*------------------------------------------------------------------*/
3723
3724/*! Magnific Popup - v1.1.0 - 2016-02-20
3725* http://dimsemenov.com/plugins/magnific-popup/
3726* Copyright (c) 2016 Dmitry Semenov; */
3727!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(e){var t,n,i,o,r,a,s="Close",l="BeforeClose",c="AfterClose",d="BeforeAppend",u="MarkupParse",p="Open",f="Change",m="mfp",g="."+m,v="mfp-ready",h="mfp-removing",y="mfp-prevent-close",C=function(){},w=!!window.jQuery,b=e(window),I=function(e,n){t.ev.on(m+e+g,n)},x=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},k=function(n,i){t.ev.triggerHandler(m+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},T=function(n){return n===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new C,t.init(),e.magnificPopup.instance=t)},P=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};C.prototype={constructor:C,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=P(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var a,s=n.items;for(o=0;o<s.length;o++)if(a=s[o],a.parsed&&(a=a.el[0]),a===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return void t.updateItemHTML();t.types=[],r="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=x("bg").on("click"+g,function(){t.close()}),t.wrap=x("wrap").attr("tabindex",-1).on("click"+g,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=x("container",t.wrap)),t.contentContainer=x("content"),t.st.preloader&&(t.preloader=x("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var c=l[o];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].call(t)}k("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(I(u,function(e,t,n,i){n.close_replaceWith=T(i.type)}),r+=" mfp-close-btn-in"):t.wrap.append(T())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:b.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}
3727),t.st.enableEscapeKey&&i.on("keyup"+g,function(e){27===e.keyCode&&t.close()}),b.on("resize"+g,function(){t.updateSize()}),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var d=t.wH=b.height(),f={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(f.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):f.overflow="hidden");var h=t.st.mainClass;return t.isIE7&&(h+=" mfp-ie7"),h&&t._addClassToMFP(h),t.updateItemHTML(),k("BuildControls"),e("html").css(f),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),i.on("focusin"+g,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),k(p),n},close:function(){t.isOpen&&(k(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(h),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){k(s);var n=h+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}i.off("keyup"+g+" focusin"+g),t.ev.off(g),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,k(c)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||b.height();t.fixedContentPos||t.wrap.css("height",t.wH),k("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(k("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var r=t.st[i]?t.st[i].markup:!1;k("FirstMarkupParse",r),r?t.currTemplate[i]=e(r):t.currTemplate[i]=!0}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,k(f,n),o=n.type,t.container.prepend(t.contentContainer),k("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(T()):t.content=e:t.content="",k(d),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,k("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(b.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};k("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;
3727if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?i.height():document.body.scrollHeight)>(e||b.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),k(u,[t,n,i]),e.each(n,function(n,i){if(void 0===i||i===!1)return!0;if(o=n.split("_"),o.length>1){var r=t.find(g+"-"+o[0]);if(r.length>0){var a=o[1];"replaceWith"===a?r[0]!==i[0]&&r.replaceWith(i):"img"===a?r.is("img")?r.attr("src",i):r.replaceWith(e("<img>").attr("src",i).attr("class",r.attr("class"))):r.attr(o[1],i)}}else t.find(g+"-"+n).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:C.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=w?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),w?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var S,E,z,O="inline",M=function(){z&&(E.after(z.addClass(S)).detach(),z=null)};e.magnificPopup.registerModule(O,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(O),I(s+"."+O,function(){M()})},getInline:function(n,i){if(M(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(E||(S=o.hiddenClass,E=x(S),S="mfp-"+S),z=r.after(E).detach().removeClass(S)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var B,L="ajax",H=function(){B&&e(document.body).removeClass(B)},A=function(){H(),t.req&&t.req.abort()};e.magnificPopup.registerModule(L,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(L),B=t.st.ajax.cursor,I(s+"."+L,A),I("BeforeChange."+L,A)},getAjax:function(n){B&&e(document.body).addClass(B),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};k("ParseAjax",a),t.appendContent(e(a.data),L),n.finished=!0,H(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),k("AjaxContentAdded")},error:function(){H(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var F,j=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;
3727var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),I(p+i,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),I(s+i,function(){n.cursor&&e(document.body).removeClass(n.cursor),b.off("resize"+g)}),I("Resize"+i,t.resizeImage),t.isLowIE&&I("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,F&&clearInterval(F),e.isCheckingImgSize=!1,k("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){F&&clearInterval(F),F=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(F),n++,void(3===n?o(10):40===n?o(50):100===n&&o(500)))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,k("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:j(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(F&&clearInterval(F),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var N,W=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};I("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void d();r=c(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,k("ZoomAnimationEnded")},16)},a)},16)}}),I(l+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=c(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),I(s+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(w?i.innerHeight():i[0].offsetHeight)-a-r};
3727return W()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",R=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),I("BeforeChange",function(e,t,n){t!==n&&(t===Z?R():n===Z&&R(!0))}),I(s+"."+Z,function(){R()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},D=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";return t.direction=!0,n&&n.enabled?(r+=" mfp-gallery",I(p+o,function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),i.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}
3727),I("UpdateStatus"+o,function(e,n){n.text&&(n.text=D(n.text,t.currItem.index,t.items.length))}),I(u+o,function(e,i,o,r){var a=t.items.length;o.counter=a>1?D(n.tCounter,r.index,a):""}),I("BuildControls"+o,function(){if(t.items.length>1&&n.arrows&&!t.arrowleft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),r=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y);o.click(function(){t.prev()}),r.click(function(){t.next()}),t.container.append(o.add(r))}}),I(f+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void I(s+o,function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),k("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,k("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(I("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),I("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),_()});
3728

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.