diff --git a/media/jui/js/bootstrap.js b/media/jui/js/bootstrap.js index 351c932820f3d..a66ceb1258b69 100644 --- a/media/jui/js/bootstrap.js +++ b/media/jui/js/bootstrap.js @@ -17,6 +17,9 @@ * limitations under the License. * ========================================================== */ + /** + * Custom version for Joomla! + */ !function ($) { @@ -108,7 +111,7 @@ $parent.trigger(e = $.Event('close')) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $parent.removeClass('in') @@ -133,8 +136,8 @@ return this.each(function () { var $this = $(this) , data = $this.data('alert') - if (!data) { $this.data('alert', (data = new Alert(this))) } - if (typeof option == 'string') { data[option].call($this) } + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) }) } @@ -228,9 +231,9 @@ var $this = $(this) , data = $this.data('button') , options = typeof option == 'object' && option - if (!data) { $this.data('button', (data = new Button(this, options))) } - if (option == 'toggle') { data.toggle() } - else if (option) { data.setState(option) } + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) }) } @@ -255,7 +258,7 @@ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { var $btn = $(e.target) - if (!$btn.hasClass('btn')) { $btn = $btn.closest('.btn') } + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') $btn.button('toggle') }) @@ -299,8 +302,8 @@ Carousel.prototype = { cycle: function (e) { - if (!e) { this.paused = false } - if (this.interval) { clearInterval(this.interval); } + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); this.options.interval && !this.paused && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) @@ -317,7 +320,7 @@ var activeIndex = this.getActiveIndex() , that = this - if (pos > (this.$items.length - 1) || pos < 0) { return } + if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) { return this.$element.one('slid', function () { @@ -333,7 +336,7 @@ } , pause: function (e) { - if (!e) { this.paused = true } + if (!e) this.paused = true if (this.$element.find('.next, .prev').length && $.support.transition.end) { this.$element.trigger($.support.transition.end) this.cycle(true) @@ -344,12 +347,12 @@ } , next: function () { - if (this.sliding) { return } + if (this.sliding) return return this.slide('next') } , prev: function () { - if (this.sliding) { return } + if (this.sliding) return return this.slide('prev') } @@ -373,7 +376,7 @@ , direction: direction }) - if ($next.hasClass('active')) { return } + if ($next.hasClass('active')) return if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') @@ -385,7 +388,7 @@ if ($.support.transition && this.$element.hasClass('slide')) { this.$element.trigger(e) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $next.addClass(type) $next[0].offsetWidth // force reflow $active.addClass(direction) @@ -398,7 +401,7 @@ }) } else { this.$element.trigger(e) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $active.removeClass('active') $next.addClass('active') this.sliding = false @@ -424,10 +427,10 @@ , data = $this.data('carousel') , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) , action = typeof option == 'string' ? option : options.slide - if (!data) { $this.data('carousel', (data = new Carousel(this, options))) } - if (typeof option == 'number') { data.to(option) } - else if (action) { data[action]() } - else if (options.interval) { data.pause().cycle() } + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() }) } @@ -519,7 +522,7 @@ , actives , hasData - if (this.transitioning || this.$element.hasClass('in')) { return } + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) @@ -527,7 +530,7 @@ if (actives && actives.length) { hasData = actives.data('collapse') - if (hasData && hasData.transitioning) { return } + if (hasData && hasData.transitioning) return actives.collapse('hide') hasData || actives.data('collapse', null) } @@ -539,7 +542,7 @@ , hide: function () { var dimension - if (this.transitioning || !this.$element.hasClass('in')) { return } + if (this.transitioning || !this.$element.hasClass('in')) return dimension = this.dimension() this.reset(this.$element[dimension]()) /* >>> JUI >>> */ @@ -568,14 +571,14 @@ , transition: function (method, startEvent, completeEvent) { var that = this , complete = function () { - if (startEvent.type == 'show') { that.reset() } + if (startEvent.type == 'show') that.reset() that.transitioning = 0 that.$element.trigger(completeEvent) } this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) { return } + if (startEvent.isDefaultPrevented()) return this.transitioning = 1 @@ -603,8 +606,8 @@ var $this = $(this) , data = $this.data('collapse') , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) { $this.data('collapse', (data = new Collapse(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() }) } @@ -698,14 +701,14 @@ , isHover /* <<< JUI <<< */ - if ($this.is('.disabled, :disabled')) { return } + if ($this.is('.disabled, :disabled')) return $parent = getParent($this) isActive = $parent.hasClass('open') /* >>> JUI >>> */ isHover = $parent.parent().hasClass('nav-hover') - if(!isHover && e.type == 'mouseover') { return } + if(!isHover && e.type == 'mouseover') return /* <<< JUI <<< */ url = $this.attr('href') @@ -743,33 +746,33 @@ , isActive , index - if (!/(38|40|27)/.test(e.keyCode)) { return } + if (!/(38|40|27)/.test(e.keyCode)) return $this = $(this) e.preventDefault() e.stopPropagation() - if ($this.is('.disabled, :disabled')) { return } + if ($this.is('.disabled, :disabled')) return $parent = getParent($this) isActive = $parent.hasClass('open') if (!isActive || (isActive && e.keyCode == 27)) { - if (e.which == 27) { $parent.find(toggle).focus() } + if (e.which == 27) $parent.find(toggle).focus() return $this.click() } $items = $('[role=menu] li:not(.divider):visible a', $parent) - if (!$items.length) { return } + if (!$items.length) return index = $items.index($items.filter(':focus')) - if (e.keyCode == 38 && index > 0) { index-- } // up - if (e.keyCode == 40 && index < $items.length - 1) { index++ } // down - if (!~index) { index = 0 } + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 $items .eq(index) @@ -799,7 +802,7 @@ $parent = selector && $(selector) - if (!$parent || !$parent.length) { $parent = $this.parent() } + if (!$parent || !$parent.length) $parent = $this.parent() return $parent } @@ -814,8 +817,8 @@ return this.each(function () { var $this = $(this) , data = $this.data('dropdown') - if (!data) { $this.data('dropdown', (data = new Dropdown(this))) } - if (typeof option == 'string') { data[option].call($this) } + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) }) } @@ -892,7 +895,7 @@ this.$element.trigger(e) - if (this.isShown || e.isDefaultPrevented()) { return } + if (this.isShown || e.isDefaultPrevented()) return this.isShown = true @@ -933,7 +936,7 @@ this.$element.trigger(e) - if (!this.isShown || e.isDefaultPrevented()) { return } + if (!this.isShown || e.isDefaultPrevented()) return this.isShown = false @@ -1013,11 +1016,11 @@ : $.proxy(this.hide, this) ) - if (doAnimate) { this.$backdrop[0].offsetWidth } // force reflow + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow this.$backdrop.addClass('in') - if (!callback) { return } + if (!callback) return doAnimate ? this.$backdrop.one($.support.transition.end, callback) : @@ -1047,9 +1050,9 @@ var $this = $(this) , data = $this.data('modal') , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) - if (!data) { $this.data('modal', (data = new Modal(this, options))) } - if (typeof option == 'string') { data[option]() } - else if (options.show) { data.show() } + if (!data) $this.data('modal', (data = new Modal(this, options))) + if (typeof option == 'string') data[option]() + else if (options.show) data.show() }) } @@ -1177,29 +1180,29 @@ , self this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) { options[key] = value } + if (defaults[key] != value) options[key] = value }, this) self = $(e.currentTarget)[this.type](options).data(this.type) - if (!self.options.delay || !self.options.delay.show) { return self.show() } + if (!self.options.delay || !self.options.delay.show) return self.show() clearTimeout(this.timeout) self.hoverState = 'in' this.timeout = setTimeout(function() { - if (self.hoverState == 'in') { self.show() } + if (self.hoverState == 'in') self.show() }, self.options.delay.show) } , leave: function (e) { var self = $(e.currentTarget)[this.type](this._options).data(this.type) - if (this.timeout) { clearTimeout(this.timeout) } - if (!self.options.delay || !self.options.delay.hide) { return self.hide() } + if (this.timeout) clearTimeout(this.timeout) + if (!self.options.delay || !self.options.delay.hide) return self.hide() self.hoverState = 'out' this.timeout = setTimeout(function() { - if (self.hoverState == 'out') { self.hide() } + if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } @@ -1214,7 +1217,7 @@ if (this.hasContent() && this.enabled) { this.$element.trigger(e) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $tip = this.tip() this.setContent() @@ -1295,7 +1298,7 @@ this.replaceArrow(actualHeight - height, actualHeight, 'top') } - if (replace) { $tip.offset(offset) } + if (replace) $tip.offset(offset) } , replaceArrow: function(delta, dimension, position){ @@ -1325,7 +1328,7 @@ /* <<< JUI <<< */ this.$element.trigger(e) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $tip.removeClass('in') @@ -1429,8 +1432,8 @@ var $this = $(this) , data = $this.data('tooltip') , options = typeof option == 'object' && option - if (!data) { $this.data('tooltip', (data = new Tooltip(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() }) } @@ -1553,8 +1556,8 @@ var $this = $(this) , data = $this.data('popover') , options = typeof option == 'object' && option - if (!data) { $this.data('popover', (data = new Popover(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('popover', (data = new Popover(this, options))) + if (typeof option == 'string') data[option]() }) } @@ -1707,8 +1710,8 @@ var $this = $(this) , data = $this.data('scrollspy') , options = typeof option == 'object' && option - if (!data) { $this.data('scrollspy', (data = new ScrollSpy(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() }) } @@ -1787,7 +1790,7 @@ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - if ($this.parent('li').hasClass('active')) { return } + if ( $this.parent('li').hasClass('active') ) return previous = $ul.find('.active:last a')[0] @@ -1797,7 +1800,7 @@ $this.trigger(e) - if (e.isDefaultPrevented()) { return } + if (e.isDefaultPrevented()) return $target = $(selector) @@ -1856,8 +1859,8 @@ return this.each(function () { var $this = $(this) , data = $this.data('tab') - if (!data) { $this.data('tab', (data = new Tab(this))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() }) } @@ -2002,9 +2005,9 @@ , item while (item = items.shift()) { - if (!item.toLowerCase().indexOf(this.query.toLowerCase())) { beginswith.push(item) } - else if (~item.indexOf(this.query)) { caseSensitive.push(item) } - else { caseInsensitive.push(item) } + if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) + else if (~item.indexOf(this.query)) caseSensitive.push(item) + else caseInsensitive.push(item) } return beginswith.concat(caseSensitive, caseInsensitive) @@ -2080,7 +2083,7 @@ } , move: function (e) { - if (!this.shown) { return } + if (!this.shown) return switch(e.keyCode) { case 9: // tab @@ -2109,7 +2112,7 @@ } , keypress: function (e) { - if (this.suppressKeyPressRepeat) { return } + if (this.suppressKeyPressRepeat) return this.move(e) } @@ -2124,12 +2127,12 @@ case 9: // tab case 13: // enter - if (!this.shown) { return } + if (!this.shown) return this.select() break case 27: // escape - if (!this.shown) { return } + if (!this.shown) return this.hide() break @@ -2147,7 +2150,7 @@ , blur: function (e) { this.focused = false - if (!this.mousedover && this.shown) { this.hide() } + if (!this.mousedover && this.shown) this.hide() } , click: function (e) { @@ -2165,7 +2168,7 @@ , mouseleave: function (e) { this.mousedover = false - if (!this.focused && this.shown) { this.hide() } + if (!this.focused && this.shown) this.hide() } } @@ -2181,8 +2184,8 @@ var $this = $(this) , data = $this.data('typeahead') , options = typeof option == 'object' && option - if (!data) { $this.data('typeahead', (data = new Typeahead(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) + if (typeof option == 'string') data[option]() }) } @@ -2211,7 +2214,7 @@ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { var $this = $(this) - if ($this.data('typeahead')) { return } + if ($this.data('typeahead')) return $this.typeahead($this.data()) }) @@ -2254,7 +2257,7 @@ } Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) { return } + if (!this.$element.is(':visible')) return var scrollHeight = $(document).height() , scrollTop = this.$window.scrollTop() @@ -2265,16 +2268,16 @@ , reset = 'affix affix-top affix-bottom' , affix - if (typeof offset != 'object') { offsetBottom = offsetTop = offset } - if (typeof offsetTop == 'function') { offsetTop = offset.top() } - if (typeof offsetBottom == 'function') { offsetBottom = offset.bottom() } + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top() + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : offsetTop != null && scrollTop <= offsetTop ? 'top' : false - if (this.affixed === affix) { return } + if (this.affixed === affix) return this.affixed = affix this.unpin = affix == 'bottom' ? position.top - scrollTop : null @@ -2293,8 +2296,8 @@ var $this = $(this) , data = $this.data('affix') , options = typeof option == 'object' && option - if (!data) { $this.data('affix', (data = new Affix(this, options))) } - if (typeof option == 'string') { data[option]() } + if (!data) $this.data('affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() }) } diff --git a/media/jui/js/bootstrap.min.js b/media/jui/js/bootstrap.min.js index 4e66349aa23a7..4e068c6629944 100644 --- a/media/jui/js/bootstrap.min.js +++ b/media/jui/js/bootstrap.min.js @@ -1,510 +1,8 @@ -!function($){"use strict";$(function(){$.support.transition=(function(){var transitionEnd=(function(){var el=document.createElement('bootstrap'),transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd otransitionend','transition':'transitionend'},name -for(name in transEndEventNames){if(el.style[name]!==undefined){return transEndEventNames[name]}}}()) -return transitionEnd&&{end:transitionEnd}})()})}(window.jQuery);!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on('click',dismiss,this.close)} -Alert.prototype.close=function(e){var $this=$(this),selector=$this.attr('data-target'),$parent -if(!selector){selector=$this.attr('href') -selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} -$parent=$(selector) -e&&e.preventDefault() -$parent.length||($parent=$this.hasClass('alert')?$this:$this.parent()) -$parent.trigger(e=$.Event('close')) -if(e.isDefaultPrevented()){return} -$parent.removeClass('in') -function removeElement(){$parent.trigger('closed').remove()} -$.support.transition&&$parent.hasClass('fade')?$parent.on($.support.transition.end,removeElement):removeElement()} -var old=$.fn.alert -$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data('alert') -if(!data){$this.data('alert',(data=new Alert(this)))} -if(typeof option=='string'){data[option].call($this)}})} -$.fn.alert.Constructor=Alert -$.fn.alert.noConflict=function(){$.fn.alert=old -return this} -$(document).on('click.alert.data-api',dismiss,Alert.prototype.close)}(window.jQuery);!function($){"use strict";var Button=function(element,options){this.$element=$(element) -this.options=$.extend({},$.fn.button.defaults,options)} -Button.prototype.setState=function(state){var d='disabled',$el=this.$element,data=$el.data(),val=$el.is('input')?'val':'html' -state=state+'Text' -data.resetText||$el.data('resetText',$el[val]()) -$el[val](data[state]||this.options[state]) -setTimeout(function(){state=='loadingText'?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)} -Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]') -$parent&&$parent.find('.active').removeClass('active') -this.$element.toggleClass('active')} -var old=$.fn.button -$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data('button'),options=typeof option=='object'&&option -if(!data){$this.data('button',(data=new Button(this,options)))} -if(option=='toggle'){data.toggle()}else if(option){data.setState(option)}})} -$.fn.button.defaults={loadingText:'loading...'} -$.fn.button.Constructor=Button -$.fn.button.noConflict=function(){$.fn.button=old -return this} -$(document).on('click.button.data-api','[data-toggle^=button]',function(e){var $btn=$(e.target) -if(!$btn.hasClass('btn')){$btn=$btn.closest('.btn')} -$btn.button('toggle')})}(window.jQuery);!function($){"use strict";var Carousel=function(element,options){this.$element=$(element) -this.$indicators=this.$element.find('.carousel-indicators') -this.options=options -this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))} -Carousel.prototype={cycle:function(e){if(!e){this.paused=false} -if(this.interval){clearInterval(this.interval);} -this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)) -return this},getActiveIndex:function(){this.$active=this.$element.find('.item.active') -this.$items=this.$active.parent().children() -return this.$items.index(this.$active)},to:function(pos){var activeIndex=this.getActiveIndex(),that=this -if(pos>(this.$items.length-1)||pos<0){return} -if(this.sliding){return this.$element.one('slid',function(){that.to(pos)})} -if(activeIndex==pos){return this.pause().cycle()} -return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))},pause:function(e){if(!e){this.paused=true} -if(this.$element.find('.next, .prev').length&&$.support.transition.end){this.$element.trigger($.support.transition.end) -this.cycle(true)} -clearInterval(this.interval) -this.interval=null -return this},next:function(){if(this.sliding){return} -return this.slide('next')},prev:function(){if(this.sliding){return} -return this.slide('prev')},slide:function(type,next){var $active=this.$element.find('.item.active'),$next=next||$active[type](),isCycling=this.interval,direction=type=='next'?'left':'right',fallback=type=='next'?'first':'last',that=this,e -this.sliding=true -isCycling&&this.pause() -$next=$next.length?$next:this.$element.find('.item')[fallback]() -e=$.Event('slide',{relatedTarget:$next[0],direction:direction}) -if($next.hasClass('active')){return} -if(this.$indicators.length){this.$indicators.find('.active').removeClass('active') -this.$element.one('slid',function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()]) -$nextIndicator&&$nextIndicator.addClass('active')})} -if($.support.transition&&this.$element.hasClass('slide')){this.$element.trigger(e) -if(e.isDefaultPrevented()){return} -$next.addClass(type) -$next[0].offsetWidth -$active.addClass(direction) -$next.addClass(direction) -this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active') -$active.removeClass(['active',direction].join(' ')) -that.sliding=false -setTimeout(function(){that.$element.trigger('slid')},0)})}else{this.$element.trigger(e) -if(e.isDefaultPrevented()){return} -$active.removeClass('active') -$next.addClass('active') -this.sliding=false -this.$element.trigger('slid')} -isCycling&&this.cycle() -return this}} -var old=$.fn.carousel -$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data('carousel'),options=$.extend({},$.fn.carousel.defaults,typeof option=='object'&&option),action=typeof option=='string'?option:options.slide -if(!data){$this.data('carousel',(data=new Carousel(this,options)))} -if(typeof option=='number'){data.to(option)}else if(action){data[action]()}else if(options.interval){data.pause().cycle()}})} -$.fn.carousel.defaults={interval:5000,pause:'hover'} -$.fn.carousel.Constructor=Carousel -$.fn.carousel.noConflict=function(){$.fn.carousel=old -return this} -$(document).on('click.carousel.data-api','[data-slide], [data-slide-to]',function(e){var $this=$(this),href,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')),options=$.extend({},$target.data(),$this.data()),slideIndex -$target.carousel(options) -if(slideIndex=$this.attr('data-slide-to')){$target.data('carousel').pause().to(slideIndex).cycle()} -e.preventDefault()})}(window.jQuery);!function($){"use strict";var Collapse=function(element,options){this.$element=$(element) -this.options=$.extend({},$.fn.collapse.defaults,options) -if(this.options.parent){this.$parent=$(this.options.parent)} -this.options.toggle&&this.toggle()} -Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass('width') -return hasWidth?'width':'height'},show:function(){var dimension,scroll,actives,hasData -if(this.transitioning||this.$element.hasClass('in')){return} -dimension=this.dimension() -scroll=$.camelCase(['scroll',dimension].join('-')) -actives=this.$parent&&this.$parent.find('> .accordion-group > .in') -if(actives&&actives.length){hasData=actives.data('collapse') -if(hasData&&hasData.transitioning){return} -actives.collapse('hide') -hasData||actives.data('collapse',null)} -this.$element[dimension](0) -this.transition('addClass',$.Event('show'),'shown') -$.support.transition&&this.$element[dimension](this.$element[0][scroll])},hide:function(){var dimension -if(this.transitioning||!this.$element.hasClass('in')){return} -dimension=this.dimension() -this.reset(this.$element[dimension]()) -this.transition('removeClass',$.Event('hideme'),'hidden') -this.$element[dimension](0)},reset:function(size){var dimension=this.dimension() -this.$element.removeClass('collapse') -[dimension](size||'auto') -[0].offsetWidth -this.$element[size!==null?'addClass':'removeClass']('collapse') -return this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){if(startEvent.type=='show'){that.reset()} -that.transitioning=0 -that.$element.trigger(completeEvent)} -this.$element.trigger(startEvent) -if(startEvent.isDefaultPrevented()){return} -this.transitioning=1 -this.$element[method]('in') -$.support.transition&&this.$element.hasClass('collapse')?this.$element.one($.support.transition.end,complete):complete()},toggle:function(){this[this.$element.hasClass('in')?'hide':'show']()}} -var old=$.fn.collapse -$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data('collapse'),options=$.extend({},$.fn.collapse.defaults,$this.data(),typeof option=='object'&&option) -if(!data){$this.data('collapse',(data=new Collapse(this,options)))} -if(typeof option=='string'){data[option]()}})} -$.fn.collapse.defaults={toggle:true} -$.fn.collapse.Constructor=Collapse -$.fn.collapse.noConflict=function(){$.fn.collapse=old -return this} -$(document).on('click.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href,target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''),option=$(target).data('collapse')?'toggle':$this.data() -$this[$(target).hasClass('in')?'addClass':'removeClass']('collapsed') -$(target).collapse(option)})}(window.jQuery);!function($){"use strict";var toggle='[data-toggle=dropdown]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle).on('mouseover.dropdown.data-api',this.toggle) -$('html').on('click.dropdown.data-api',function(){$el.parent().parent().removeClass('nav-hover') -$el.parent().removeClass('open')})} -Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,isActive,url,isHover -if($this.is('.disabled, :disabled')){return} -$parent=getParent($this) -isActive=$parent.hasClass('open') -isHover=$parent.parent().hasClass('nav-hover') -if(!isHover&&e.type=='mouseover'){return} -url=$this.attr('href') -if(e.type=='click'&&(url)&&(url!=='#')){window.location=url -return} -clearMenus() -if((!isActive&&e.type!='mouseover')||(isHover&&e.type=='mouseover')){if('ontouchstart'in document.documentElement){$('