').parent();\n _.$slideTrack.css('opacity', 0);\n if (_.options.centerMode === true || _.options.swipeToSlide === true) {\n _.options.slidesToScroll = 1;\n }\n $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');\n _.setupInfinite();\n _.buildArrows();\n _.buildDots();\n _.updateDots();\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n if (_.options.draggable === true) {\n _.$list.addClass('draggable');\n }\n };\n Slick.prototype.buildRows = function () {\n var _ = this,\n a,\n b,\n c,\n newSlides,\n numOfSlides,\n originalSlides,\n slidesPerSection;\n newSlides = document.createDocumentFragment();\n originalSlides = _.$slider.children();\n if (_.options.rows > 1) {\n slidesPerSection = _.options.slidesPerRow * _.options.rows;\n numOfSlides = Math.ceil(originalSlides.length / slidesPerSection);\n for (a = 0; a < numOfSlides; a++) {\n var slide = document.createElement('div');\n for (b = 0; b < _.options.rows; b++) {\n var row = document.createElement('div');\n for (c = 0; c < _.options.slidesPerRow; c++) {\n var target = a * slidesPerSection + (b * _.options.slidesPerRow + c);\n if (originalSlides.get(target)) {\n row.appendChild(originalSlides.get(target));\n }\n }\n slide.appendChild(row);\n }\n newSlides.appendChild(slide);\n }\n _.$slider.empty().append(newSlides);\n _.$slider.children().children().children().css({\n 'width': 100 / _.options.slidesPerRow + '%',\n 'display': 'inline-block'\n });\n }\n };\n Slick.prototype.checkResponsive = function (initial, forceUpdate) {\n var _ = this,\n breakpoint,\n targetBreakpoint,\n respondToWidth,\n triggerBreakpoint = false;\n var sliderWidth = _.$slider.width();\n var windowWidth = window.innerWidth || $(window).width();\n if (_.respondTo === 'window') {\n respondToWidth = windowWidth;\n } else if (_.respondTo === 'slider') {\n respondToWidth = sliderWidth;\n } else if (_.respondTo === 'min') {\n respondToWidth = Math.min(windowWidth, sliderWidth);\n }\n if (_.options.responsive && _.options.responsive.length && _.options.responsive !== null) {\n targetBreakpoint = null;\n for (breakpoint in _.breakpoints) {\n if (_.breakpoints.hasOwnProperty(breakpoint)) {\n if (_.originalSettings.mobileFirst === false) {\n if (respondToWidth < _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n } else {\n if (respondToWidth > _.breakpoints[breakpoint]) {\n targetBreakpoint = _.breakpoints[breakpoint];\n }\n }\n }\n }\n if (targetBreakpoint !== null) {\n if (_.activeBreakpoint !== null) {\n if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {\n _.activeBreakpoint = targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n _.activeBreakpoint = targetBreakpoint;\n if (_.breakpointSettings[targetBreakpoint] === 'unslick') {\n _.unslick(targetBreakpoint);\n } else {\n _.options = $.extend({}, _.originalSettings, _.breakpointSettings[targetBreakpoint]);\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n }\n triggerBreakpoint = targetBreakpoint;\n }\n } else {\n if (_.activeBreakpoint !== null) {\n _.activeBreakpoint = null;\n _.options = _.originalSettings;\n if (initial === true) {\n _.currentSlide = _.options.initialSlide;\n }\n _.refresh(initial);\n triggerBreakpoint = targetBreakpoint;\n }\n }\n\n // only trigger breakpoints during an actual break. not on initialize.\n if (!initial && triggerBreakpoint !== false) {\n _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);\n }\n }\n };\n Slick.prototype.changeSlide = function (event, dontAnimate) {\n var _ = this,\n $target = $(event.currentTarget),\n indexOffset,\n slideOffset,\n unevenOffset;\n\n // If target is a link, prevent default action.\n if ($target.is('a')) {\n event.preventDefault();\n }\n\n // If target is not the
element (ie: a child), find the .\n if (!$target.is('li')) {\n $target = $target.closest('li');\n }\n unevenOffset = _.slideCount % _.options.slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;\n switch (event.data.message) {\n case 'previous':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);\n }\n break;\n case 'next':\n slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;\n if (_.slideCount > _.options.slidesToShow) {\n _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);\n }\n break;\n case 'index':\n var index = event.data.index === 0 ? 0 : event.data.index || $target.index() * _.options.slidesToScroll;\n _.slideHandler(_.checkNavigable(index), false, dontAnimate);\n $target.children().trigger('focus');\n break;\n default:\n return;\n }\n };\n Slick.prototype.checkNavigable = function (index) {\n var _ = this,\n navigables,\n prevNavigable;\n navigables = _.getNavigableIndexes();\n prevNavigable = 0;\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n prevNavigable = navigables[n];\n }\n }\n return index;\n };\n Slick.prototype.cleanUpEvents = function () {\n var _ = this;\n if (_.options.dots && _.$dots !== null) {\n $('li', _.$dots).off('click.slick', _.changeSlide).off('mouseenter.slick', $.proxy(_.interrupt, _, true)).off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n }\n _.$slider.off('focus.slick blur.slick');\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);\n _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);\n }\n _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);\n _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);\n _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);\n _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);\n _.$list.off('click.slick', _.clickHandler);\n $(document).off(_.visibilityChange, _.visibility);\n _.cleanUpSlideEvents();\n if (_.options.accessibility === true) {\n _.$list.off('keydown.slick', _.keyHandler);\n }\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().off('click.slick', _.selectHandler);\n }\n $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);\n $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);\n $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);\n $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);\n $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);\n };\n Slick.prototype.cleanUpSlideEvents = function () {\n var _ = this;\n _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));\n _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));\n };\n Slick.prototype.cleanUpRows = function () {\n var _ = this,\n originalSlides;\n if (_.options.rows > 1) {\n originalSlides = _.$slides.children().children();\n originalSlides.removeAttr('style');\n _.$slider.empty().append(originalSlides);\n }\n };\n Slick.prototype.clickHandler = function (event) {\n var _ = this;\n if (_.shouldClick === false) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n event.preventDefault();\n }\n };\n Slick.prototype.destroy = function (refresh) {\n var _ = this;\n _.autoPlayClear();\n _.touchObject = {};\n _.cleanUpEvents();\n $('.slick-cloned', _.$slider).detach();\n if (_.$dots) {\n _.$dots.remove();\n }\n if (_.$prevArrow && _.$prevArrow.length) {\n _.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', '');\n if (_.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.remove();\n }\n }\n if (_.$nextArrow && _.$nextArrow.length) {\n _.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display', '');\n if (_.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.remove();\n }\n }\n if (_.$slides) {\n _.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function () {\n $(this).attr('style', $(this).data('originalStyling'));\n });\n _.$slideTrack.children(this.options.slide).detach();\n _.$slideTrack.detach();\n _.$list.detach();\n _.$slider.append(_.$slides);\n }\n _.cleanUpRows();\n _.$slider.removeClass('slick-slider');\n _.$slider.removeClass('slick-initialized');\n _.$slider.removeClass('slick-dotted');\n _.unslicked = true;\n if (!refresh) {\n _.$slider.trigger('destroy', [_]);\n }\n };\n Slick.prototype.disableTransition = function (slide) {\n var _ = this,\n transition = {};\n transition[_.transitionType] = '';\n if (_.options.fade === false) {\n _.$slideTrack.css(transition);\n } else {\n _.$slides.eq(slide).css(transition);\n }\n };\n Slick.prototype.fadeSlide = function (slideIndex, callback) {\n var _ = this;\n if (_.cssTransitions === false) {\n _.$slides.eq(slideIndex).css({\n zIndex: _.options.zIndex\n });\n _.$slides.eq(slideIndex).animate({\n opacity: 1\n }, _.options.speed, _.options.easing, callback);\n } else {\n _.applyTransition(slideIndex);\n _.$slides.eq(slideIndex).css({\n opacity: 1,\n zIndex: _.options.zIndex\n });\n if (callback) {\n setTimeout(function () {\n _.disableTransition(slideIndex);\n callback.call();\n }, _.options.speed);\n }\n }\n };\n Slick.prototype.fadeSlideOut = function (slideIndex) {\n var _ = this;\n if (_.cssTransitions === false) {\n _.$slides.eq(slideIndex).animate({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n }, _.options.speed, _.options.easing);\n } else {\n _.applyTransition(slideIndex);\n _.$slides.eq(slideIndex).css({\n opacity: 0,\n zIndex: _.options.zIndex - 2\n });\n }\n };\n Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {\n var _ = this;\n if (filter !== null) {\n _.$slidesCache = _.$slides;\n _.unload();\n _.$slideTrack.children(this.options.slide).detach();\n _.$slidesCache.filter(filter).appendTo(_.$slideTrack);\n _.reinit();\n }\n };\n Slick.prototype.focusHandler = function () {\n var _ = this;\n _.$slider.off('focus.slick blur.slick').on('focus.slick blur.slick', '*:not(.slick-arrow)', function (event) {\n event.stopImmediatePropagation();\n var $sf = $(this);\n setTimeout(function () {\n if (_.options.pauseOnFocus) {\n _.focussed = $sf.is(':focus');\n _.autoPlay();\n }\n }, 0);\n });\n };\n Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {\n var _ = this;\n return _.currentSlide;\n };\n Slick.prototype.getDotCount = function () {\n var _ = this;\n var breakPoint = 0;\n var counter = 0;\n var pagerQty = 0;\n if (_.options.infinite === true) {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n } else if (_.options.centerMode === true) {\n pagerQty = _.slideCount;\n } else if (!_.options.asNavFor) {\n pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);\n } else {\n while (breakPoint < _.slideCount) {\n ++pagerQty;\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n }\n return pagerQty - 1;\n };\n Slick.prototype.getLeft = function (slideIndex) {\n var _ = this,\n targetLeft,\n verticalHeight,\n verticalOffset = 0,\n targetSlide;\n _.slideOffset = 0;\n verticalHeight = _.$slides.first().outerHeight(true);\n if (_.options.infinite === true) {\n if (_.slideCount > _.options.slidesToShow) {\n _.slideOffset = _.slideWidth * _.options.slidesToShow * -1;\n verticalOffset = verticalHeight * _.options.slidesToShow * -1;\n }\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {\n if (slideIndex > _.slideCount) {\n _.slideOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth * -1;\n verticalOffset = (_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight * -1;\n } else {\n _.slideOffset = _.slideCount % _.options.slidesToScroll * _.slideWidth * -1;\n verticalOffset = _.slideCount % _.options.slidesToScroll * verticalHeight * -1;\n }\n }\n }\n } else {\n if (slideIndex + _.options.slidesToShow > _.slideCount) {\n _.slideOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * _.slideWidth;\n verticalOffset = (slideIndex + _.options.slidesToShow - _.slideCount) * verticalHeight;\n }\n }\n if (_.slideCount <= _.options.slidesToShow) {\n _.slideOffset = 0;\n verticalOffset = 0;\n }\n if (_.options.centerMode === true && _.options.infinite === true) {\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;\n } else if (_.options.centerMode === true) {\n _.slideOffset = 0;\n _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);\n }\n if (_.options.vertical === false) {\n targetLeft = slideIndex * _.slideWidth * -1 + _.slideOffset;\n } else {\n targetLeft = slideIndex * verticalHeight * -1 + verticalOffset;\n }\n if (_.options.variableWidth === true) {\n if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);\n }\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n if (_.options.centerMode === true) {\n if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);\n } else {\n targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);\n }\n if (_.options.rtl === true) {\n if (targetSlide[0]) {\n targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;\n } else {\n targetLeft = 0;\n }\n } else {\n targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;\n }\n targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;\n }\n }\n return targetLeft;\n };\n Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {\n var _ = this;\n return _.options[option];\n };\n Slick.prototype.getNavigableIndexes = function () {\n var _ = this,\n breakPoint = 0,\n counter = 0,\n indexes = [],\n max;\n if (_.options.infinite === false) {\n max = _.slideCount;\n } else {\n breakPoint = _.options.slidesToScroll * -1;\n counter = _.options.slidesToScroll * -1;\n max = _.slideCount * 2;\n }\n while (breakPoint < max) {\n indexes.push(breakPoint);\n breakPoint = counter + _.options.slidesToScroll;\n counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;\n }\n return indexes;\n };\n Slick.prototype.getSlick = function () {\n return this;\n };\n Slick.prototype.getSlideCount = function () {\n var _ = this,\n slidesTraversed,\n swipedSlide,\n centerOffset;\n centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;\n if (_.options.swipeToSlide === true) {\n _.$slideTrack.find('.slick-slide').each(function (index, slide) {\n if (slide.offsetLeft - centerOffset + $(slide).outerWidth() / 2 > _.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n });\n slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;\n return slidesTraversed;\n } else {\n return _.options.slidesToScroll;\n }\n };\n Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {\n var _ = this;\n _.changeSlide({\n data: {\n message: 'index',\n index: parseInt(slide)\n }\n }, dontAnimate);\n };\n Slick.prototype.init = function (creation) {\n var _ = this;\n if (!$(_.$slider).hasClass('slick-initialized')) {\n $(_.$slider).addClass('slick-initialized');\n _.buildRows();\n _.buildOut();\n _.setProps();\n _.startLoad();\n _.loadSlider();\n _.initializeEvents();\n _.updateArrows();\n _.updateDots();\n _.checkResponsive(true);\n _.focusHandler();\n }\n if (creation) {\n _.$slider.trigger('init', [_]);\n }\n if (_.options.accessibility === true) {\n _.initADA();\n }\n if (_.options.autoplay) {\n _.paused = false;\n _.autoPlay();\n }\n _.$slider.trigger('afterInit', [_]);\n };\n Slick.prototype.initADA = function () {\n var _ = this;\n var numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow);\n _.$slides.add(_.$slideTrack.find('.slick-cloned'))\n //.attr({\n //'aria-hidden': 'true',\n //'tabindex': '0'\n //})\n .find('a, input, button, select').attr({\n 'tabindex': '0'\n });\n\n //_.$slideTrack.attr('role', 'listbox');\n _.$slideTrack.attr('aria-label', 'List of clickable items');\n _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {\n $(this).attr({\n //'role': 'option',\n 'aria-describedby': 'slick-slide' + _.instanceUid + i + ''\n });\n });\n if (_.$dots !== null) {\n //_.$dots.attr('role', 'tablist').find('li').each(function(i) {\n _.$dots.find('li').each(function (i) {\n $(this).attr({\n //'role': 'presentation',\n //'aria-selected': 'false',\n //'aria-controls': 'navigation' + _.instanceUid + i + '',\n 'id': 'slick-slide' + _.instanceUid + i + ''\n });\n $(this).find('button').first().attr({\n 'aria-label': 'Slide ' + (i + 1) + ' of ' + numDotGroups,\n 'aria-current': null\n });\n });\n //.first().attr('aria-selected', 'true').end()\n //.find('button').attr('role', 'button').end()\n //.closest('div').attr('role', 'toolbar');\n }\n _.activateADA();\n };\n Slick.prototype.initArrowEvents = function () {\n var _ = this;\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow.off('click.slick').on('click.slick', {\n message: 'previous'\n }, _.changeSlide);\n _.$nextArrow.off('click.slick').on('click.slick', {\n message: 'next'\n }, _.changeSlide);\n }\n };\n Slick.prototype.initDotEvents = function () {\n var _ = this;\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n $('li', _.$dots).on('click.slick', {\n message: 'index'\n }, _.changeSlide);\n }\n if (_.options.dots === true && _.options.pauseOnDotsHover === true) {\n $('li', _.$dots).on('mouseenter.slick', $.proxy(_.interrupt, _, true)).on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n }\n };\n Slick.prototype.initSlideEvents = function () {\n var _ = this;\n if (_.options.pauseOnHover) {\n _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));\n _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));\n }\n };\n Slick.prototype.initializeEvents = function () {\n var _ = this;\n _.initArrowEvents();\n _.initDotEvents();\n _.initSlideEvents();\n _.$list.on('touchstart.slick mousedown.slick', {\n action: 'start'\n }, _.swipeHandler);\n _.$list.on('touchmove.slick mousemove.slick', {\n action: 'move'\n }, _.swipeHandler);\n _.$list.on('touchend.slick mouseup.slick', {\n action: 'end'\n }, _.swipeHandler);\n _.$list.on('touchcancel.slick mouseleave.slick', {\n action: 'end'\n }, _.swipeHandler);\n _.$list.on('click.slick', _.clickHandler);\n $(document).on(_.visibilityChange, $.proxy(_.visibility, _));\n if (_.options.accessibility === true) {\n _.$list.on('keydown.slick', _.keyHandler);\n }\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));\n $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));\n $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);\n $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);\n $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);\n };\n Slick.prototype.initUI = function () {\n var _ = this;\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow.show();\n _.$nextArrow.show();\n }\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n _.$dots.show();\n }\n };\n Slick.prototype.keyHandler = function (event) {\n var _ = this;\n //Dont slide if the cursor is inside the form fields and arrow keys are pressed\n if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {\n if (event.keyCode === 37 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'next' : 'previous'\n }\n });\n } else if (event.keyCode === 39 && _.options.accessibility === true) {\n _.changeSlide({\n data: {\n message: _.options.rtl === true ? 'previous' : 'next'\n }\n });\n }\n }\n };\n Slick.prototype.lazyLoad = function () {\n var _ = this,\n loadRange,\n cloneRange,\n rangeStart,\n rangeEnd;\n function loadImages(imagesScope) {\n $('img[data-lazy]', imagesScope).each(function () {\n var image = $(this),\n imageSource = $(this).attr('data-lazy'),\n imageToLoad = document.createElement('img');\n imageToLoad.onload = function () {\n image.animate({\n opacity: 0\n }, 100, function () {\n image.attr('src', imageSource).animate({\n opacity: 1\n }, 200, function () {\n image.removeAttr('data-lazy').removeClass('slick-loading');\n });\n _.$slider.trigger('lazyLoaded', [_, image, imageSource]);\n });\n };\n imageToLoad.onerror = function () {\n image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');\n _.$slider.trigger('lazyLoadError', [_, image, imageSource]);\n };\n imageToLoad.src = imageSource;\n });\n }\n if (_.options.centerMode === true) {\n if (_.options.infinite === true) {\n rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);\n rangeEnd = rangeStart + _.options.slidesToShow + 2;\n } else {\n rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));\n rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;\n }\n } else {\n rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;\n rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);\n if (_.options.fade === true) {\n if (rangeStart > 0) rangeStart--;\n if (rangeEnd <= _.slideCount) rangeEnd++;\n }\n }\n loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);\n loadImages(loadRange);\n if (_.slideCount <= _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-slide');\n loadImages(cloneRange);\n } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {\n cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);\n loadImages(cloneRange);\n } else if (_.currentSlide === 0) {\n cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);\n loadImages(cloneRange);\n }\n };\n Slick.prototype.loadSlider = function () {\n var _ = this;\n _.setPosition();\n _.$slideTrack.css({\n opacity: 1\n });\n _.$slider.removeClass('slick-loading');\n _.initUI();\n if (_.options.lazyLoad === 'progressive') {\n _.progressiveLazyLoad();\n }\n };\n Slick.prototype.next = Slick.prototype.slickNext = function () {\n var _ = this;\n _.changeSlide({\n data: {\n message: 'next'\n }\n });\n };\n Slick.prototype.orientationChange = function () {\n var _ = this;\n _.checkResponsive();\n _.setPosition();\n };\n Slick.prototype.pause = Slick.prototype.slickPause = function () {\n var _ = this;\n _.autoPlayClear();\n _.paused = true;\n };\n Slick.prototype.play = Slick.prototype.slickPlay = function () {\n var _ = this;\n _.autoPlay();\n _.options.autoplay = true;\n _.paused = false;\n _.focussed = false;\n _.interrupted = false;\n };\n Slick.prototype.postSlide = function (index) {\n var _ = this;\n if (!_.unslicked) {\n _.$slider.trigger('afterChange', [_, index]);\n _.animating = false;\n _.setPosition();\n _.swipeLeft = null;\n if (_.options.autoplay) {\n _.autoPlay();\n }\n if (_.options.accessibility === true) {\n _.initADA();\n }\n }\n };\n Slick.prototype.prev = Slick.prototype.slickPrev = function () {\n var _ = this;\n _.changeSlide({\n data: {\n message: 'previous'\n }\n });\n };\n Slick.prototype.preventDefault = function (event) {\n event.preventDefault();\n };\n Slick.prototype.progressiveLazyLoad = function (tryCount) {\n tryCount = tryCount || 1;\n var _ = this,\n $imgsToLoad = $('img[data-lazy]', _.$slider),\n image,\n imageSource,\n imageToLoad;\n if ($imgsToLoad.length) {\n image = $imgsToLoad.first();\n imageSource = image.attr('data-lazy');\n imageToLoad = document.createElement('img');\n imageToLoad.onload = function () {\n image.attr('src', imageSource).removeAttr('data-lazy').removeClass('slick-loading');\n if (_.options.adaptiveHeight === true) {\n _.setPosition();\n }\n _.$slider.trigger('lazyLoaded', [_, image, imageSource]);\n _.progressiveLazyLoad();\n };\n imageToLoad.onerror = function () {\n if (tryCount < 3) {\n /**\r\n * try to load the image 3 times,\r\n * leave a slight delay so we don't get\r\n * servers blocking the request.\r\n */\n setTimeout(function () {\n _.progressiveLazyLoad(tryCount + 1);\n }, 500);\n } else {\n image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');\n _.$slider.trigger('lazyLoadError', [_, image, imageSource]);\n _.progressiveLazyLoad();\n }\n };\n imageToLoad.src = imageSource;\n } else {\n _.$slider.trigger('allImagesLoaded', [_]);\n }\n };\n Slick.prototype.refresh = function (initializing) {\n var _ = this,\n currentSlide,\n lastVisibleIndex;\n lastVisibleIndex = _.slideCount - _.options.slidesToShow;\n\n // in non-infinite sliders, we don't want to go past the\n // last visible index.\n if (!_.options.infinite && _.currentSlide > lastVisibleIndex) {\n _.currentSlide = lastVisibleIndex;\n }\n\n // if less slides than to show, go to start.\n if (_.slideCount <= _.options.slidesToShow) {\n _.currentSlide = 0;\n }\n currentSlide = _.currentSlide;\n _.destroy(true);\n $.extend(_, _.initials, {\n currentSlide: currentSlide\n });\n _.init();\n if (!initializing) {\n _.changeSlide({\n data: {\n message: 'index',\n index: currentSlide\n }\n }, false);\n }\n };\n Slick.prototype.registerBreakpoints = function () {\n var _ = this,\n breakpoint,\n currentBreakpoint,\n l,\n responsiveSettings = _.options.responsive || null;\n if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {\n _.respondTo = _.options.respondTo || 'window';\n for (breakpoint in responsiveSettings) {\n l = _.breakpoints.length - 1;\n currentBreakpoint = responsiveSettings[breakpoint].breakpoint;\n if (responsiveSettings.hasOwnProperty(breakpoint)) {\n // loop through the breakpoints and cut out any existing\n // ones with the same breakpoint number, we don't want dupes.\n while (l >= 0) {\n if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {\n _.breakpoints.splice(l, 1);\n }\n l--;\n }\n _.breakpoints.push(currentBreakpoint);\n _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;\n }\n }\n _.breakpoints.sort(function (a, b) {\n return _.options.mobileFirst ? a - b : b - a;\n });\n }\n };\n Slick.prototype.reinit = function () {\n var _ = this;\n _.$slides = _.$slideTrack.children(_.options.slide).addClass('slick-slide');\n _.slideCount = _.$slides.length;\n if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {\n _.currentSlide = _.currentSlide - _.options.slidesToScroll;\n }\n if (_.slideCount <= _.options.slidesToShow) {\n _.currentSlide = 0;\n }\n _.registerBreakpoints();\n _.setProps();\n _.setupInfinite();\n _.buildArrows();\n _.updateArrows();\n _.initArrowEvents();\n _.buildDots();\n _.updateDots();\n _.initDotEvents();\n _.cleanUpSlideEvents();\n _.initSlideEvents();\n _.checkResponsive(false, true);\n if (_.options.focusOnSelect === true) {\n $(_.$slideTrack).children().on('click.slick', _.selectHandler);\n }\n _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);\n _.setPosition();\n _.focusHandler();\n _.paused = !_.options.autoplay;\n _.autoPlay();\n _.$slider.trigger('reInit', [_]);\n };\n Slick.prototype.resize = function () {\n var _ = this;\n if ($(window).width() !== _.windowWidth) {\n clearTimeout(_.windowDelay);\n _.windowDelay = window.setTimeout(function () {\n _.windowWidth = $(window).width();\n _.checkResponsive();\n if (!_.unslicked) {\n _.setPosition();\n }\n }, 50);\n }\n };\n Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {\n var _ = this;\n if (typeof index === 'boolean') {\n removeBefore = index;\n index = removeBefore === true ? 0 : _.slideCount - 1;\n } else {\n index = removeBefore === true ? --index : index;\n }\n if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {\n return false;\n }\n _.unload();\n if (removeAll === true) {\n _.$slideTrack.children().remove();\n } else {\n _.$slideTrack.children(this.options.slide).eq(index).remove();\n }\n _.$slides = _.$slideTrack.children(this.options.slide);\n _.$slideTrack.children(this.options.slide).detach();\n _.$slideTrack.append(_.$slides);\n _.$slidesCache = _.$slides;\n _.reinit();\n };\n Slick.prototype.setCSS = function (position) {\n var _ = this,\n positionProps = {},\n x,\n y;\n if (_.options.rtl === true) {\n position = -position;\n }\n x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';\n y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';\n positionProps[_.positionProp] = position;\n if (_.transformsEnabled === false) {\n _.$slideTrack.css(positionProps);\n } else {\n positionProps = {};\n if (_.cssTransitions === false) {\n positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';\n _.$slideTrack.css(positionProps);\n } else {\n positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';\n _.$slideTrack.css(positionProps);\n }\n }\n };\n Slick.prototype.setDimensions = function () {\n var _ = this;\n if (_.options.vertical === false) {\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: '0px ' + _.options.centerPadding\n });\n }\n } else {\n _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);\n if (_.options.centerMode === true) {\n _.$list.css({\n padding: _.options.centerPadding + ' 0px'\n });\n }\n }\n _.listWidth = _.$list.width();\n _.listHeight = _.$list.height();\n if (_.options.vertical === false && _.options.variableWidth === false) {\n _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);\n _.$slideTrack.width(Math.ceil(_.slideWidth * _.$slideTrack.children('.slick-slide').length));\n } else if (_.options.variableWidth === true) {\n _.$slideTrack.width(5000 * _.slideCount);\n } else {\n _.slideWidth = Math.ceil(_.listWidth);\n _.$slideTrack.height(Math.ceil(_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length));\n }\n var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();\n if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);\n };\n Slick.prototype.setFade = function () {\n var _ = this,\n targetLeft;\n _.$slides.each(function (index, element) {\n targetLeft = _.slideWidth * index * -1;\n if (_.options.rtl === true) {\n $(element).css({\n position: 'relative',\n right: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n } else {\n $(element).css({\n position: 'relative',\n left: targetLeft,\n top: 0,\n zIndex: _.options.zIndex - 2,\n opacity: 0\n });\n }\n });\n _.$slides.eq(_.currentSlide).css({\n zIndex: _.options.zIndex - 1,\n opacity: 1\n });\n };\n Slick.prototype.setHeight = function () {\n var _ = this;\n if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {\n var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);\n _.$list.css('height', targetHeight);\n }\n };\n Slick.prototype.setOption = Slick.prototype.slickSetOption = function () {\n /**\r\n * accepts arguments in format of:\r\n *\r\n * - for changing a single option's value:\r\n * .slick(\"setOption\", option, value, refresh )\r\n *\r\n * - for changing a set of responsive options:\r\n * .slick(\"setOption\", 'responsive', [{}, ...], refresh )\r\n *\r\n * - for updating multiple values at once (not responsive)\r\n * .slick(\"setOption\", { 'option': value, ... }, refresh )\r\n */\n\n var _ = this,\n l,\n item,\n option,\n value,\n refresh = false,\n type;\n if ($.type(arguments[0]) === 'object') {\n option = arguments[0];\n refresh = arguments[1];\n type = 'multiple';\n } else if ($.type(arguments[0]) === 'string') {\n option = arguments[0];\n value = arguments[1];\n refresh = arguments[2];\n if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {\n type = 'responsive';\n } else if (typeof arguments[1] !== 'undefined') {\n type = 'single';\n }\n }\n if (type === 'single') {\n _.options[option] = value;\n } else if (type === 'multiple') {\n $.each(option, function (opt, val) {\n _.options[opt] = val;\n });\n } else if (type === 'responsive') {\n for (item in value) {\n if ($.type(_.options.responsive) !== 'array') {\n _.options.responsive = [value[item]];\n } else {\n l = _.options.responsive.length - 1;\n\n // loop through the responsive object and splice out duplicates.\n while (l >= 0) {\n if (_.options.responsive[l].breakpoint === value[item].breakpoint) {\n _.options.responsive.splice(l, 1);\n }\n l--;\n }\n _.options.responsive.push(value[item]);\n }\n }\n }\n if (refresh) {\n _.unload();\n _.reinit();\n }\n };\n Slick.prototype.setPosition = function () {\n var _ = this;\n _.setDimensions();\n _.setHeight();\n if (_.options.fade === false) {\n _.setCSS(_.getLeft(_.currentSlide));\n } else {\n _.setFade();\n }\n _.$slider.trigger('setPosition', [_]);\n };\n Slick.prototype.setProps = function () {\n var _ = this,\n bodyStyle = document.body.style;\n _.positionProp = _.options.vertical === true ? 'top' : 'left';\n if (_.positionProp === 'top') {\n _.$slider.addClass('slick-vertical');\n } else {\n _.$slider.removeClass('slick-vertical');\n }\n if (bodyStyle.WebkitTransition !== undefined || bodyStyle.MozTransition !== undefined || bodyStyle.msTransition !== undefined) {\n if (_.options.useCSS === true) {\n _.cssTransitions = true;\n }\n }\n if (_.options.fade) {\n if (typeof _.options.zIndex === 'number') {\n if (_.options.zIndex < 3) {\n _.options.zIndex = 3;\n }\n } else {\n _.options.zIndex = _.defaults.zIndex;\n }\n }\n if (bodyStyle.OTransform !== undefined) {\n _.animType = 'OTransform';\n _.transformType = '-o-transform';\n _.transitionType = 'OTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.MozTransform !== undefined) {\n _.animType = 'MozTransform';\n _.transformType = '-moz-transform';\n _.transitionType = 'MozTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.webkitTransform !== undefined) {\n _.animType = 'webkitTransform';\n _.transformType = '-webkit-transform';\n _.transitionType = 'webkitTransition';\n if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;\n }\n if (bodyStyle.msTransform !== undefined) {\n _.animType = 'msTransform';\n _.transformType = '-ms-transform';\n _.transitionType = 'msTransition';\n if (bodyStyle.msTransform === undefined) _.animType = false;\n }\n if (bodyStyle.transform !== undefined && _.animType !== false) {\n _.animType = 'transform';\n _.transformType = 'transform';\n _.transitionType = 'transition';\n }\n _.transformsEnabled = _.options.useTransform && _.animType !== null && _.animType !== false;\n };\n Slick.prototype.setSlideClasses = function (index) {\n var _ = this,\n centerOffset,\n allSlides,\n indexOffset,\n remainder;\n allSlides = _.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden', 'true');\n _.$slides.eq(index).addClass('slick-current');\n if (_.options.centerMode === true) {\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n if (_.options.infinite === true) {\n if (index >= centerOffset && index <= _.slideCount - 1 - centerOffset) {\n _.$slides.slice(index - centerOffset, index + centerOffset + 1).addClass('slick-active').attr('aria-hidden', 'false');\n } else {\n indexOffset = _.options.slidesToShow + index;\n allSlides.slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2).addClass('slick-active').attr('aria-hidden', 'false');\n }\n if (index === 0) {\n allSlides.eq(allSlides.length - 1 - _.options.slidesToShow).addClass('slick-center');\n } else if (index === _.slideCount - 1) {\n allSlides.eq(_.options.slidesToShow).addClass('slick-center');\n }\n }\n _.$slides.eq(index).addClass('slick-center');\n } else {\n if (index >= 0 && index <= _.slideCount - _.options.slidesToShow) {\n _.$slides.slice(index, index + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');\n } else if (allSlides.length <= _.options.slidesToShow) {\n allSlides.addClass('slick-active').attr('aria-hidden', 'false');\n } else {\n remainder = _.slideCount % _.options.slidesToShow;\n indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;\n if (_.options.slidesToShow == _.options.slidesToScroll && _.slideCount - index < _.options.slidesToShow) {\n allSlides.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder).addClass('slick-active').attr('aria-hidden', 'false');\n } else {\n allSlides.slice(indexOffset, indexOffset + _.options.slidesToShow).addClass('slick-active').attr('aria-hidden', 'false');\n }\n }\n }\n if (_.options.lazyLoad === 'ondemand') {\n _.lazyLoad();\n }\n };\n Slick.prototype.setupInfinite = function () {\n var _ = this,\n i,\n slideIndex,\n infiniteCount;\n if (_.options.fade === true) {\n _.options.centerMode = false;\n }\n if (_.options.infinite === true && _.options.fade === false) {\n slideIndex = null;\n if (_.slideCount > _.options.slidesToShow) {\n if (_.options.centerMode === true) {\n infiniteCount = _.options.slidesToShow + 1;\n } else {\n infiniteCount = _.options.slidesToShow;\n }\n for (i = _.slideCount; i > _.slideCount - infiniteCount; i -= 1) {\n slideIndex = i - 1;\n $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex - _.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned');\n }\n for (i = 0; i < infiniteCount; i += 1) {\n slideIndex = i;\n $(_.$slides[slideIndex]).clone(true).attr('id', '').attr('data-slick-index', slideIndex + _.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned');\n }\n _.$slideTrack.find('.slick-cloned').find('[id]').each(function () {\n $(this).attr('id', '');\n });\n }\n }\n };\n Slick.prototype.interrupt = function (toggle) {\n var _ = this;\n if (!toggle) {\n _.autoPlay();\n }\n _.interrupted = toggle;\n };\n Slick.prototype.selectHandler = function (event) {\n var _ = this;\n var targetElement = $(event.target).is('.slick-slide') ? $(event.target) : $(event.target).parents('.slick-slide');\n var index = parseInt(targetElement.attr('data-slick-index'));\n if (!index) index = 0;\n if (_.slideCount <= _.options.slidesToShow) {\n _.setSlideClasses(index);\n _.asNavFor(index);\n return;\n }\n _.slideHandler(index);\n };\n Slick.prototype.slideHandler = function (index, sync, dontAnimate) {\n var targetSlide,\n animSlide,\n oldSlide,\n slideLeft,\n targetLeft = null,\n _ = this,\n navTarget;\n sync = sync || false;\n if (_.animating === true && _.options.waitForAnimate === true) {\n return;\n }\n if (_.options.fade === true && _.currentSlide === index) {\n return;\n }\n if (_.slideCount <= _.options.slidesToShow) {\n return;\n }\n if (sync === false) {\n _.asNavFor(index);\n }\n targetSlide = index;\n targetLeft = _.getLeft(targetSlide);\n slideLeft = _.getLeft(_.currentSlide);\n _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;\n if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true) {\n _.animateSlide(slideLeft, function () {\n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > _.slideCount - _.options.slidesToScroll)) {\n if (_.options.fade === false) {\n targetSlide = _.currentSlide;\n if (dontAnimate !== true) {\n _.animateSlide(slideLeft, function () {\n _.postSlide(targetSlide);\n });\n } else {\n _.postSlide(targetSlide);\n }\n }\n return;\n }\n if (_.options.autoplay) {\n clearInterval(_.autoPlayTimer);\n }\n if (targetSlide < 0) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = _.slideCount - _.slideCount % _.options.slidesToScroll;\n } else {\n animSlide = _.slideCount + targetSlide;\n }\n } else if (targetSlide >= _.slideCount) {\n if (_.slideCount % _.options.slidesToScroll !== 0) {\n animSlide = 0;\n } else {\n animSlide = targetSlide - _.slideCount;\n }\n } else {\n animSlide = targetSlide;\n }\n _.animating = true;\n _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);\n oldSlide = _.currentSlide;\n _.currentSlide = animSlide;\n _.setSlideClasses(_.currentSlide);\n if (_.options.asNavFor) {\n navTarget = _.getNavTarget();\n navTarget = navTarget.slick('getSlick');\n if (navTarget.slideCount <= navTarget.options.slidesToShow) {\n navTarget.setSlideClasses(_.currentSlide);\n }\n }\n _.updateDots();\n _.updateArrows();\n if (_.options.fade === true) {\n if (dontAnimate !== true) {\n _.fadeSlideOut(oldSlide);\n _.fadeSlide(animSlide, function () {\n _.postSlide(animSlide);\n });\n } else {\n _.postSlide(animSlide);\n }\n _.animateHeight();\n return;\n }\n if (dontAnimate !== true) {\n _.animateSlide(targetLeft, function () {\n _.postSlide(animSlide);\n });\n } else {\n _.postSlide(animSlide);\n }\n };\n Slick.prototype.startLoad = function () {\n var _ = this;\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {\n _.$prevArrow.hide();\n _.$nextArrow.hide();\n }\n if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {\n _.$dots.hide();\n }\n _.$slider.addClass('slick-loading');\n };\n Slick.prototype.swipeDirection = function () {\n var xDist,\n yDist,\n r,\n swipeAngle,\n _ = this;\n xDist = _.touchObject.startX - _.touchObject.curX;\n yDist = _.touchObject.startY - _.touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n if (swipeAngle <= 45 && swipeAngle >= 0) {\n return _.options.rtl === false ? 'left' : 'right';\n }\n if (swipeAngle <= 360 && swipeAngle >= 315) {\n return _.options.rtl === false ? 'left' : 'right';\n }\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return _.options.rtl === false ? 'right' : 'left';\n }\n if (_.options.verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return 'down';\n } else {\n return 'up';\n }\n }\n return 'vertical';\n };\n Slick.prototype.swipeEnd = function (event) {\n var _ = this,\n slideCount,\n direction;\n _.dragging = false;\n _.interrupted = false;\n _.shouldClick = _.touchObject.swipeLength > 10 ? false : true;\n if (_.touchObject.curX === undefined) {\n return false;\n }\n if (_.touchObject.edgeHit === true) {\n _.$slider.trigger('edge', [_, _.swipeDirection()]);\n }\n if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {\n direction = _.swipeDirection();\n switch (direction) {\n case 'left':\n case 'down':\n slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide + _.getSlideCount()) : _.currentSlide + _.getSlideCount();\n _.currentDirection = 0;\n break;\n case 'right':\n case 'up':\n slideCount = _.options.swipeToSlide ? _.checkNavigable(_.currentSlide - _.getSlideCount()) : _.currentSlide - _.getSlideCount();\n _.currentDirection = 1;\n break;\n default:\n }\n if (direction != 'vertical') {\n _.slideHandler(slideCount);\n _.touchObject = {};\n _.$slider.trigger('swipe', [_, direction]);\n }\n } else {\n if (_.touchObject.startX !== _.touchObject.curX) {\n _.slideHandler(_.currentSlide);\n _.touchObject = {};\n }\n }\n };\n Slick.prototype.swipeHandler = function (event) {\n var _ = this;\n if (_.options.swipe === false || 'ontouchend' in document && _.options.swipe === false) {\n return;\n } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {\n return;\n }\n _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? event.originalEvent.touches.length : 1;\n _.touchObject.minSwipe = _.listWidth / _.options.touchThreshold;\n if (_.options.verticalSwiping === true) {\n _.touchObject.minSwipe = _.listHeight / _.options.touchThreshold;\n }\n switch (event.data.action) {\n case 'start':\n _.swipeStart(event);\n break;\n case 'move':\n _.swipeMove(event);\n break;\n case 'end':\n _.swipeEnd(event);\n break;\n }\n };\n Slick.prototype.swipeMove = function (event) {\n var _ = this,\n edgeWasHit = false,\n curLeft,\n swipeDirection,\n swipeLength,\n positionOffset,\n touches;\n touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;\n if (!_.dragging || touches && touches.length !== 1) {\n return false;\n }\n curLeft = _.getLeft(_.currentSlide);\n _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;\n _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;\n _.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));\n if (_.options.verticalSwiping === true) {\n _.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));\n }\n swipeDirection = _.swipeDirection();\n if (swipeDirection === 'vertical') {\n return;\n }\n if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {\n event.preventDefault();\n }\n positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);\n if (_.options.verticalSwiping === true) {\n positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;\n }\n swipeLength = _.touchObject.swipeLength;\n _.touchObject.edgeHit = false;\n if (_.options.infinite === false) {\n if (_.currentSlide === 0 && swipeDirection === 'right' || _.currentSlide >= _.getDotCount() && swipeDirection === 'left') {\n swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;\n _.touchObject.edgeHit = true;\n }\n }\n if (_.options.vertical === false) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n } else {\n _.swipeLeft = curLeft + swipeLength * (_.$list.height() / _.listWidth) * positionOffset;\n }\n if (_.options.verticalSwiping === true) {\n _.swipeLeft = curLeft + swipeLength * positionOffset;\n }\n if (_.options.fade === true || _.options.touchMove === false) {\n return false;\n }\n if (_.animating === true) {\n _.swipeLeft = null;\n return false;\n }\n _.setCSS(_.swipeLeft);\n };\n Slick.prototype.swipeStart = function (event) {\n var _ = this,\n touches;\n _.interrupted = true;\n if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {\n _.touchObject = {};\n return false;\n }\n if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {\n touches = event.originalEvent.touches[0];\n }\n _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;\n _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;\n _.dragging = true;\n };\n Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {\n var _ = this;\n if (_.$slidesCache !== null) {\n _.unload();\n _.$slideTrack.children(this.options.slide).detach();\n _.$slidesCache.appendTo(_.$slideTrack);\n _.reinit();\n }\n };\n Slick.prototype.unload = function () {\n var _ = this;\n $('.slick-cloned', _.$slider).remove();\n if (_.$dots) {\n _.$dots.remove();\n }\n if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {\n _.$prevArrow.remove();\n }\n if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {\n _.$nextArrow.remove();\n }\n _.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden', 'true').css('width', '');\n };\n Slick.prototype.unslick = function (fromBreakpoint) {\n var _ = this;\n _.$slider.trigger('unslick', [_, fromBreakpoint]);\n _.destroy();\n };\n Slick.prototype.updateArrows = function () {\n var _ = this,\n centerOffset;\n centerOffset = Math.floor(_.options.slidesToShow / 2);\n if (_.options.arrows === true && _.slideCount > _.options.slidesToShow && !_.options.infinite) {\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n if (_.currentSlide === 0) {\n _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {\n _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');\n _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');\n }\n }\n };\n Slick.prototype.updateDots = function () {\n var _ = this;\n if (_.$dots !== null) {\n _.$dots.find('li').removeClass('slick-active');\n //.attr('aria-hidden', 'true');\n\n _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active');\n //.attr('aria-hidden', 'false');\n }\n };\n Slick.prototype.visibility = function () {\n var _ = this;\n if (_.options.autoplay) {\n if (document[_.hidden]) {\n _.interrupted = true;\n } else {\n _.interrupted = false;\n }\n }\n };\n $.fn.slick = function () {\n var _ = this,\n opt = arguments[0],\n args = Array.prototype.slice.call(arguments, 1),\n l = _.length,\n i,\n ret;\n for (i = 0; i < l; i++) {\n if (_typeof(opt) == 'object' || typeof opt == 'undefined') _[i].slick = new Slick(_[i], opt);else ret = _[i].slick[opt].apply(_[i].slick, args);\n if (typeof ret != 'undefined') return ret;\n }\n return _;\n };\n});\njQuery.easing['jswing'] = jQuery.easing['swing'];\njQuery.extend(jQuery.easing, {\n easeInQuad: function easeInQuad(x, t, b, c, d) {\n return c * (t /= d) * t + b;\n },\n easeOutQuad: function easeOutQuad(x, t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n },\n easeInOutQuad: function easeInOutQuad(x, t, b, c, d) {\n if ((t /= d / 2) < 1) return c / 2 * t * t + b;\n return -c / 2 * (--t * (t - 2) - 1) + b;\n },\n easeInCubic: function easeInCubic(x, t, b, c, d) {\n return c * (t /= d) * t * t + b;\n },\n easeOutCubic: function easeOutCubic(x, t, b, c, d) {\n return c * ((t = t / d - 1) * t * t + 1) + b;\n },\n easeInOutCubic: function easeInOutCubic(x, t, b, c, d) {\n if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;\n return c / 2 * ((t -= 2) * t * t + 2) + b;\n },\n easeInQuart: function easeInQuart(x, t, b, c, d) {\n return c * (t /= d) * t * t * t + b;\n },\n easeOutQuart: function easeOutQuart(x, t, b, c, d) {\n return -c * ((t = t / d - 1) * t * t * t - 1) + b;\n },\n easeInOutQuart: function easeInOutQuart(x, t, b, c, d) {\n if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;\n return -c / 2 * ((t -= 2) * t * t * t - 2) + b;\n },\n easeInQuint: function easeInQuint(x, t, b, c, d) {\n return c * (t /= d) * t * t * t * t + b;\n },\n easeOutQuint: function easeOutQuint(x, t, b, c, d) {\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n easeInOutQuint: function easeInOutQuint(x, t, b, c, d) {\n if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;\n return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;\n },\n easeInSine: function easeInSine(x, t, b, c, d) {\n return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;\n },\n easeOutSine: function easeOutSine(x, t, b, c, d) {\n return c * Math.sin(t / d * (Math.PI / 2)) + b;\n },\n easeInOutSine: function easeInOutSine(x, t, b, c, d) {\n return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;\n },\n easeInExpo: function easeInExpo(x, t, b, c, d) {\n return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;\n },\n easeOutExpo: function easeOutExpo(x, t, b, c, d) {\n return t == d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;\n },\n easeInOutExpo: function easeInOutExpo(x, t, b, c, d) {\n if (t == 0) return b;\n if (t == d) return b + c;\n if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;\n return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;\n },\n easeInCirc: function easeInCirc(x, t, b, c, d) {\n return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;\n },\n easeOutCirc: function easeOutCirc(x, t, b, c, d) {\n return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;\n },\n easeInOutCirc: function easeInOutCirc(x, t, b, c, d) {\n if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;\n return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;\n },\n easeInElastic: function easeInElastic(x, t, b, c, d) {\n var s = 1.70158;\n var p = 0;\n var a = c;\n if (t == 0) return b;\n if ((t /= d) == 1) return b + c;\n if (!p) p = d * .3;\n if (a < Math.abs(c)) {\n a = c;\n var s = p / 4;\n } else var s = p / (2 * Math.PI) * Math.asin(c / a);\n return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n },\n easeOutElastic: function easeOutElastic(x, t, b, c, d) {\n var s = 1.70158;\n var p = 0;\n var a = c;\n if (t == 0) return b;\n if ((t /= d) == 1) return b + c;\n if (!p) p = d * .3;\n if (a < Math.abs(c)) {\n a = c;\n var s = p / 4;\n } else var s = p / (2 * Math.PI) * Math.asin(c / a);\n return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;\n },\n easeInOutElastic: function easeInOutElastic(x, t, b, c, d) {\n var s = 1.70158;\n var p = 0;\n var a = c;\n if (t == 0) return b;\n if ((t /= d / 2) == 2) return b + c;\n if (!p) p = d * (.3 * 1.5);\n if (a < Math.abs(c)) {\n a = c;\n var s = p / 4;\n } else var s = p / (2 * Math.PI) * Math.asin(c / a);\n if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;\n },\n easeInBack: function easeInBack(x, t, b, c, d, s) {\n if (s == undefined) s = 1.70158;\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n easeOutBack: function easeOutBack(x, t, b, c, d, s) {\n if (s == undefined) s = 1.70158;\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n easeInOutBack: function easeInOutBack(x, t, b, c, d, s) {\n if (s == undefined) s = 1.70158;\n if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n },\n easeInBounce: function easeInBounce(x, t, b, c, d) {\n return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;\n },\n easeOutBounce: function easeOutBounce(x, t, b, c, d) {\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n } else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + b;\n } else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + b;\n } else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + b;\n }\n },\n easeInOutBounce: function easeInOutBounce(x, t, b, c, d) {\n if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;\n return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;\n }\n});\n(function (factory) {\n /* global define */\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n // Node/CommonJS\n module.exports = function (root, jQuery) {\n if (jQuery === undefined) {\n if (typeof window !== 'undefined') {\n jQuery = require('jquery');\n } else {\n jQuery = require('jquery')(root);\n }\n }\n factory(jQuery);\n return jQuery;\n };\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function ($) {\n 'use strict';\n\n var $doc = $(document);\n var $win = $(window);\n var pluginName = 'selectric';\n var classList = 'Input Items Open Disabled TempShow HideSelect Wrapper Focus Hover Responsive Above Below Scroll Group GroupLabel';\n var eventNamespaceSuffix = '.sl';\n var chars = ['a', 'e', 'i', 'o', 'u', 'n', 'c', 'y'];\n var diacritics = [/[\\xE0-\\xE5]/g,\n // a\n /[\\xE8-\\xEB]/g,\n // e\n /[\\xEC-\\xEF]/g,\n // i\n /[\\xF2-\\xF6]/g,\n // o\n /[\\xF9-\\xFC]/g,\n // u\n /[\\xF1]/g,\n // n\n /[\\xE7]/g,\n // c\n /[\\xFD-\\xFF]/g // y\n ];\n\n /**\r\n * Create an instance of Selectric\r\n *\r\n * @constructor\r\n * @param {Node} element - The <select> element\r\n * @param {object} opts - Options\r\n */\n var Selectric = function Selectric(element, opts) {\n var _this = this;\n _this.element = element;\n _this.$element = $(element);\n _this.state = {\n multiple: !!_this.$element.attr('multiple'),\n enabled: false,\n opened: false,\n currValue: -1,\n selectedIdx: -1,\n highlightedIdx: -1\n };\n _this.eventTriggers = {\n open: _this.open,\n close: _this.close,\n destroy: _this.destroy,\n refresh: _this.refresh,\n init: _this.init\n };\n _this.init(opts);\n };\n Selectric.prototype = {\n utils: {\n /**\r\n * Detect mobile browser\r\n *\r\n * @return {boolean}\r\n */\n isMobile: function isMobile() {\n return /android|ip(hone|od|ad)/i.test(navigator.userAgent);\n },\n /**\r\n * Escape especial characters in string (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\r\n *\r\n * @param {string} str - The string to be escaped\r\n * @return {string} The string with the special characters escaped\r\n */\n escapeRegExp: function escapeRegExp(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n },\n /**\r\n * Replace diacritics\r\n *\r\n * @param {string} str - The string to replace the diacritics\r\n * @return {string} The string with diacritics replaced with ascii characters\r\n */\n replaceDiacritics: function replaceDiacritics(str) {\n var k = diacritics.length;\n while (k--) {\n str = str.toLowerCase().replace(diacritics[k], chars[k]);\n }\n return str;\n },\n /**\r\n * Format string\r\n * https://gist.github.com/atesgoral/984375\r\n *\r\n * @param {string} f - String to be formated\r\n * @return {string} String formated\r\n */\n format: function format(f) {\n var a = arguments; // store outer arguments\n return ('' + f // force format specifier to String\n ).replace(\n // replace tokens in format specifier\n /\\{(?:(\\d+)|(\\w+))\\}/g,\n // match {token} references\n function (s,\n // the matched string (ignored)\n i,\n // an argument index\n p // a property name\n ) {\n return p && a[1] // if property name and first argument exist\n ? a[1][p] // return property from first argument\n : a[i]; // assume argument index and return i-th argument\n });\n },\n /**\r\n * Get the next enabled item in the options list.\r\n *\r\n * @param {object} selectItems - The options object.\r\n * @param {number} selected - Index of the currently selected option.\r\n * @return {object} The next enabled item.\r\n */\n nextEnabledItem: function nextEnabledItem(selectItems, selected) {\n while (selectItems[selected = (selected + 1) % selectItems.length].disabled) {\n // empty\n }\n return selected;\n },\n /**\r\n * Get the previous enabled item in the options list.\r\n *\r\n * @param {object} selectItems - The options object.\r\n * @param {number} selected - Index of the currently selected option.\r\n * @return {object} The previous enabled item.\r\n */\n previousEnabledItem: function previousEnabledItem(selectItems, selected) {\n while (selectItems[selected = (selected > 0 ? selected : selectItems.length) - 1].disabled) {\n // empty\n }\n return selected;\n },\n /**\r\n * Transform camelCase string to dash-case.\r\n *\r\n * @param {string} str - The camelCased string.\r\n * @return {string} The string transformed to dash-case.\r\n */\n toDash: function toDash(str) {\n return str.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n },\n /**\r\n * Calls the events registered with function name.\r\n *\r\n * @param {string} fn - The name of the function.\r\n * @param {number} scope - Scope that should be set on the function.\r\n */\n triggerCallback: function triggerCallback(fn, scope) {\n var elm = scope.element;\n var func = scope.options['on' + fn];\n var args = [elm].concat([].slice.call(arguments).slice(1));\n if ($.isFunction(func)) {\n func.apply(elm, args);\n }\n $(elm).trigger(pluginName + '-' + this.toDash(fn), args);\n },\n /**\r\n * Transform array list to concatenated string and remove empty values\r\n * @param {array} arr - Class list\r\n * @return {string} Concatenated string\r\n */\n arrayToClassname: function arrayToClassname(arr) {\n var newArr = $.grep(arr, function (item) {\n return !!item;\n });\n return $.trim(newArr.join(' '));\n }\n },\n /** Initializes */\n init: function init(opts) {\n var _this = this;\n\n // Set options\n _this.options = $.extend(true, {}, $.fn[pluginName].defaults, _this.options, opts);\n _this.utils.triggerCallback('BeforeInit', _this);\n\n // Preserve data\n _this.destroy(true);\n\n // Disable on mobile browsers\n if (_this.options.disableOnMobile && _this.utils.isMobile()) {\n _this.disableOnMobile = true;\n return;\n }\n\n // Get classes\n _this.classes = _this.getClassNames();\n\n // Create elements\n var input = $(' ', {\n 'class': _this.classes.input,\n 'readonly': _this.utils.isMobile()\n });\n var items = $('
', {\n 'class': _this.classes.items,\n 'tabindex': -1\n });\n var itemsScroll = $('
', {\n 'class': _this.classes.scroll\n });\n var wrapper = $('
', {\n 'class': _this.classes.prefix,\n 'html': _this.options.arrowButtonMarkup\n });\n var label = $(' ', {\n 'class': 'label'\n });\n var outerWrapper = _this.$element.wrap('
').parent().append(wrapper.prepend(label), items, input);\n var hideSelectWrapper = $('
', {\n 'class': _this.classes.hideselect\n });\n _this.elements = {\n input: input,\n items: items,\n itemsScroll: itemsScroll,\n wrapper: wrapper,\n label: label,\n outerWrapper: outerWrapper\n };\n if (_this.options.nativeOnMobile && _this.utils.isMobile()) {\n _this.elements.input = undefined;\n hideSelectWrapper.addClass(_this.classes.prefix + '-is-native');\n _this.$element.on('change', function () {\n _this.refresh();\n });\n }\n _this.$element.on(_this.eventTriggers).wrap(hideSelectWrapper);\n _this.originalTabindex = _this.$element.prop('tabindex');\n _this.$element.prop('tabindex', -1);\n _this.populate();\n _this.activate();\n _this.utils.triggerCallback('Init', _this);\n },\n /** Activates the plugin */\n activate: function activate() {\n var _this = this;\n var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);\n var originalWidth = _this.$element.width();\n hiddenChildren.removeClass(_this.classes.tempshow);\n _this.utils.triggerCallback('BeforeActivate', _this);\n _this.elements.outerWrapper.prop('class', _this.utils.arrayToClassname([_this.classes.wrapper, _this.$element.prop('class').replace(/\\S+/g, _this.classes.prefix + '-$&'), _this.options.responsive ? _this.classes.responsive : '']));\n if (_this.options.inheritOriginalWidth && originalWidth > 0) {\n _this.elements.outerWrapper.width(originalWidth);\n }\n _this.unbindEvents();\n if (!_this.$element.prop('disabled')) {\n _this.state.enabled = true;\n\n // Not disabled, so... Removing disabled class\n _this.elements.outerWrapper.removeClass(_this.classes.disabled);\n\n // Remove styles from items box\n // Fix incorrect height when refreshed is triggered with fewer options\n _this.$li = _this.elements.items.removeAttr('style').find('li');\n _this.bindEvents();\n } else {\n _this.elements.outerWrapper.addClass(_this.classes.disabled);\n if (_this.elements.input) {\n _this.elements.input.prop('disabled', true);\n }\n }\n _this.utils.triggerCallback('Activate', _this);\n },\n /**\r\n * Generate classNames for elements\r\n *\r\n * @return {object} Classes object\r\n */\n getClassNames: function getClassNames() {\n var _this = this;\n var customClass = _this.options.customClass;\n var classesObj = {};\n $.each(classList.split(' '), function (i, currClass) {\n var c = customClass.prefix + currClass;\n classesObj[currClass.toLowerCase()] = customClass.camelCase ? c : _this.utils.toDash(c);\n });\n classesObj.prefix = customClass.prefix;\n return classesObj;\n },\n /** Set the label text */\n setLabel: function setLabel() {\n var _this = this;\n var labelBuilder = _this.options.labelBuilder;\n if (_this.state.multiple) {\n // Make sure currentValues is an array\n var currentValues = $.isArray(_this.state.currValue) ? _this.state.currValue : [_this.state.currValue];\n // I'm not happy with this, but currentValues can be an empty\n // array and we need to fallback to the default option.\n currentValues = currentValues.length === 0 ? [0] : currentValues;\n var labelMarkup = $.map(currentValues, function (value) {\n return $.grep(_this.lookupItems, function (item) {\n return item.index === value;\n })[0]; // we don't want nested arrays here\n });\n labelMarkup = $.grep(labelMarkup, function (item) {\n // Hide default (please choose) if more then one element were selected.\n // If no option value were given value is set to option text by default\n if (labelMarkup.length > 1 || labelMarkup.length === 0) {\n return $.trim(item.value) !== '';\n }\n return item;\n });\n labelMarkup = $.map(labelMarkup, function (item) {\n return $.isFunction(labelBuilder) ? labelBuilder(item) : _this.utils.format(labelBuilder, item);\n });\n\n // Limit the amount of selected values shown in label\n if (_this.options.multiple.maxLabelEntries) {\n if (labelMarkup.length >= _this.options.multiple.maxLabelEntries + 1) {\n labelMarkup = labelMarkup.slice(0, _this.options.multiple.maxLabelEntries);\n labelMarkup.push($.isFunction(labelBuilder) ? labelBuilder({\n text: '...'\n }) : _this.utils.format(labelBuilder, {\n text: '...'\n }));\n } else {\n labelMarkup.slice(labelMarkup.length - 1);\n }\n }\n _this.elements.label.html(labelMarkup.join(_this.options.multiple.separator));\n } else {\n var currItem = _this.lookupItems[_this.state.currValue];\n _this.elements.label.html($.isFunction(labelBuilder) ? labelBuilder(currItem) : _this.utils.format(labelBuilder, currItem));\n }\n },\n /** Get and save the available options */\n populate: function populate() {\n var _this = this;\n var $options = _this.$element.children();\n var $justOptions = _this.$element.find('option');\n var $selected = $justOptions.filter(':selected');\n var selectedIndex = $justOptions.index($selected);\n var currIndex = 0;\n var emptyValue = _this.state.multiple ? [] : 0;\n if ($selected.length > 1 && _this.state.multiple) {\n selectedIndex = [];\n $selected.each(function () {\n selectedIndex.push($(this).index());\n });\n }\n _this.state.currValue = ~selectedIndex ? selectedIndex : emptyValue;\n _this.state.selectedIdx = _this.state.currValue;\n _this.state.highlightedIdx = _this.state.currValue;\n _this.items = [];\n _this.lookupItems = [];\n if ($options.length) {\n // Build options markup\n $options.each(function (i) {\n var $elm = $(this);\n if ($elm.is('optgroup')) {\n var optionsGroup = {\n element: $elm,\n label: $elm.prop('label'),\n groupDisabled: $elm.prop('disabled'),\n items: []\n };\n $elm.children().each(function (i) {\n var $elm = $(this);\n optionsGroup.items[i] = _this.getItemData(currIndex, $elm, optionsGroup.groupDisabled || $elm.prop('disabled'));\n _this.lookupItems[currIndex] = optionsGroup.items[i];\n currIndex++;\n });\n _this.items[i] = optionsGroup;\n } else {\n _this.items[i] = _this.getItemData(currIndex, $elm, $elm.prop('disabled'));\n _this.lookupItems[currIndex] = _this.items[i];\n currIndex++;\n }\n });\n _this.setLabel();\n _this.elements.items.append(_this.elements.itemsScroll.html(_this.getItemsMarkup(_this.items)));\n }\n },\n /**\r\n * Generate items object data\r\n * @param {integer} index - Current item index\r\n * @param {node} $elm - Current element node\r\n * @param {boolean} isDisabled - Current element disabled state\r\n * @return {object} Item object\r\n */\n getItemData: function getItemData(index, $elm, isDisabled) {\n var _this = this;\n return {\n index: index,\n element: $elm,\n value: $elm.val(),\n className: $elm.prop('class'),\n text: $elm.html(),\n slug: $.trim(_this.utils.replaceDiacritics($elm.html())),\n alt: $elm.attr('data-alt'),\n selected: $elm.prop('selected'),\n disabled: isDisabled\n };\n },\n /**\r\n * Generate options markup\r\n *\r\n * @param {object} items - Object containing all available options\r\n * @return {string} HTML for the options box\r\n */\n getItemsMarkup: function getItemsMarkup(items) {\n var _this = this;\n var markup = '';\n if ($.isFunction(_this.options.listBuilder) && _this.options.listBuilder) {\n items = _this.options.listBuilder(items);\n }\n $.each(items, function (i, elm) {\n if (elm.label !== undefined) {\n markup += _this.utils.format('{3} ', _this.utils.arrayToClassname([_this.classes.group, elm.groupDisabled ? 'disabled' : '', elm.element.prop('class')]), _this.classes.grouplabel, elm.element.prop('label'));\n $.each(elm.items, function (i, elm) {\n markup += _this.getItemMarkup(elm.index, elm);\n });\n markup += ' ';\n } else {\n markup += _this.getItemMarkup(elm.index, elm);\n }\n });\n return markup + ' ';\n },\n /**\r\n * Generate every option markup\r\n *\r\n * @param {number} index - Index of current item\r\n * @param {object} itemData - Current item\r\n * @return {string} HTML for the option\r\n */\n getItemMarkup: function getItemMarkup(index, itemData) {\n var _this = this;\n var itemBuilder = _this.options.optionsItemBuilder;\n // limit access to item data to provide a simple interface\n // to most relevant options.\n var filteredItemData = {\n value: itemData.value,\n text: itemData.text,\n slug: itemData.slug,\n index: itemData.index\n };\n return _this.utils.format(' {3} ', index, _this.utils.arrayToClassname([itemData.className, index === _this.items.length - 1 ? 'last' : '', itemData.disabled ? 'disabled' : '', itemData.selected ? 'selected' : '']), $.isFunction(itemBuilder) ? _this.utils.format(itemBuilder(itemData, this.$element, index), itemData) : _this.utils.format(itemBuilder, filteredItemData));\n },\n /** Remove events on the elements */\n unbindEvents: function unbindEvents() {\n var _this = this;\n _this.elements.wrapper.add(_this.$element).add(_this.elements.outerWrapper).add(_this.elements.input).off(eventNamespaceSuffix);\n },\n /** Bind events on the elements */\n bindEvents: function bindEvents() {\n var _this = this;\n _this.elements.outerWrapper.on('mouseenter' + eventNamespaceSuffix + ' mouseleave' + eventNamespaceSuffix, function (e) {\n $(this).toggleClass(_this.classes.hover, e.type === 'mouseenter');\n\n // Delay close effect when openOnHover is true\n if (_this.options.openOnHover) {\n clearTimeout(_this.closeTimer);\n if (e.type === 'mouseleave') {\n _this.closeTimer = setTimeout($.proxy(_this.close, _this), _this.options.hoverIntentTimeout);\n } else {\n _this.open();\n }\n }\n });\n\n // Toggle open/close\n _this.elements.wrapper.on('click' + eventNamespaceSuffix, function (e) {\n _this.state.opened ? _this.close() : _this.open(e);\n });\n\n // Translate original element focus event to dummy input.\n // Disabled on mobile devices because the default option list isn't\n // shown due the fact that hidden input gets focused\n if (!(_this.options.nativeOnMobile && _this.utils.isMobile())) {\n _this.$element.on('focus' + eventNamespaceSuffix, function () {\n _this.elements.input.focus();\n });\n _this.elements.input.prop({\n tabindex: _this.originalTabindex,\n disabled: false\n }).on('keydown' + eventNamespaceSuffix, $.proxy(_this.handleKeys, _this)).on('focusin' + eventNamespaceSuffix, function (e) {\n _this.elements.outerWrapper.addClass(_this.classes.focus);\n\n // Prevent the flicker when focusing out and back again in the browser window\n _this.elements.input.one('blur', function () {\n _this.elements.input.blur();\n });\n if (_this.options.openOnFocus && !_this.state.opened) {\n _this.open(e);\n }\n }).on('focusout' + eventNamespaceSuffix, function () {\n _this.elements.outerWrapper.removeClass(_this.classes.focus);\n }).on('input propertychange', function () {\n var val = _this.elements.input.val();\n var searchRegExp = new RegExp('^' + _this.utils.escapeRegExp(val), 'i');\n\n // Clear search\n clearTimeout(_this.resetStr);\n _this.resetStr = setTimeout(function () {\n _this.elements.input.val('');\n }, _this.options.keySearchTimeout);\n if (val.length) {\n // Search in select options\n $.each(_this.items, function (i, elm) {\n if (elm.disabled) {\n return;\n }\n if (searchRegExp.test(elm.text) || searchRegExp.test(elm.slug)) {\n _this.highlight(i);\n return false;\n }\n if (!elm.alt) {\n return;\n }\n var altItems = elm.alt.split('|');\n for (var ai = 0; ai < altItems.length; ai++) {\n if (!altItems[ai]) {\n break;\n }\n if (searchRegExp.test(altItems[ai].trim())) {\n _this.highlight(i);\n return false;\n }\n }\n });\n }\n });\n }\n _this.$li.on({\n // Prevent
blur on Chrome\n mousedown: function mousedown(e) {\n e.preventDefault();\n e.stopPropagation();\n },\n click: function click() {\n _this.select($(this).data('index'));\n\n // Chrome doesn't close options box if select is wrapped with a label\n // We need to 'return false' to avoid that\n return false;\n }\n });\n },\n /**\r\n * Behavior when keyboard keys is pressed\r\n *\r\n * @param {object} e - Event object\r\n */\n handleKeys: function handleKeys(e) {\n var _this = this;\n var key = e.which;\n var keys = _this.options.keys;\n var isPrevKey = $.inArray(key, keys.previous) > -1;\n var isNextKey = $.inArray(key, keys.next) > -1;\n var isFirstKey = $.inArray(key, keys.first) > -1;\n var isLastKey = $.inArray(key, keys.last) > -1;\n var isSelectKey = $.inArray(key, keys.select) > -1;\n var isOpenKey = $.inArray(key, keys.open) > -1;\n var idx = _this.state.highlightedIdx;\n var isFirstOrLastItem = isPrevKey && idx === 0 || isNextKey && idx + 1 === _this.items.length;\n var goToItem = 0;\n\n // Enter / Space\n if (key === 13 || key === 32) {\n e.preventDefault();\n }\n\n // If it's a directional key\n if (isPrevKey || isNextKey) {\n if (!_this.options.allowWrap && isFirstOrLastItem) {\n return;\n }\n if (isPrevKey) {\n goToItem = _this.utils.previousEnabledItem(_this.lookupItems, idx);\n }\n if (isNextKey) {\n goToItem = _this.utils.nextEnabledItem(_this.lookupItems, idx);\n }\n _this.highlight(goToItem);\n }\n\n // If it's a jump key\n if (isFirstKey) {\n e.preventDefault();\n goToItem = _this.utils.nextEnabledItem(_this.lookupItems, -1);\n _this.highlight(goToItem);\n }\n if (isLastKey) {\n e.preventDefault();\n goToItem = _this.utils.previousEnabledItem(_this.lookupItems, _this.items.length);\n _this.highlight(goToItem);\n }\n\n // Tab / Enter / ESC\n if (isSelectKey && _this.state.opened) {\n _this.select(idx);\n if (!_this.state.multiple || !_this.options.multiple.keepMenuOpen) {\n _this.close();\n }\n return;\n }\n\n // Space / Enter / Left / Up / Right / Down\n if (isOpenKey && !_this.state.opened) {\n _this.open();\n }\n },\n /** Update the items object */\n refresh: function refresh() {\n var _this = this;\n _this.populate();\n _this.activate();\n _this.utils.triggerCallback('Refresh', _this);\n },\n /** Set options box width/height */\n setOptionsDimensions: function setOptionsDimensions() {\n var _this = this;\n\n // Calculate options box height\n // Set a temporary class on the hidden parent of the element\n var hiddenChildren = _this.elements.items.closest(':visible').children(':hidden').addClass(_this.classes.tempshow);\n var maxHeight = _this.options.maxHeight;\n var itemsWidth = _this.elements.items.outerWidth();\n var wrapperWidth = _this.elements.wrapper.outerWidth() - (itemsWidth - _this.elements.items.width());\n\n // Set the dimensions, minimum is wrapper width, expand for long items if option is true\n if (!_this.options.expandToItemText || wrapperWidth > itemsWidth) {\n _this.finalWidth = wrapperWidth;\n } else {\n // Make sure the scrollbar width is included\n _this.elements.items.css('overflow', 'scroll');\n\n // Set a really long width for _this.elements.outerWrapper\n _this.elements.outerWrapper.width(9e4);\n _this.finalWidth = _this.elements.items.width();\n // Set scroll bar to auto\n _this.elements.items.css('overflow', '');\n _this.elements.outerWrapper.width('');\n }\n _this.elements.items.width(_this.finalWidth).height() > maxHeight && _this.elements.items.height(maxHeight);\n\n // Remove the temporary class\n hiddenChildren.removeClass(_this.classes.tempshow);\n },\n /** Detect if the options box is inside the window */\n isInViewport: function isInViewport() {\n var _this = this;\n if (_this.options.forceRenderAbove === true) {\n _this.elements.outerWrapper.addClass(_this.classes.above);\n } else if (_this.options.forceRenderBelow === true) {\n _this.elements.outerWrapper.addClass(_this.classes.below);\n } else {\n var scrollTop = $win.scrollTop();\n var winHeight = $win.height();\n var uiPosX = _this.elements.outerWrapper.offset().top;\n var uiHeight = _this.elements.outerWrapper.outerHeight();\n var fitsDown = uiPosX + uiHeight + _this.itemsHeight <= scrollTop + winHeight;\n var fitsAbove = uiPosX - _this.itemsHeight > scrollTop;\n\n // If it does not fit below, only render it\n // above it fit's there.\n // It's acceptable that the user needs to\n // scroll the viewport to see the cut off UI\n var renderAbove = !fitsDown && fitsAbove;\n var renderBelow = !renderAbove;\n _this.elements.outerWrapper.toggleClass(_this.classes.above, renderAbove);\n _this.elements.outerWrapper.toggleClass(_this.classes.below, renderBelow);\n }\n },\n /**\r\n * Detect if currently selected option is visible and scroll the options box to show it\r\n *\r\n * @param {Number|Array} index - Index of the selected items\r\n */\n detectItemVisibility: function detectItemVisibility(index) {\n var _this = this;\n var $filteredLi = _this.$li.filter('[data-index]');\n if (_this.state.multiple) {\n // If index is an array, we can assume a multiple select and we\n // want to scroll to the uppermost selected item!\n // Math.min.apply(Math, index) returns the lowest entry in an Array.\n index = $.isArray(index) && index.length === 0 ? 0 : index;\n index = $.isArray(index) ? Math.min.apply(Math, index) : index;\n }\n var liHeight = $filteredLi.eq(index).outerHeight();\n var liTop = $filteredLi[index].offsetTop;\n var itemsScrollTop = _this.elements.itemsScroll.scrollTop();\n var scrollT = liTop + liHeight * 2;\n _this.elements.itemsScroll.scrollTop(scrollT > itemsScrollTop + _this.itemsHeight ? scrollT - _this.itemsHeight : liTop - liHeight < itemsScrollTop ? liTop - liHeight : itemsScrollTop);\n },\n /**\r\n * Open the select options box\r\n *\r\n * @param {Event} e - Event\r\n */\n open: function open(e) {\n var _this = this;\n if (_this.options.nativeOnMobile && _this.utils.isMobile()) {\n return false;\n }\n _this.utils.triggerCallback('BeforeOpen', _this);\n if (e) {\n e.preventDefault();\n if (_this.options.stopPropagation) {\n e.stopPropagation();\n }\n }\n if (_this.state.enabled) {\n _this.setOptionsDimensions();\n\n // Find any other opened instances of select and close it\n $('.' + _this.classes.hideselect, '.' + _this.classes.open).children()[pluginName]('close');\n _this.state.opened = true;\n _this.itemsHeight = _this.elements.items.outerHeight();\n _this.itemsInnerHeight = _this.elements.items.height();\n\n // Toggle options box visibility\n _this.elements.outerWrapper.addClass(_this.classes.open);\n\n // Give dummy input focus\n _this.elements.input.val('');\n if (e && e.type !== 'focusin') {\n _this.elements.input.focus();\n }\n\n // Delayed binds events on Document to make label clicks work\n setTimeout(function () {\n $doc.on('click' + eventNamespaceSuffix, $.proxy(_this.close, _this)).on('scroll' + eventNamespaceSuffix, $.proxy(_this.isInViewport, _this));\n }, 1);\n _this.isInViewport();\n\n // Prevent window scroll when using mouse wheel inside items box\n if (_this.options.preventWindowScroll) {\n /* istanbul ignore next */\n $doc.on('mousewheel' + eventNamespaceSuffix + ' DOMMouseScroll' + eventNamespaceSuffix, '.' + _this.classes.scroll, function (e) {\n var orgEvent = e.originalEvent;\n var scrollTop = $(this).scrollTop();\n var deltaY = 0;\n if ('detail' in orgEvent) {\n deltaY = orgEvent.detail * -1;\n }\n if ('wheelDelta' in orgEvent) {\n deltaY = orgEvent.wheelDelta;\n }\n if ('wheelDeltaY' in orgEvent) {\n deltaY = orgEvent.wheelDeltaY;\n }\n if ('deltaY' in orgEvent) {\n deltaY = orgEvent.deltaY * -1;\n }\n if (scrollTop === this.scrollHeight - _this.itemsInnerHeight && deltaY < 0 || scrollTop === 0 && deltaY > 0) {\n e.preventDefault();\n }\n });\n }\n _this.detectItemVisibility(_this.state.selectedIdx);\n _this.highlight(_this.state.multiple ? -1 : _this.state.selectedIdx);\n _this.utils.triggerCallback('Open', _this);\n }\n },\n /** Close the select options box */\n close: function close() {\n var _this = this;\n _this.utils.triggerCallback('BeforeClose', _this);\n\n // Remove custom events on document\n $doc.off(eventNamespaceSuffix);\n\n // Remove visible class to hide options box\n _this.elements.outerWrapper.removeClass(_this.classes.open);\n _this.state.opened = false;\n _this.utils.triggerCallback('Close', _this);\n },\n /** Select current option and change the label */\n change: function change() {\n var _this = this;\n _this.utils.triggerCallback('BeforeChange', _this);\n if (_this.state.multiple) {\n // Reset old selected\n $.each(_this.lookupItems, function (idx) {\n _this.lookupItems[idx].selected = false;\n _this.$element.find('option').prop('selected', false);\n });\n\n // Set new selected\n $.each(_this.state.selectedIdx, function (idx, value) {\n _this.lookupItems[value].selected = true;\n _this.$element.find('option').eq(value).prop('selected', true);\n });\n _this.state.currValue = _this.state.selectedIdx;\n _this.setLabel();\n _this.utils.triggerCallback('Change', _this);\n } else if (_this.state.currValue !== _this.state.selectedIdx) {\n // Apply changed value to original select\n _this.$element.prop('selectedIndex', _this.state.currValue = _this.state.selectedIdx).data('value', _this.lookupItems[_this.state.selectedIdx].text);\n\n // Change label text\n _this.setLabel();\n _this.utils.triggerCallback('Change', _this);\n }\n },\n /**\r\n * Highlight option\r\n * @param {number} index - Index of the options that will be highlighted\r\n */\n highlight: function highlight(index) {\n var _this = this;\n var $filteredLi = _this.$li.filter('[data-index]').removeClass('highlighted');\n _this.utils.triggerCallback('BeforeHighlight', _this);\n\n // Parameter index is required and should not be a disabled item\n if (index === undefined || index === -1 || _this.lookupItems[index].disabled) {\n return;\n }\n $filteredLi.eq(_this.state.highlightedIdx = index).addClass('highlighted');\n _this.detectItemVisibility(index);\n _this.utils.triggerCallback('Highlight', _this);\n },\n /**\r\n * Select option\r\n *\r\n * @param {number} index - Index of the option that will be selected\r\n */\n select: function select(index) {\n var _this = this;\n var $filteredLi = _this.$li.filter('[data-index]');\n _this.utils.triggerCallback('BeforeSelect', _this, index);\n\n // Parameter index is required and should not be a disabled item\n if (index === undefined || index === -1 || _this.lookupItems[index].disabled) {\n return;\n }\n if (_this.state.multiple) {\n // Make sure selectedIdx is an array\n _this.state.selectedIdx = $.isArray(_this.state.selectedIdx) ? _this.state.selectedIdx : [_this.state.selectedIdx];\n var hasSelectedIndex = $.inArray(index, _this.state.selectedIdx);\n if (hasSelectedIndex !== -1) {\n _this.state.selectedIdx.splice(hasSelectedIndex, 1);\n } else {\n _this.state.selectedIdx.push(index);\n }\n $filteredLi.removeClass('selected').filter(function (index) {\n return $.inArray(index, _this.state.selectedIdx) !== -1;\n }).addClass('selected');\n } else {\n $filteredLi.removeClass('selected').eq(_this.state.selectedIdx = index).addClass('selected');\n }\n if (!_this.state.multiple || !_this.options.multiple.keepMenuOpen) {\n _this.close();\n }\n _this.change();\n _this.utils.triggerCallback('Select', _this, index);\n },\n /**\r\n * Unbind and remove\r\n *\r\n * @param {boolean} preserveData - Check if the data on the element should be removed too\r\n */\n destroy: function destroy(preserveData) {\n var _this = this;\n if (_this.state && _this.state.enabled) {\n _this.elements.items.add(_this.elements.wrapper).add(_this.elements.input).remove();\n if (!preserveData) {\n _this.$element.removeData(pluginName).removeData('value');\n }\n _this.$element.prop('tabindex', _this.originalTabindex).off(eventNamespaceSuffix).off(_this.eventTriggers).unwrap().unwrap();\n _this.state.enabled = false;\n }\n }\n };\n\n // A really lightweight plugin wrapper around the constructor,\n // preventing against multiple instantiations\n $.fn[pluginName] = function (args) {\n return this.each(function () {\n var data = $.data(this, pluginName);\n if (data && !data.disableOnMobile) {\n typeof args === 'string' && data[args] ? data[args]() : data.init(args);\n } else {\n $.data(this, pluginName, new Selectric(this, args));\n }\n });\n };\n\n /**\r\n * Default plugin options\r\n *\r\n * @type {object}\r\n */\n $.fn[pluginName].defaults = {\n onChange: function onChange(elm) {\n $(elm).change();\n },\n maxHeight: 300,\n keySearchTimeout: 500,\n arrowButtonMarkup: '
▾ ',\n disableOnMobile: false,\n nativeOnMobile: true,\n openOnFocus: true,\n openOnHover: false,\n hoverIntentTimeout: 500,\n expandToItemText: false,\n responsive: false,\n preventWindowScroll: true,\n inheritOriginalWidth: false,\n allowWrap: true,\n forceRenderAbove: false,\n forceRenderBelow: false,\n stopPropagation: true,\n optionsItemBuilder: '{text}',\n // function(itemData, element, index)\n labelBuilder: '{text}',\n // function(currItem)\n listBuilder: false,\n // function(items)\n keys: {\n previous: [37, 38],\n // Left / Up\n next: [39, 40],\n // Right / Down\n first: [33],\n // Pgup\n last: [34],\n // Pgdown\n select: [9, 13, 27],\n // Tab / Enter / Escape\n open: [13, 32, 37, 38, 39, 40],\n // Enter / Space / Left / Up / Right / Down\n close: [9, 27] // Tab / Escape\n },\n customClass: {\n prefix: pluginName,\n camelCase: false\n },\n multiple: {\n separator: ', ',\n keepMenuOpen: true,\n maxLabelEntries: false\n }\n };\n});\n\n/*!\r\nWaypoints - 4.0.1\r\nCopyright © 2011-2016 Caleb Troughton\r\nLicensed under the MIT license.\r\nhttps://github.com/imakewebthings/waypoints/blob/master/licenses.txt\r\n*/\n(function () {\n 'use strict';\n\n var keyCounter = 0;\n var allWaypoints = {};\n\n /* http://imakewebthings.com/waypoints/api/waypoint */\n function Waypoint(options) {\n if (!options) {\n throw new Error('No options passed to Waypoint constructor');\n }\n if (!options.element) {\n throw new Error('No element option passed to Waypoint constructor');\n }\n if (!options.handler) {\n throw new Error('No handler option passed to Waypoint constructor');\n }\n this.key = 'waypoint-' + keyCounter;\n this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options);\n this.element = this.options.element;\n this.adapter = new Waypoint.Adapter(this.element);\n this.callback = options.handler;\n this.axis = this.options.horizontal ? 'horizontal' : 'vertical';\n this.enabled = this.options.enabled;\n this.triggerPoint = null;\n this.group = Waypoint.Group.findOrCreate({\n name: this.options.group,\n axis: this.axis\n });\n this.context = Waypoint.Context.findOrCreateByElement(this.options.context);\n if (Waypoint.offsetAliases[this.options.offset]) {\n this.options.offset = Waypoint.offsetAliases[this.options.offset];\n }\n this.group.add(this);\n this.context.add(this);\n allWaypoints[this.key] = this;\n keyCounter += 1;\n }\n\n /* Private */\n Waypoint.prototype.queueTrigger = function (direction) {\n this.group.queueTrigger(this, direction);\n };\n\n /* Private */\n Waypoint.prototype.trigger = function (args) {\n if (!this.enabled) {\n return;\n }\n if (this.callback) {\n this.callback.apply(this, args);\n }\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy */\n Waypoint.prototype.destroy = function () {\n this.context.remove(this);\n this.group.remove(this);\n delete allWaypoints[this.key];\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable */\n Waypoint.prototype.disable = function () {\n this.enabled = false;\n return this;\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable */\n Waypoint.prototype.enable = function () {\n this.context.refresh();\n this.enabled = true;\n return this;\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/next */\n Waypoint.prototype.next = function () {\n return this.group.next(this);\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/previous */\n Waypoint.prototype.previous = function () {\n return this.group.previous(this);\n };\n\n /* Private */\n Waypoint.invokeAll = function (method) {\n var allWaypointsArray = [];\n for (var waypointKey in allWaypoints) {\n allWaypointsArray.push(allWaypoints[waypointKey]);\n }\n for (var i = 0, end = allWaypointsArray.length; i < end; i++) {\n allWaypointsArray[i][method]();\n }\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy-all */\n Waypoint.destroyAll = function () {\n Waypoint.invokeAll('destroy');\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable-all */\n Waypoint.disableAll = function () {\n Waypoint.invokeAll('disable');\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable-all */\n Waypoint.enableAll = function () {\n Waypoint.Context.refreshAll();\n for (var waypointKey in allWaypoints) {\n allWaypoints[waypointKey].enabled = true;\n }\n return this;\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/refresh-all */\n Waypoint.refreshAll = function () {\n Waypoint.Context.refreshAll();\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-height */\n Waypoint.viewportHeight = function () {\n return window.innerHeight || document.documentElement.clientHeight;\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-width */\n Waypoint.viewportWidth = function () {\n return document.documentElement.clientWidth;\n };\n Waypoint.adapters = [];\n Waypoint.defaults = {\n context: window,\n continuous: true,\n enabled: true,\n group: 'default',\n horizontal: false,\n offset: 0\n };\n Waypoint.offsetAliases = {\n 'bottom-in-view': function bottomInView() {\n return this.context.innerHeight() - this.adapter.outerHeight();\n },\n 'right-in-view': function rightInView() {\n return this.context.innerWidth() - this.adapter.outerWidth();\n }\n };\n window.Waypoint = Waypoint;\n})();\n(function () {\n 'use strict';\n\n function requestAnimationFrameShim(callback) {\n window.setTimeout(callback, 1000 / 60);\n }\n var keyCounter = 0;\n var contexts = {};\n var Waypoint = window.Waypoint;\n var oldWindowLoad = window.onload;\n\n /* http://imakewebthings.com/waypoints/api/context */\n function Context(element) {\n this.element = element;\n this.Adapter = Waypoint.Adapter;\n this.adapter = new this.Adapter(element);\n this.key = 'waypoint-context-' + keyCounter;\n this.didScroll = false;\n this.didResize = false;\n this.oldScroll = {\n x: this.adapter.scrollLeft(),\n y: this.adapter.scrollTop()\n };\n this.waypoints = {\n vertical: {},\n horizontal: {}\n };\n element.waypointContextKey = this.key;\n contexts[element.waypointContextKey] = this;\n keyCounter += 1;\n if (!Waypoint.windowContext) {\n Waypoint.windowContext = true;\n Waypoint.windowContext = new Context(window);\n }\n this.createThrottledScrollHandler();\n this.createThrottledResizeHandler();\n }\n\n /* Private */\n Context.prototype.add = function (waypoint) {\n var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical';\n this.waypoints[axis][waypoint.key] = waypoint;\n this.refresh();\n };\n\n /* Private */\n Context.prototype.checkEmpty = function () {\n var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal);\n var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical);\n var isWindow = this.element == this.element.window;\n if (horizontalEmpty && verticalEmpty && !isWindow) {\n this.adapter.off('.waypoints');\n delete contexts[this.key];\n }\n };\n\n /* Private */\n Context.prototype.createThrottledResizeHandler = function () {\n var self = this;\n function resizeHandler() {\n self.handleResize();\n self.didResize = false;\n }\n this.adapter.on('resize.waypoints', function () {\n if (!self.didResize) {\n self.didResize = true;\n Waypoint.requestAnimationFrame(resizeHandler);\n }\n });\n };\n\n /* Private */\n Context.prototype.createThrottledScrollHandler = function () {\n var self = this;\n function scrollHandler() {\n self.handleScroll();\n self.didScroll = false;\n }\n this.adapter.on('scroll.waypoints', function () {\n if (!self.didScroll || Waypoint.isTouch) {\n self.didScroll = true;\n Waypoint.requestAnimationFrame(scrollHandler);\n }\n });\n };\n\n /* Private */\n Context.prototype.handleResize = function () {\n Waypoint.Context.refreshAll();\n };\n\n /* Private */\n Context.prototype.handleScroll = function () {\n var triggeredGroups = {};\n var axes = {\n horizontal: {\n newScroll: this.adapter.scrollLeft(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left'\n },\n vertical: {\n newScroll: this.adapter.scrollTop(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up'\n }\n };\n for (var axisKey in axes) {\n var axis = axes[axisKey];\n var isForward = axis.newScroll > axis.oldScroll;\n var direction = isForward ? axis.forward : axis.backward;\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey];\n if (waypoint.triggerPoint === null) {\n continue;\n }\n var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint;\n var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint;\n var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint;\n var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint;\n if (crossedForward || crossedBackward) {\n waypoint.queueTrigger(direction);\n triggeredGroups[waypoint.group.id] = waypoint.group;\n }\n }\n }\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers();\n }\n this.oldScroll = {\n x: axes.horizontal.newScroll,\n y: axes.vertical.newScroll\n };\n };\n\n /* Private */\n Context.prototype.innerHeight = function () {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportHeight();\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerHeight();\n };\n\n /* Private */\n Context.prototype.remove = function (waypoint) {\n delete this.waypoints[waypoint.axis][waypoint.key];\n this.checkEmpty();\n };\n\n /* Private */\n Context.prototype.innerWidth = function () {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportWidth();\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerWidth();\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-destroy */\n Context.prototype.destroy = function () {\n var allWaypoints = [];\n for (var axis in this.waypoints) {\n for (var waypointKey in this.waypoints[axis]) {\n allWaypoints.push(this.waypoints[axis][waypointKey]);\n }\n }\n for (var i = 0, end = allWaypoints.length; i < end; i++) {\n allWaypoints[i].destroy();\n }\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-refresh */\n Context.prototype.refresh = function () {\n /*eslint-disable eqeqeq */\n var isWindow = this.element == this.element.window;\n /*eslint-enable eqeqeq */\n var contextOffset = isWindow ? undefined : this.adapter.offset();\n var triggeredGroups = {};\n var axes;\n this.handleScroll();\n axes = {\n horizontal: {\n contextOffset: isWindow ? 0 : contextOffset.left,\n contextScroll: isWindow ? 0 : this.oldScroll.x,\n contextDimension: this.innerWidth(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left',\n offsetProp: 'left'\n },\n vertical: {\n contextOffset: isWindow ? 0 : contextOffset.top,\n contextScroll: isWindow ? 0 : this.oldScroll.y,\n contextDimension: this.innerHeight(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up',\n offsetProp: 'top'\n }\n };\n for (var axisKey in axes) {\n var axis = axes[axisKey];\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey];\n var adjustment = waypoint.options.offset;\n var oldTriggerPoint = waypoint.triggerPoint;\n var elementOffset = 0;\n var freshWaypoint = oldTriggerPoint == null;\n var contextModifier, wasBeforeScroll, nowAfterScroll;\n var triggeredBackward, triggeredForward;\n if (waypoint.element !== waypoint.element.window) {\n elementOffset = waypoint.adapter.offset()[axis.offsetProp];\n }\n if (typeof adjustment === 'function') {\n adjustment = adjustment.apply(waypoint);\n } else if (typeof adjustment === 'string') {\n adjustment = parseFloat(adjustment);\n if (waypoint.options.offset.indexOf('%') > -1) {\n adjustment = Math.ceil(axis.contextDimension * adjustment / 100);\n }\n }\n contextModifier = axis.contextScroll - axis.contextOffset;\n waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment);\n wasBeforeScroll = oldTriggerPoint < axis.oldScroll;\n nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll;\n triggeredBackward = wasBeforeScroll && nowAfterScroll;\n triggeredForward = !wasBeforeScroll && !nowAfterScroll;\n if (!freshWaypoint && triggeredBackward) {\n waypoint.queueTrigger(axis.backward);\n triggeredGroups[waypoint.group.id] = waypoint.group;\n } else if (!freshWaypoint && triggeredForward) {\n waypoint.queueTrigger(axis.forward);\n triggeredGroups[waypoint.group.id] = waypoint.group;\n } else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {\n waypoint.queueTrigger(axis.forward);\n triggeredGroups[waypoint.group.id] = waypoint.group;\n }\n }\n }\n Waypoint.requestAnimationFrame(function () {\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers();\n }\n });\n return this;\n };\n\n /* Private */\n Context.findOrCreateByElement = function (element) {\n return Context.findByElement(element) || new Context(element);\n };\n\n /* Private */\n Context.refreshAll = function () {\n for (var contextId in contexts) {\n contexts[contextId].refresh();\n }\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-find-by-element */\n Context.findByElement = function (element) {\n return contexts[element.waypointContextKey];\n };\n window.onload = function () {\n if (oldWindowLoad) {\n oldWindowLoad();\n }\n Context.refreshAll();\n };\n Waypoint.requestAnimationFrame = function (callback) {\n var requestFn = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || requestAnimationFrameShim;\n requestFn.call(window, callback);\n };\n Waypoint.Context = Context;\n})();\n(function () {\n 'use strict';\n\n function byTriggerPoint(a, b) {\n return a.triggerPoint - b.triggerPoint;\n }\n function byReverseTriggerPoint(a, b) {\n return b.triggerPoint - a.triggerPoint;\n }\n var groups = {\n vertical: {},\n horizontal: {}\n };\n var Waypoint = window.Waypoint;\n\n /* http://imakewebthings.com/waypoints/api/group */\n function Group(options) {\n this.name = options.name;\n this.axis = options.axis;\n this.id = this.name + '-' + this.axis;\n this.waypoints = [];\n this.clearTriggerQueues();\n groups[this.axis][this.name] = this;\n }\n\n /* Private */\n Group.prototype.add = function (waypoint) {\n this.waypoints.push(waypoint);\n };\n\n /* Private */\n Group.prototype.clearTriggerQueues = function () {\n this.triggerQueues = {\n up: [],\n down: [],\n left: [],\n right: []\n };\n };\n\n /* Private */\n Group.prototype.flushTriggers = function () {\n for (var direction in this.triggerQueues) {\n var waypoints = this.triggerQueues[direction];\n var reverse = direction === 'up' || direction === 'left';\n waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint);\n for (var i = 0, end = waypoints.length; i < end; i += 1) {\n var waypoint = waypoints[i];\n if (waypoint.options.continuous || i === waypoints.length - 1) {\n waypoint.trigger([direction]);\n }\n }\n }\n this.clearTriggerQueues();\n };\n\n /* Private */\n Group.prototype.next = function (waypoint) {\n this.waypoints.sort(byTriggerPoint);\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints);\n var isLast = index === this.waypoints.length - 1;\n return isLast ? null : this.waypoints[index + 1];\n };\n\n /* Private */\n Group.prototype.previous = function (waypoint) {\n this.waypoints.sort(byTriggerPoint);\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints);\n return index ? this.waypoints[index - 1] : null;\n };\n\n /* Private */\n Group.prototype.queueTrigger = function (waypoint, direction) {\n this.triggerQueues[direction].push(waypoint);\n };\n\n /* Private */\n Group.prototype.remove = function (waypoint) {\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints);\n if (index > -1) {\n this.waypoints.splice(index, 1);\n }\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/first */\n Group.prototype.first = function () {\n return this.waypoints[0];\n };\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/last */\n Group.prototype.last = function () {\n return this.waypoints[this.waypoints.length - 1];\n };\n\n /* Private */\n Group.findOrCreate = function (options) {\n return groups[options.axis][options.name] || new Group(options);\n };\n Waypoint.Group = Group;\n})();\n(function () {\n 'use strict';\n\n var $ = window.jQuery;\n var Waypoint = window.Waypoint;\n function JQueryAdapter(element) {\n this.$element = $(element);\n }\n $.each(['innerHeight', 'innerWidth', 'off', 'offset', 'on', 'outerHeight', 'outerWidth', 'scrollLeft', 'scrollTop'], function (i, method) {\n JQueryAdapter.prototype[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n return this.$element[method].apply(this.$element, args);\n };\n });\n $.each(['extend', 'inArray', 'isEmptyObject'], function (i, method) {\n JQueryAdapter[method] = $[method];\n });\n Waypoint.adapters.push({\n name: 'jquery',\n Adapter: JQueryAdapter\n });\n Waypoint.Adapter = JQueryAdapter;\n})();\n(function () {\n 'use strict';\n\n var Waypoint = window.Waypoint;\n function createExtension(framework) {\n return function () {\n var waypoints = [];\n var overrides = arguments[0];\n if (framework.isFunction(arguments[0])) {\n overrides = framework.extend({}, arguments[1]);\n overrides.handler = arguments[0];\n }\n this.each(function () {\n var options = framework.extend({}, overrides, {\n element: this\n });\n if (typeof options.context === 'string') {\n options.context = framework(this).closest(options.context)[0];\n }\n waypoints.push(new Waypoint(options));\n });\n return waypoints;\n };\n }\n if (window.jQuery) {\n window.jQuery.fn.waypoint = createExtension(window.jQuery);\n }\n if (window.Zepto) {\n window.Zepto.fn.waypoint = createExtension(window.Zepto);\n }\n})();\nfunction Accordion($el) {\n this.$el = $el || null;\n this.isExperienceEditor = $('.is-experience-editor').length;\n if (this.$el.length) {\n this.setupDefaults();\n if (!this.isExperienceEditor) {\n this.addListeners();\n } else {\n this.initExpEd();\n }\n }\n}\n;\nAccordion.prototype.setupDefaults = function () {\n this.dom = {\n $trigger: this.$el.find('.js-accordion-trigger'),\n $icon: this.$el.find('.js-accordion-trigger').find('.icon'),\n $content: this.$el.find('.js-accordion-content')\n };\n};\nAccordion.prototype.addListeners = function () {\n this.dom.$trigger.on('click touchstart keypress', this.onTriggerClick.bind(this));\n};\nAccordion.prototype.onTriggerClick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n this.$el.toggleClass('active');\n this.toggleContent();\n};\nAccordion.prototype.initExpEd = function () {\n this.$el.toggleClass('active');\n this.dom.$content.slideDown();\n};\nAccordion.prototype.toggleContent = function () {\n this.dom.$icon = this.$el.find('.js-accordion-trigger').find('.icon');\n if (!this.$el.hasClass('active')) {\n this.dom.$icon.attr('class', 'icon icon-plus');\n this.dom.$content.stop(true, true).slideUp(250, 'easeInOutExpo');\n } else {\n this.dom.$icon.attr('class', 'icon icon-minus');\n this.dom.$content.stop(true, true).slideDown(250, 'easeInOutExpo');\n }\n setTimeout(function () {\n $(window).resize();\n }, 250);\n};\n(function ($) {\n $('.available-programs__program, .pl-faqs__faq').each(function (index, element) {\n var el = new Accordion($(element));\n el.toggleContent();\n });\n})(jQuery);\n(function ($) {\n var container = document.querySelector(\"#availablePrograms\");\n if (container !== null) {\n var availablePrograms = container.querySelectorAll(\"ul.available-programs__program-list\");\n var location = \"DED\";\n availablePrograms.forEach(function (program) {\n var programId = program.getAttribute(\"data-program-id\");\n var matches = [];\n var programCount = 0;\n var expAchData = inqAppFormCommon.getPageData(\"data_ExperienceAchievement\");\n expAchData.forEach(function (obj) {\n if (obj.ProgramGroup.Value === programId && obj.Location.Value === location) {\n var ismatch = false;\n matches.find(function (f) {\n if (f.Value === obj.ExperienceAchievement.Value) {\n ismatch = true;\n }\n });\n if (ismatch === false) {\n matches.push({\n \"Value\": obj.ExperienceAchievement.Value,\n \"Text\": obj.ExperienceAchievement.Text\n });\n var li = document.createElement('li');\n li.textContent = obj.ExperienceAchievement.Text;\n program.appendChild(li);\n programCount += 1;\n }\n }\n });\n var parentContainer = program.closest('div.available-programs__program');\n if (programCount === 0) {\n parentContainer.style.display = \"none\";\n } else {\n var header = parentContainer.querySelector('h3.available-programs__program-title');\n var accHeadContent = header.innerHTML;\n accHeadContent = accHeadContent.replace(\"#\", programCount);\n header.innerHTML = accHeadContent;\n }\n });\n }\n})(jQuery);\nfunction DualPath(params) {\n if (!params || !$(params.container).length) {\n return;\n }\n this.setDefaults(params);\n this.addListeners();\n this.enableTabs();\n}\nDualPath.prototype.setDefaults = function (params) {\n this.activeClass = params.activeClass;\n this.dotWrapper = params.dotWrapper;\n this.scrollSpeed = params.scrollSpeed || slow;\n this.xTimer = null;\n this.xScrollTimeout = params.xScrollTimeout;\n if (params.dotAnchor) {\n var dotContainer = $(params.dotAnchor).first(),\n dots = \"
\";\n dotContainer.prepend(dots);\n dotContainer.append(dots);\n }\n this.dom = {\n $container: $(params.container),\n $tabs: $(params.tabWrapper),\n $tab: $(params.tabItem),\n $columns: $(params.container).children(),\n $left: $(params.leftIndicators),\n $right: $(params.rightIndicators),\n $dots: params.dotAnchor ? $(params.container).find(this.dotWrapper) : null,\n $tiles: params.tileClass ? $(params.container).find(params.tileClass) : null\n };\n this.stickyStart = this.dom.$container.offset().top - this.dom.$tabs.height();\n this.stickyEnd = this.dom.$container.offset().top + this.dom.$container.height() - this.dom.$tabs.height();\n};\nDualPath.prototype.addListeners = function () {\n $(window).on('resize', this.enableTabs.bind(this));\n this.dom.$container.on('scroll', this.updateScrolls.bind(this));\n this.dom.$container.on('touchstart touchend', this.handleTouchEvents.bind(this));\n this.dom.$left.on('click touchstart keyup', this.scroll.bind(this, false));\n this.dom.$right.on('click touchstart keyup', this.scroll.bind(this, true));\n var instance = this;\n $(window).on('scroll', this.repositionTabs.bind(this));\n $(window).on('resize', function () {\n instance.balanceTiles();\n instance.equalizeHeights();\n instance.repositionTabs();\n }).resize();\n};\nDualPath.prototype.enableTabs = function () {\n var mq = window.matchMedia(\"(max-width: 1280px)\");\n if (mq.matches) {\n this.dom.$tab.attr('tabindex', '0');\n } else {\n this.dom.$tab.attr('tabindex', '-1');\n }\n};\nDualPath.prototype.handleTouchEvents = function (e) {\n if (e.type === \"touchstart\") {\n this.touchStart = e.originalEvent.changedTouches[0];\n this.scrollTopStart = $(document).scrollTop();\n return;\n }\n var touchEnd = e.originalEvent.changedTouches[0];\n this.scrollTopEnd = $(document).scrollTop();\n var tolerance = 0.2,\n scrollTolerance = 1,\n vector = {\n i: (this.touchStart.pageX - touchEnd.pageX) / this.touchStart.pageX,\n j: (this.touchStart.pageY - touchEnd.pageY) / this.touchStart.pageY\n },\n scroll = Math.abs(this.scrollTopStart - this.scrollTopEnd);\n if (Math.abs(vector.i) > tolerance && scroll < scrollTolerance) {\n this.scroll(vector.i > 0);\n }\n};\nDualPath.prototype.repositionTabs = function () {\n var pageOffset = window.pageYOffset,\n leftOffset = ($(window).width() - this.dom.$tabs.width()) / 2;\n var pos = pageOffset >= this.stickyStart && pageOffset < this.stickyEnd ? 'fixed' : 'relative';\n if (pos === 'fixed') {\n this.dom.$tabs.css({\n position: pos,\n top: 0,\n left: leftOffset\n });\n this.dom.$container.css('padding-top', this.dom.$tabs.height());\n } else {\n this.dom.$tabs.attr('style', '');\n this.dom.$container.attr('style', '');\n }\n};\nDualPath.prototype.scroll = function (direction, event) {\n if (event.type === 'keyup' && event.keyCode !== 13 && event.keyCode !== 32) return;\n event.preventDefault();\n var width = this.dom.$container.width() * (direction ? 1 : -1);\n this.dom.$container.animate({\n scrollLeft: width\n }, this.scrollSpeed);\n this.updateScrolls();\n};\nDualPath.prototype.updateScrolls = function () {\n clearTimeout(this.timer);\n var instance = this;\n this.xTimer = setTimeout(function () {\n var source,\n target,\n totalWidth = 0,\n left;\n instance.dom.$container.children().each(function (i, el) {\n totalWidth += $(el).width();\n });\n if (instance.dom.$container.scrollLeft() > 0) {\n source = instance.dom.$left;\n target = instance.dom.$right;\n left = totalWidth - instance.dom.$container.width();\n } else {\n source = instance.dom.$right;\n target = instance.dom.$left;\n left = 0;\n }\n source.removeClass(instance.activeClass);\n target.addClass(instance.activeClass);\n instance.dom.$container.find(instance.dotWrapper).css({\n 'left': left\n });\n }, this.xScrollTimeout);\n};\nDualPath.prototype.equalizeHeights = function () {\n var elements = this.dom.$columns.children();\n var heights = [];\n elements.each(function () {\n var el = $(this);\n el.css('min-height', 'auto');\n if (!heights[el.index()] || el.outerHeight() > heights[el.index()]) {\n heights[el.index()] = el.outerHeight();\n }\n }).each(function () {\n var el = $(this);\n if (el.height() < heights[el.index()]) {\n el.css('min-height', heights[el.index()]);\n }\n });\n this.stickyStart = this.dom.$container.offset().top - this.dom.$tabs.height();\n this.stickyEnd = this.dom.$container.offset().top + this.dom.$container.height() - this.dom.$tabs.height();\n};\nDualPath.prototype.balanceTiles = function () {\n var tiles = this.dom.$tiles;\n var heights = [];\n tiles.css('height', 'auto').each(function () {\n var item = $(this);\n if (!heights[item.index()] || heights[item.index()] < item.height()) heights[item.index()] = item.height();\n }).each(function () {\n var item = $(this);\n item.height(heights[item.index()]);\n });\n};\nvar pathController = new DualPath({\n container: '.partner-landing-columns__wrapper',\n tabWrapper: '.partner-landing__choose-your-path-tabs-wrapper',\n tabItem: '.partner-landing__choose-your-path-tab',\n leftIndicators: '.partner-landing__choose-your-path-tab:first-child, .nav-dot:first-child',\n rightIndicators: '.partner-landing__choose-your-path-tab:last-child, .nav-dot:last-child',\n dotWrapper: '.nav-dots',\n dotAnchor: '.available-programs__section',\n activeClass: 'active',\n scrollDirection: true,\n scrollSpeed: 'slow',\n xScrollTimeout: 100,\n yScrollTimeout: 50,\n tileClass: '.partner-landing-description__tile'\n});\nfunction Costs() {\n this.$el = $('.partner-landing-cost');\n if (this.$el.length) {\n this.setupDefaults();\n this.init();\n }\n}\n;\nCosts.prototype.setupDefaults = function () {\n this.width = 0;\n this.dom = {\n $stats: this.$el.find('.partner-landing-cost__item-statistic')\n };\n};\nCosts.prototype.init = function () {\n var _this = this;\n this.dom.$stats.each(function (i, element) {\n if ($(element).width() > _this.width) {\n _this.width = $(element).width();\n }\n });\n this.dom.$stats.width(this.width);\n};\n(function ($) {\n new Costs();\n})(jQuery);\nfunction PlFaq($el) {\n this.$el = $el || null;\n this.isExperienceEditor = $('.is-experience-editor').length;\n if (this.$el.length) {\n this.setupDefaults();\n if (!this.isExperienceEditor) {\n this.addListeners();\n } else {\n this.initExpEd();\n }\n }\n}\n;\nPlFaq.prototype.setupDefaults = function () {\n this.dom = {\n $trigger: this.$el.find('.js-pl-faq-trigger'),\n $content: this.$el.find('.js-pl-faq-content')\n };\n};\nPlFaq.prototype.addListeners = function () {\n this.dom.$trigger.on('click touchstart', this.onTriggerClick.bind(this));\n};\nPlFaq.prototype.onTriggerClick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n this.$el.toggleClass('is-active');\n this.toggleContent();\n};\nPlFaq.prototype.initExpEd = function () {\n this.$el.toggleClass('is-active');\n this.dom.$content.slideDown();\n};\nPlFaq.prototype.toggleContent = function () {\n if (!this.$el.hasClass('is-active')) {\n this.dom.$content.slideUp(350);\n } else {\n this.dom.$content.slideDown(350);\n }\n};\n(function ($) {\n $('.pl-faqs__faq').each(function (index, element) {\n new PlFaq($(element));\n });\n})(jQuery);\n$('img.partner-landing-introduction__media-item').click(function () {\n $(this).css('z-index', -1);\n});\nfunction MultiStepFormController(el) {\n this.$el = $(el);\n if (this.$el.length) {\n this.setupDefaults();\n if (!this.isExperienceEditor) {\n this.initDom();\n this.addListeners();\n this.buildProgressBar();\n this.showCurrentStep();\n }\n }\n}\nMultiStepFormController.prototype.setupDefaults = function () {\n this.isExperienceEditor = $('.partner-landing-msf__experience-editor').length;\n this.currentStep = 0;\n this.dom = {\n $progressBar: this.$el.find('.partner-landing-msf__progress-bar'),\n $form: this.$el.find('form'),\n $steps: this.$el.find('.partner-landing-msf__step'),\n $nextStep: this.$el.find('.partner-landing-msf__next-btn'),\n $previousStep: this.$el.find('.partner-landing-msf__back-btn'),\n $pathTooltips: this.$el.find('.partner-landing-msf__choose-path-tooltip')\n };\n};\nMultiStepFormController.prototype.initDom = function () {\n var _this = this;\n};\nMultiStepFormController.prototype.addListeners = function () {\n this.dom.$nextStep.on('touchstart click', this.onNextStepClick.bind(this));\n this.dom.$previousStep.on('touchstart click', this.onPreviousStepClick.bind(this));\n};\nMultiStepFormController.prototype.buildProgressBar = function () {\n var html = '',\n className;\n this.dom.$steps.each(function (i, element) {\n className = i === 0 ? ' partner-landing-msf__progress-step--current' : '';\n html += '
' + (i + 1) + ' ';\n });\n this.dom.$progressBar.html(html);\n this.dom.$progressBarSteps = this.$el.find('.partner-landing-msf__progress-step');\n};\nMultiStepFormController.prototype.showCurrentStep = function () {\n var _this = this;\n this.dom.$currentStep = this.dom.$steps.eq(this.currentStep);\n\n // Update progress bar\n for (var i = this.currentStep; i < this.dom.$progressBarSteps.length; i++) {\n this.dom.$progressBarSteps.eq(i).removeClass('partner-landing-msf__progress-step--completed');\n }\n this.dom.$progressBarSteps.removeClass('partner-landing-msf__progress-step--current');\n this.dom.$progressBarSteps.eq(this.currentStep).addClass('partner-landing-msf__progress-step--current');\n if (this.currentStep) {\n this.dom.$progressBarSteps.eq(this.currentStep - 1).addClass('partner-landing-msf__progress-step--completed');\n }\n this.dom.$form.addClass('partner-landing-msf__form--in-transition');\n setTimeout(function () {\n _this.dom.$form.removeClass('partner-landing-msf__form--in-transition');\n\n // Show current step\n _this.dom.$steps.removeClass('partner-landing-msf__step--current').attr('aria-hidden', true);\n _this.dom.$currentStep.addClass('partner-landing-msf__step--current').removeAttr('aria-hidden').focus();\n }, 500);\n};\nMultiStepFormController.prototype.onNextStepClick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n if (!this.validateStep()) {\n return;\n }\n this.currentStep++;\n this.showCurrentStep();\n};\nMultiStepFormController.prototype.onPreviousStepClick = function (e) {\n e.stopPropagation();\n e.preventDefault();\n this.currentStep--;\n this.showCurrentStep();\n};\nMultiStepFormController.prototype.validateStep = function () {\n var isValidForm = true;\n var form = document.getElementById(\"vue-app\").querySelector(\"form\");\n var formValidator = forms.validateFormFields(form);\n isValidForm = formValidator.isValidForm;\n var entireError = formValidator.Message;\n return isValidForm;\n return true;\n};\n(function ($) {\n $('.partner-landing-msf').each(function (i, el) {\n new MultiStepFormController(el);\n });\n})(jQuery);\nfunction PathBenefits() {\n this.$el = $('.path-benefits');\n if (this.$el.length) {\n this.setupDefaults();\n this.init();\n }\n}\n;\nPathBenefits.prototype.setupDefaults = function () {\n this.width = 0;\n this.dom = {\n $stats: this.$el.find('.path-benefits__statistics-item-stat')\n };\n};\nPathBenefits.prototype.init = function () {\n var _this = this;\n this.dom.$stats.each(function (i, element) {\n if ($(element).width() > _this.width) {\n _this.width = $(element).width();\n }\n });\n this.dom.$stats.width(this.width);\n};\n(function ($) {\n new PathBenefits();\n})(jQuery);\nfunction PathNav(params) {\n if (!params.element || !params.container) {\n return;\n }\n this.setDefaults(params);\n this.addListeners();\n}\n;\nPathNav.prototype.setDefaults = function (params) {\n this.element = $(params.element);\n this.container = $(params.container);\n this.direction = params.direction || true;\n this.speed = params.speed || 'slow';\n};\nPathNav.prototype.addListeners = function () {\n this.element.find('.partner-landing__choose-your-path-tab').on('click touchstart', this.onItemClick.bind(this));\n};\nPathNav.prototype.onItemClick = function (e) {\n e.preventDefault();\n e.stopPropagation();\n var width = this.container[0].scrollWidth * (this.direction ? 1 : -1);\n var offset = (this.container[0].scrollWidth - this.element[0].scrollWidth) * (this.direction ? 1 : 0);\n $('.partner-landing__choose-your-path-tab').toggleClass('active');\n console.log('clicked');\n this.container.animate({\n scrollLeft: width\n }, this.speed).find('.nav-dots').animate({\n left: offset\n }, 'slow');\n this.direction = !this.direction;\n};\n(function ($) {\n $('.partner-landing__choose-your-path-tabs-wrapper').each(function (index, element) {\n new PathNav({\n element: $(element),\n container: '.partner-landing-columns__wrapper',\n direction: true,\n speed: 'slow'\n });\n });\n})(jQuery);\nfunction PathDescriptions(el) {\n this.$el = $(el);\n if (this.$el.length) {\n this.setupDefaults();\n this.addListeners();\n if (this.mql.matches) {\n this.init();\n }\n }\n}\n;\nPathDescriptions.prototype.setupDefaults = function () {\n this.mql = window.matchMedia('(max-width: 767px)');\n this.initialized = false;\n this.dom = {\n $listing: this.$el.find('.path-description__listing'),\n $items: this.$el.find('.path-description__item'),\n $parent: this.$el.parents('.choose-your-path__item'),\n $active: this.$el.find('.path-description__item--active')\n };\n};\nPathDescriptions.prototype.addListeners = function () {\n $(window).on('resize', this.debounce(this.onResize.bind(this), 100));\n this.dom.$parent.on('show-tab', this.onTabChange.bind(this));\n};\nPathDescriptions.prototype.init = function () {\n this.initialized = true;\n console.log(this.dom.$active.index());\n this.dom.$listing.slick({\n mobileFirst: true,\n infinite: false,\n arrows: false,\n dots: true,\n slidesToShow: 1,\n slidesToScroll: 1,\n centerMode: true,\n initialSlide: this.dom.$active.index()\n });\n};\nPathDescriptions.prototype.destroy = function () {\n if (this.initialized) {\n this.initialized = false;\n this.dom.$listing.slick('unslick');\n this.dom.$listing.attr('role', null);\n this.dom.$items.attr({\n role: null,\n tabindex: null,\n 'aria-describedby': null\n });\n }\n};\nPathDescriptions.prototype.onResize = function () {\n if (this.mql.matches) {\n this.init();\n } else {\n this.destroy();\n }\n};\nPathDescriptions.prototype.onTabChange = function () {\n if (this.mql.matches) {\n this.destroy();\n this.init();\n }\n};\nPathDescriptions.prototype.debounce = function (func, wait, immediate) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n var later = function later() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n};\n(function ($) {\n $('.path-description').each(function (i, el) {\n new PathDescriptions(el);\n });\n})(jQuery);\nvar tag = document.createElement('script');\ntag.src = \"https://www.youtube.com/iframe_api\";\nvar firstScriptTag = document.getElementsByTagName('script')[0];\nfirstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\nvar youTubeIframeAPIReady = false;\nfunction onYouTubeIframeAPIReady() {\n youTubeIframeAPIReady = true;\n}\nfunction ThumbnailController(params) {\n if (!params) {\n return;\n }\n this.setDefaults(params);\n this.addListeners();\n}\nThumbnailController.prototype.setDefaults = function (params) {\n this.player = null;\n this.dom = {\n $parent: $(params.parent).first(),\n $frame: $('div' + params.item),\n $thumbnail: $('img' + params.item),\n $trigger: $('button' + params.trigger)\n };\n};\nThumbnailController.prototype.addListeners = function (params) {\n this.dom.$trigger.on('click touchstart', this.load.bind(this));\n};\nThumbnailController.prototype.load = function () {\n if (youTubeIframeAPIReady) {\n var instance = this;\n new YT.Player(instance.dom.$frame.attr('id'), {\n videoId: instance.dom.$frame.data('video-id'),\n events: {\n 'onReady': function onReady(event) {\n instance.dom.$trigger.remove();\n instance.dom.$thumbnail.remove();\n instance.dom.$frame = instance.dom.$parent.find('iframe');\n instance.dom.$frame.removeAttr('width').removeAttr('height');\n instance.player = event.target;\n instance.player.playVideo();\n }\n }\n });\n }\n};\nnew ThumbnailController({\n parent: '.path-benefits__media',\n item: '.path-benefits__media-item',\n trigger: '.path-benefits__media-play'\n});\nnew ThumbnailController({\n parent: '.partner-landing-introduction__media',\n item: '.partner-landing-introduction__media-item',\n trigger: '.partner-landing-introduction__media-play'\n});\nnew ThumbnailController({\n parent: '.partner-landing__choose-your-path-media',\n item: '.partner-landing__choose-your-path-media-item',\n trigger: '.partner-landing__choose-your-path-media-play'\n});\n/*!\r\nWaypoints Sticky Element Shortcut - 4.0.1\r\nCopyright © 2011-2016 Caleb Troughton\r\nLicensed under the MIT license.\r\nhttps://github.com/imakewebthings/waypoints/blob/master/licenses.txt\r\n*/\n(function () {\n 'use strict';\n\n var $ = window.jQuery;\n var Waypoint = window.Waypoint;\n\n /* http://imakewebthings.com/waypoints/shortcuts/sticky-elements */\n function Sticky(options) {\n this.options = $.extend({}, Waypoint.defaults, Sticky.defaults, options);\n this.element = this.options.element;\n this.$element = $(this.element);\n this.createWrapper();\n this.createWaypoint();\n }\n\n /* Private */\n Sticky.prototype.createWaypoint = function () {\n var originalHandler = this.options.handler;\n this.waypoint = new Waypoint($.extend({}, this.options, {\n element: this.wrapper,\n handler: $.proxy(function (direction) {\n var shouldBeStuck = this.options.direction.indexOf(direction) > -1;\n var wrapperHeight = shouldBeStuck ? this.$element.outerHeight(true) : '';\n this.$wrapper.height(wrapperHeight);\n this.$element.toggleClass(this.options.stuckClass, shouldBeStuck);\n if (originalHandler) {\n originalHandler.call(this, direction);\n }\n }, this)\n }));\n };\n\n /* Private */\n Sticky.prototype.createWrapper = function () {\n if (this.options.wrapper) {\n this.$element.wrap(this.options.wrapper);\n }\n this.$wrapper = this.$element.parent();\n this.wrapper = this.$wrapper[0];\n };\n\n /* Public */\n Sticky.prototype.destroy = function () {\n if (this.$element.parent()[0] === this.wrapper) {\n this.waypoint.destroy();\n this.$element.removeClass(this.options.stuckClass);\n if (this.options.wrapper) {\n this.$element.unwrap();\n }\n }\n };\n Sticky.defaults = {\n wrapper: '
',\n stuckClass: 'stuck',\n direction: 'down right'\n };\n Waypoint.Sticky = Sticky;\n})();\nfunction PlContactBar() {\n this.$el = $('.partner-landing-contact-bar');\n var isExperienceEditor = $('.is-experience-editor').length;\n if (this.$el.length) {\n this.setupDefaults();\n if (!isExperienceEditor) {\n this.addListeners();\n this.init();\n }\n }\n}\n;\nPlContactBar.prototype.setupDefaults = function () {\n this.dom = {\n multiStepForm: $('.partner-landing-introduction__form').first(),\n multiStepFormWaypoint: $('.partner-landing-introduction__form-waypoint').first(),\n $requestInfoBtn: this.$el.find('.snhu-pl-btn--request-info')\n };\n};\nPlContactBar.prototype.init = function () {\n //Set up stickyness\n var _this = this;\n if (this.dom.multiStepFormWaypoint.length > 0) {\n var waypoint = new Waypoint({\n element: _this.dom.multiStepFormWaypoint,\n handler: function handler(direction) {\n if (direction == 'down') {\n _this.$el.addClass('pl-contact-bar--is-stuck').show();\n } else {\n _this.$el.hide();\n }\n }\n });\n }\n var sticky = new Waypoint.Sticky({\n element: _this.$el[0],\n direction: \"up\",\n stuckClass: \"pl-contact-bar--is-stuck\",\n offset: function offset() {\n return $(window).height() - $(this.element).outerHeight();\n }\n });\n};\nPlContactBar.prototype.addListeners = function () {\n this.dom.$requestInfoBtn.on('touchstart click', this.onRequestBtnClick.bind(this));\n};\nPlContactBar.prototype.onRequestBtnClick = function (e) {\n e.stopPropagation();\n var _this = this;\n //Scroll to form \n $([document.documentElement, document.body]).animate({\n scrollTop: this.dom.multiStepForm.offset().top\n }, 700, function () {\n var focusEl = _this.dom.multiStepForm.find('button, a, input:not([type=hidden]), select, textarea, [tabindex]:not([tabindex=\"-1\"])').eq(0);\n focusEl.focus();\n });\n};\n(function ($) {\n new PlContactBar();\n})(jQuery);\nfunction TestimonialSlider($el) {\n this.$el = $el || null;\n this.isExperienceEditor = $('.is-experience-editor').length;\n if (this.$el.length) {\n this.setupDefaults();\n this.addListeners();\n }\n}\n;\nTestimonialSlider.prototype.setupDefaults = function () {\n this.dom = {\n $slider: this.$el.find('.pl-testimonial-slider__slider-wrapper')\n };\n};\nTestimonialSlider.prototype.init = function () {\n if (!this.isExperienceEditor) {\n if (typeof $.fn.slick === 'function') {\n this.dom.$slider.slick({\n speed: 888,\n infinite: true,\n easing: 'easeOutQuart',\n dots: true,\n arrows: false,\n centerMode: true,\n centerPadding: 0,\n slidesToShow: 1,\n slidesToScroll: 1,\n variableWidth: true,\n autoplay: false,\n responsive: [{\n breakpoint: 767,\n settings: {\n variableWidth: false,\n centerMode: false\n }\n }]\n });\n }\n } else {\n this.$el.addClass('partner-lander-testimonial-slider--is-experience-editor');\n }\n};\nTestimonialSlider.prototype.addListeners = function () {\n var _this = this;\n $(document).ready(function () {\n _this.init();\n });\n};\n(function ($) {\n new TestimonialSlider($('.partner-lander-testimonial-slider'));\n})(jQuery);"]}