// code goes here /* ======================================================================== * Bootstrap: collapse.js v3.3.7 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ /* jshint latedef: true */ +function ($) { 'use strict'; // COLLAPSE PUBLIC CLASS DEFINITION // ================================ var Collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, Collapse.DEFAULTS, options) this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + '[data-toggle="collapse"][data-target="#' + element.id + '"]') this.transitioning = null if (this.options.parent) { this.$parent = this.getParent() } else { this.addAriaAndCollapsedClass(this.$element, this.$trigger) } if (this.options.toggle) this.toggle() } Collapse.VERSION = '3.3.7' Collapse.TRANSITION_DURATION = 350 Collapse.DEFAULTS = { toggle: true } Collapse.prototype.dimension = function () { var hasWidth = this.$element.hasClass('width') return hasWidth ? 'width' : 'height' } Collapse.prototype.show = function () { if (this.transitioning || this.$element.hasClass('in')) return var activesData var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') if (actives && actives.length) { activesData = actives.data('bs.collapse') if (activesData && activesData.transitioning) return } var startEvent = $.Event('show.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return if (actives && actives.length) { Plugin.call(actives, 'hide') activesData || actives.data('bs.collapse', null) } var dimension = this.dimension() this.$element .removeClass('collapse') .addClass('collapsing')[dimension](0) .attr('aria-expanded', true) this.$trigger .removeClass('collapsed') .attr('aria-expanded', true) this.transitioning = 1 var complete = function () { this.$element .removeClass('collapsing') .addClass('collapse in')[dimension]('') this.transitioning = 0 this.$element .trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) var scrollSize = $.camelCase(['scroll', dimension].join('-')) this.$element .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function () { if (this.transitioning || !this.$element.hasClass('in')) return var startEvent = $.Event('hide.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return var dimension = this.dimension() this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.$element .addClass('collapsing') .removeClass('collapse in') .attr('aria-expanded', false) this.$trigger .addClass('collapsed') .attr('aria-expanded', false) this.transitioning = 1 var complete = function () { this.transitioning = 0 this.$element .removeClass('collapsing') .addClass('collapse') .trigger('hidden.bs.collapse') } if (!$.support.transition) return complete.call(this) this.$element [dimension](0) .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(Collapse.TRANSITION_DURATION) } Collapse.prototype.toggle = function () { this[this.$element.hasClass('in') ? 'hide' : 'show']() } Collapse.prototype.getParent = function () { return $(this.options.parent) .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') .each($.proxy(function (i, element) { var $element = $(element) this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) }, this)) .end() } Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { var isOpen = $element.hasClass('in') $element.attr('aria-expanded', isOpen) $trigger .toggleClass('collapsed', !isOpen) .attr('aria-expanded', isOpen) } function getTargetFromTrigger($trigger) { var href var target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 return $(target) } // COLLAPSE PLUGIN DEFINITION // ========================== function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.collapse') var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.collapse $.fn.collapse = Plugin $.fn.collapse.Constructor = Collapse // COLLAPSE NO CONFLICT // ==================== $.fn.collapse.noConflict = function () { $.fn.collapse = old return this } // COLLAPSE DATA-API // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { var $this = $(this) if (!$this.attr('data-target')) e.preventDefault() var $target = getTargetFromTrigger($this) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() Plugin.call($target, option) }) }(jQuery); $(function() { $('.hs-item-has-children > a').append(''); $('.hs-item-has-children a').on('click', function(e) { $('.main-navigation').addClass('active'); // e.stopPropagation; }); // remove all .show classes when clicked anywhere hide = true; $('body').on("click", function () { if (hide) $('.hs-item-has-children').removeClass('show'); if (hide) $('.main-navigation').removeClass('active'); hide = true; }); $('body').on('click', '.hs-item-has-children > a', function () { var self = $(this); if (self.parent().hasClass('show')) { $('.hs-item-has-children').removeClass('show'); $('.main-navigation').removeClass('active'); return false; } $('.hs-item-has-children').removeClass('show'); self.parent().toggleClass('show'); hide = false; }); }); $(document).ready(function() { if($(window).width() < 1124) { $('.hs-item-has-children > a').click(function(event) { event.preventDefault(); }); } $(window).resize(function() { $('.hs-item-has-children > a').click(function(event) { if($(window).width() < 1124) { event.preventDefault(); } }); }); }); /* * No Scroll */ $(function() { $('#navbar-toggle-x').click(function() { $('body').toggleClass('no-scroll'); }); $('#video-btn').click(function() { $('body').addClass('no-scroll'); }); $('.video-modal-close').click(function() { $('body').removeClass('no-scroll'); }); }); $(document).ready(function() { var bodyWrapper = $('.body-container-wrapper'); function footerHeight() { var footerHeight = $('#footer').outerHeight(); bodyWrapper.css('margin-bottom', footerHeight); } if($(window).width() > 991) { footerHeight(); } else { bodyWrapper.css('margin-bottom', 0); } if($(window).height() < 1100) { bodyWrapper.css('margin-bottom', 0); } $(window).resize(function() { if($(window).width() > 991) { footerHeight(); } else { bodyWrapper.css('margin-bottom', 0); } if($(window).height() < 1100) { bodyWrapper.css('margin-bottom', 0); } }); }); $(window).scroll(function() { if($(window).scrollTop() >= 54) { $('body').addClass('sticky'); } else { $('body').removeClass('sticky'); } }); $(function() { $('.navbar-toggle').click(function() { $(this).toggleClass('collapsed'); }); $(window).resize(function() { if($(window).width() > 1123) { $('.collapse').removeClass('in'); $('.navbar-toggle').addClass('collapsed'); $('body').removeClass('no-scroll'); } }); }); $(document).ready(function() { $('body :not(script)').contents().filter(function() { return this.nodeType === 3; }).replaceWith(function() { return this.nodeValue.replace(/[™®©]/g, '$&'); }); }); $( function() { $( "#accordion" ).accordion({ heightStyle: "content", active: false, collapsible: true }); } ); // Change Filter Button Text when clicking on a location $(document).ready(function() { $('.filter-btn').click(function() { $('#btn-select').text($(this).text()); $('#btn-select').val($(this).text()); }); }); // $(function() { // $('#attendee-quantity').bind('keyup mouseup', function() { // var attendees = $('#attendee-quantity').val(); // console.log(attendees); // }); // console.log('still working'); // }); $(document).ready(function() { var hrOne = '
', hrTwo = '
', hrThree = '
' hrFour = '
' affOneHr = $('.attendee-form-field:nth-child(9)'), affTwoHr = $('.attendee-form-field:nth-child(18)'), // affThreeHr = $('.attendee-form-field:nth-child(29)'), // affFourHr = $('.attendee-form-field:nth-child(33)'); affOneHr.after(hrOne); affTwoHr.after(hrTwo); // affThreeHr.after(hrThree); // affFourHr.after(hrFour); $('.attendee-quantity').change(function() { var af = $('#attendee-fields'), cm = $('#custom-message'), acf = $('#attendee-custom-field'), affAll= $('.attendee-form-field:nth-child(n) input'), affOne = $('.attendee-form-field:nth-child(-n+10) input'), affTwo = $('.attendee-form-field:nth-child(-n+20) input'), affThree = $('.attendee-form-field:nth-child(-n+30) input'), affFour = $('.attendee-form-field:nth-child(-n+37) input'), affFive = $('.attendee-form-field:nth-child(-n+46) input'); var affTwoRemove = $('.attendee-form-field:nth-child(n+10) input'), affThreeRemove = $('.attendee-form-field:nth-child(n+20) input'), affFourRemove = $('.attendee-form-field:nth-child(n+30) input'), affFiveRemove = $('.attendee-form-field:nth-child(n+37) input'); if($(this).val() <= 1) { $(af).removeClass('attendees-two attendees-three attendees-four attendees-five attendees-custom'); $(affOne).prop('required',true); $(affTwoRemove).prop('required',false); } else if ($(this).val() == 2) { $(af).addClass('attendees-two'); $(af).removeClass('attendees-three attendees-four attendees-five attendees-custom'); $(affTwo).prop('required',true); $(affThreeRemove).prop('required',false); } else if ($(this).val() == 3) { $(af).addClass('attendees-two attendees-three'); $(af).removeClass('attendees-four attendees-five attendees-custom'); $(affThree).prop('required',true); $(affFourRemove).prop('required',false); } else { $(af).addClass('attendees-custom'); $(affAll).prop('required',false); } if($(this).val() >= 4) { $(cm).addClass('attendees-custom'); } else { $(cm).removeClass('attendees-custom'); } }); });