").html(t),e=t.find(this.options.linkSelector);e.length?this.refreshLink(e):this.destroy(),this.appendItems(t.children())},appendItems:function(t){var e=this;this.$newContentTarget.append(t.addClass(this.options.preAppendClass)),this.options.onAddNewItems(this,t),setTimeout(function(){t.removeClass(e.options.preAppendClass),e.toggleBusyMode(!1),e.$holder.trigger("ContentLoader/loaded")},100),window.picturefill&&window.picturefill()},refreshLink:function(t){this.$link.attr("href",t.attr("href")),t.remove()},toggleBusyMode:function(t){this.$holder.toggleClass(this.options.busyClass,t),this.isBusy=t},removeInstance:function(){this.$holder.removeData("ContentLoader")},destroy:function(){this.removeInstance(),this.destroySubEvents(),this.$link.remove()}};r.fn.loadMore=function(i){var n=Array.prototype.slice.call(arguments),s=n[0],o=r.extend({scroll:!1,linkSelector:".load-more",newContentTarget:null,busyClass:"is-busy",additionBottomOffset:50,preAppendClass:"new-item",onAddNewItems:function(){}},i);return this.each(function(){var t=jQuery(this),e=t.data("ContentLoader");"object"==typeof i||void 0===i?(a.prototype=r.extend(o.scroll?l:d,c),t.data("ContentLoader",new a(t,o))):"string"==typeof s&&e&&"function"==typeof e[s]&&(n.shift(),e[s].apply(e,n))})}}(jQuery,jQuery(window)),function(s){"use strict";/Windows Phone/.test(navigator.userAgent)||"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;var e=s(window);function i(t){this.options=s.extend({containerClass:"js-background-video",loadedClass:"video-loaded",vimeoAPI:"//f.vimeocdn.com/js/froogaloop2.min.js",wistiaAPI:"//fast.wistia.com/assets/external/E-v1.js",youtubeAPI:"//www.youtube.com/iframe_api",width:640,height:360},t),this.initStructure(),this.attachEvents(),this.init()}i.prototype={initStructure:function(){this.holder=s(this.options.holder),this.isVisible=!1,this.videoSize=null,this.videoContainer=null,this.videoData=this.holder.data("background-video")},getRandomId:function(){function t(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},init:function(){switch(this.videoData.type){case"youtube":this.initYoutube();break;case"vimeo":this.initVimeo();break;case"wistia":this.initWistia();break;case"html5":this.initHTML5()}},initYoutube:function(){function t(){var e=new YT.Player(n[0],{height:i.options.height,width:i.options.width,videoId:i.videoData.video,playerVars:{playlist:i.videoData.video,autoplay:1,controls:0,showinfo:0,modestbranding:1,loop:1,fs:1,cc_load_policy:0,iv_load_policy:3,autohide:0},events:{onReady:function(t){e.mute(),i.videoContainer=s(e.a),i.holder.trigger("loaded.bgVideo")}}})}var e,i=this,n=s("
").appendTo(this.holder).addClass(this.options.containerClass);"undefined"==typeof YT||void 0===YT.Player?(e=window.onYouTubeIframeAPIReady,window.onYouTubeIframeAPIReady=function(){e&&e(),t()},s.getScript(this.options.youtubeAPI)):t()},initVimeo:function(){function t(){s.getJSON("//vimeo.com/api/oembed.json?url="+encodeURIComponent("http://vimeo.com/"+i.videoData.video)+"&loop=true&api=1&player_id="+n+"&width=300&callback=?",function(t){i.videoContainer=s(t.html).addClass(i.options.containerClass).appendTo(i.holder).attr("id",n),$f(i.videoContainer[0]).addEvent("ready",function(t){(e=$f(t)).api("setVolume",0),e.api("play"),i.holder.trigger("loaded.bgVideo")})})}var e,i=this,n=this.getRandomId();"undefined"==typeof $f?s.getScript(this.options.vimeoAPI,t):t()},initWistia:function(){s.getScript(this.options.wistiaAPI);var t=this,e="//fast.wistia.net/embed/iframe/"+this.videoData.video+"?controlsVisibleOnLoad=false&playbar=false&playButton=false&autoPlay=true&endVideoBehavior=loop&fullscreenButton=false&smallPlayButton=false&volume=0&volumeControl=false";this.videoContainer=s('
').addClass(this.options.containerClass).appendTo(this.holder).on("load",function(){t.holder.trigger("loaded.bgVideo")}).attr("src",e)},initHTML5:function(){var t=this;this.videoContainer=s("
").addClass(this.options.containerClass).appendTo(this.holder),this.videoContainer[0].addEventListener("loadeddata",function(){t.holder.trigger("loaded.bgVideo")},!1),this.videoContainer.prop("src",this.videoData.video)},resizeVideo:function(){var t=this.holder.width(),e=this.holder.width()/this.videoSize.ratio;e
*",flexible:!1,multiLine:!1,useMinHeight:!1,biggestHeight:!1},t);return this.each(function(){var t,e,i,a=c(this),l=a.find(d.elements).not("."+d.skipClass);function n(){var t,i,n,s,o,r;l.css(d.useMinHeight&&h?"minHeight":"height",""),d.multiLine?(t=l,i=d,s=c(),o=0,r=t.eq(0).offset().top,t.each(function(t){var e=c(this);e.offset().top===r?s=s.add(this):(n=u(s),o=Math.max(o,p(s,n,i)),r=(s=e).offset().top)}),s.length&&(n=u(s),o=Math.max(o,p(s,n,i))),i.biggestHeight&&t.css(i.useMinHeight&&h?"minHeight":"height",o)):p(l,a,d)}l.length&&(n(),i=function(){e||(e=!0,n(),clearTimeout(t),t=setTimeout(function(){n(),setTimeout(function(){e=!1},10)},100))},d.flexible&&c(window).bind("resize orientationchange fontresize",i),c(window).bind("load",i))})};var h=void 0!==document.documentElement.style.maxHeight;function u(t){var e=0;return t.each(function(){e=Math.max(e,c(this).outerHeight())}),e}function p(t,s,o){var r,a="number"==typeof s?s:s.height();return t.removeClass(o.leftEdgeClass).removeClass(o.rightEdgeClass).each(function(t){var e=c(this),i=0,n="border-box"===e.css("boxSizing")||"border-box"===e.css("-moz-box-sizing")||"border-box"===e.css("-webkit-box-sizing");"number"!=typeof s&&e.parents().each(function(){var t=c(this);if(s.is(this))return!1;i+=t.outerHeight()-t.height()}),r=a-i,0<(r-=n?0:e.outerHeight()-e.height())&&e.css(o.useMinHeight&&h?"minHeight":"height",r)}),t.filter(":first").addClass(o.leftEdgeClass),t.filter(":last").addClass(o.rightEdgeClass),r}c(".hide").hide(),c(".show-features").on("click",function(t){c(".hide, .show").toggle();c("#package-features").is(":visible")?c("#package-features").fadeToggle(200,function(){c("#package-details").fadeToggle(200)}):c("#package-details").fadeToggle(200,function(){c("#package-features").fadeToggle(200)})}),c(".mobile-feature").one("click",function(t){c(this).hide(),c(this).next(".open-feature").show();var e=c(this).parent(),i=c(e).attr("id"),n=(console.log(i),c("."+i+"-details").clone());c(".package").removeClass("active-container"),c(e).addClass("active-container"),c(".mobile-package-detail-"+i).html(n),t.preventDefault()}),c(".open-feature").on("click",function(t){c(this).toggleClass("shown");var e=c(this).parent(),i=c(this).parent().attr("id");c(".package").removeClass("active-container"),c(".mobile-package-detail-"+i).toggle("",function(){c(this).is(":hidden")?c(e).removeClass("active-container"):c(e).addClass("active-container")}),t.preventDefault()}),c(".question-field").on("click",function(){var t=c(this).next(".answer-field");c(this).toggleClass("open"),c(t).toggle()})}(jQuery),function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";function i(l,d,c){(c=c||e||t.jQuery)&&(d.prototype.option||(d.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[l]=function(t){var e,n,s,o,r,a;return"string"==typeof t?(e=h.call(arguments,1),s=e,r="$()."+l+'("'+(n=t)+'")',(e=this).each(function(t,e){var i,e=c.data(e,l);e?(i=e[n])&&"_"!=n.charAt(0)?(i=i.apply(e,s),o=void 0===o?i:o):u(r+" is not a valid method"):u(l+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==o?o:e):(a=t,this.each(function(t,e){var i=c.data(e,l);i?(i.option(a),i._init()):(i=new d(e,a),c.data(e,l,i))}),this)},n(c))}function n(t){t&&!t.bridget&&(t.bridget=i)}var h=Array.prototype.slice,s=t.console,u=void 0===s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){var i;if(t&&e)return-1==(i=(i=this._events=this._events||{})[t]=i[t]||[]).indexOf(e)&&i.push(e),this},e.once=function(t,e){var i;if(t&&e)return this.on(t,e),((i=this._onceEvents=this._onceEvents||{})[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length)return-1!=(e=t.indexOf(e))&&t.splice(e,1),this},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;sthis.cols?0:i,e=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=e?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},e._manageStamp=function(t){var e=a(t),t=this._getElementOffset(t),i=this._getOption("originLeft")?t.left:t.right,n=i+e.outerWidth,i=Math.floor(i/this.columnWidth),i=Math.max(0,i),s=Math.floor(n/this.columnWidth);s-=n%this.columnWidth?0:1;for(var s=Math.min(this.cols-1,s),o=(this._getOption("originTop")?t.top:t.bottom)+e.outerHeight,r=i;r<=s;r++)this.colYs[r]=Math.max(o,this.colYs[r])},e._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},e._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},e.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},t}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){var i;if(t&&e)return-1==(i=(i=this._events=this._events||{})[t]=i[t]||[]).indexOf(e)&&i.push(e),this},e.once=function(t,e){var i;if(t&&e)return this.on(t,e),((i=this._onceEvents=this._onceEvents||{})[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length)return-1!=(e=t.indexOf(e))&&t.splice(e,1),this},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;sn.tolerance[l.direction],s(l),a=t,o=!1}function c(){o||(o=!0,e=requestAnimationFrame(d))}var h=!!i&&{passive:!0,capture:!1};return t.addEventListener("scroll",c,h),d(),{destroy:function(){cancelAnimationFrame(e),t.removeEventListener("scroll",c,h)}}}function i(t,e){e=e||{},Object.assign(this,i.options,e),this.classes=Object.assign({},i.options.classes,e.classes),this.elem=t,this.tolerance=(e=this.tolerance)===Object(e)?e:{down:e,up:e},this.initialised=!1,this.frozen=!1}return i.prototype={constructor:i,init:function(){return i.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=e(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin)&&this.onPin.call(this)},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},i.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},i.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),i}()}]);