/* https://cogov.onair.cc/wp-content/themes/onair-7.0/lib/bootstrap/bootstrap.js */ try{ !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=!1 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=!0 if(this.$element.find('.next, .prev').length&&$.support.transition.end){this.$element.trigger($.support.transition.end) this.cycle(!0)} 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=!0 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=!1 setTimeout(function(){that.$element.trigger('slid')},0)})}else{this.$element.trigger(e) if(e.isDefaultPrevented())return $active.removeClass('active') $next.addClass('active') this.sliding=!1 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('hide'),'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:!0} $.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) $('html').on('click.dropdown.data-api',function(){})} Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,isActive if($this.is('.disabled, :disabled'))return $parent=getParent($this) isActive=$parent.hasClass('open') clearMenus($this) if(!isActive){$parent.toggleClass('open')} $this.focus() return!1},keydown:function(e){var $this,$items,$active,$parent,isActive,index if(!/(38|40|27)/.test(e.keyCode))return $this=$(this) e.preventDefault() e.stopPropagation() 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() return $this.click()} $items=$('[role=menu] li:not(.divider):visible a',$parent) if(!$items.length)return index=$items.index($items.filter(':focus')) if(e.keyCode==38&&index>0)index-- if(e.keyCode==40&&index<$items.length-1)index++ if(!~index)index=0 $items.eq(index).focus()}} function clearMenus(toggler){$(toggle).each(function(){var $parent=getParent($(this));if(toggler==undefined||toggler.closest==undefined||toggler.closest($parent).length==0)$parent.removeClass('open')})} function getParent($this){var selector=$this.attr('data-target'),$parent if(!selector){selector=$this.attr('href') selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')} $parent=selector&&$(selector) if(!$parent||!$parent.length)$parent=$this.parent() return $parent} var old=$.fn.dropdown $.fn.dropdown=function(option){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)})} $.fn.dropdown.Constructor=Dropdown $.fn.dropdown.noConflict=function(){$.fn.dropdown=old return this} $(document).on('click.dropdown.data-api',clearMenus).on('click.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.dropdown-menu',function(e){e.stopPropagation()}).on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.dropdown.data-api',toggle+', [role=menu]',Dropdown.prototype.keydown)}(window.jQuery);!function($){"use strict";var Modal=function(element,options){this.options=options this.$element=$(element).delegate('[data-dismiss="modal"]','click.dismiss.modal',$.proxy(this.hide,this)) this.options.remote&&this.$element.find('.modal-body').load(this.options.remote)} Modal.prototype={constructor:Modal,toggle:function(){return this[!this.isShown?'show':'hide']()},show:function(){var that=this,e=$.Event('show') this.$element.trigger(e) if(this.isShown||e.isDefaultPrevented())return this.isShown=!0 this.escape() this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade') if(!that.$element.parent().length){that.$element.appendTo(document.body)} that.$element.show() if(transition){that.$element[0].offsetWidth} that.$element.addClass('in').attr('aria-hidden',!1) that.enforceFocus() transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger('shown')}):that.$element.focus().trigger('shown')})},hide:function(e){e&&e.preventDefault() var that=this e=$.Event('hide') this.$element.trigger(e) if(!this.isShown||e.isDefaultPrevented())return this.isShown=!1 this.escape() $(document).off('focusin.modal') this.$element.removeClass('in').attr('aria-hidden',!0) $.support.transition&&this.$element.hasClass('fade')?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var that=this $(document).on('focusin.modal',function(e){if(that.$element[0]!==e.target&&!that.$element.has(e.target).length){that.$element.focus()}})},escape:function(){var that=this if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.modal',function(e){e.which==27&&that.hide()})}else if(!this.isShown){this.$element.off('keyup.dismiss.modal')}},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end) that.hideModal()},500) this.$element.one($.support.transition.end,function(){clearTimeout(timeout) that.hideModal()})},hideModal:function(){var that=this this.$element.hide() this.backdrop(function(){that.removeBackdrop() that.$element.trigger('hidden')})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove() this.$backdrop=null},backdrop:function(callback){var that=this,animate=this.$element.hasClass('fade')?'fade':'' if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate this.$backdrop=$('');if(perspective!='')widget.attr('perspective',perspective);jQuery(widgetWrapper).append(widget);jQuery.getJSON('/wp-json/wp/v2/'+(postType=='post'?'posts':postType)+'?slug='+slug,function(json){if(json.length>0){createWidgetByJson(json[0],widgetWrapper,postType,perspective,widgetClass,callback)}})} function stripJs(html){return html.replace(/[\s\S]*?<\/script>/gi,'').replace(/<\/?script[^>]*>/gi,'')} function addContentToWidget(json,$widget){if(json.length>1)json=json[0];if(!$widget.length){console.log('Unable to addContentToWidget');return} if(json.content.rendered!=''){$widget.find('.extended_summary').hide();jQuery('
'+stripJs(json.content.rendered)+'
').insertBefore($widget.find('.sponsor-bar'));if($widget.topNewsInterface!=undefined){$widget.topNewsInterface('.cat-post-thumbnail','.post-title > a',{'scrollToContainer':!0})} createWidgetInterface($widget);if($widget.hasClass('has-menu'))$widget.find('.post-title').removeClass('no-menu')}} function getPostBySlug(slug,postType,callback){jQuery.getJSON('/wp-json/wp/v2/'+(postType=='post'?'posts':postType)+'?slug='+slug,callback)} function createWidgetByJson(json,widgetWrapper,postType='post',perspective='',widgetClass='',callback=null){if(debug>=4)console.log('Entering createWidgetByJson for '+json.slug);var widget=jQuery('#'+json.slug+'_widget');if(widget.length==0){widget=jQuery('
');if(perspective!=''){widget.attr('perspective',perspective)} jQuery(widgetWrapper).append(widget)} if(json.featured_media_content){var imgSpan=jQuery('');widget.append(imgSpan);if(json.featured_media_content.featured_video||!json.featured_media_content.featured_image){imgSpan.append(json.featured_media_content.the_post_thumbnail)}else{var featImg=json.featured_media_content.featured_image;imgSpan.attr('title',featImg.alt);var srcset='';var first=!0;for(size in featImg.sizes){if(size!='thumbnail'){if(!first)srcset+=', ';first=!1;var sizeAtts=featImg.sizes[size];srcset+=sizeAtts.src+' '+sizeAtts.width+'w'}} imgSpan.append(''+featImg.alt+'')}}else if(json.featured_media){var imgSpan=jQuery('');widget.append(imgSpan);jQuery.getJSON('/wp-json/wp/v2/media/'+json.featured_media,function(featJson){if(debug>=4)console.log('featured media call from '+json.slug);imgSpan.attr('title',featJson.alt_text);if(featJson.media_type=="image"){var srcset='';var first=!0;for(size in featJson.media_details.sizes){if(size!='thumbnail'){if(!first)srcset+=', ';first=!1;var sizeAtts=featJson.media_details.sizes[size];srcset+=sizeAtts.source_url+' '+sizeAtts.width+'w'}} if(imgSpan.is(':visible')) jQuery(''+featJson.alt_text+'').css('display','none').appendTo(imgSpan).slideDown('fast');else jQuery(''+featJson.alt_text+'').appendTo(imgSpan)}})} if(!('display_options' in json))console.debug('Slug: '+json.slug+'; display_options not in json');else console.debug('Slug: '+json.slug+'; display_options.hide_title: '+json.display_options.hide_title);if(!('display_options' in json)||json.display_options.hide_title!='yes') widget.append(''+json.title.rendered+'');widget.append(json.excerpt.rendered);if(json.content.rendered!=''){widget.find('.extended_summary').hide();widget.append('
'+stripJs(json.content.rendered)+'
');if(widget.topNewsInterface!=undefined){widget.topNewsInterface('.cat-post-thumbnail','.post-title > a',{'scrollToContainer':!0})} createWidgetInterface(widget)}else{widget.find('.extended_summary').each(extendedSummaryToggle)} if(debug>=4)console.debug('Checking '+json.slug+' for sponsor bar: '+json.sponsor_bar);if(json.sponsor_bar){widget.append(json.sponsor_bar.rendered);if(debug>=5)console.debug('Appending sponsor bar: '+json.sponsor_bar.rendered);if(typeof a2a!='undefined')a2a.init_all()} widget.append('
X
');widget.removeClass('empty');var typeAndSlug=postType+'>'+json.slug;if(debug>=3)console.debug('Done widget '+widget.attr('id')+'; waitingSlugs['+typeAndSlug+']: '+_waitingSlugs[typeAndSlug]);if(typeAndSlug in _waitingSlugs){copyCompletedWidgetToWaitingSlugs(widget,_waitingSlugs[typeAndSlug]);delete _waitingSlugs[typeAndSlug]} _loadingSlugs=_loadingSlugs.filter(function(ele){return ele!=typeAndSlug});if(typeof delayLoadTwitter=='function') widget.find('.twitter-timeline-delay').each(delayLoadTwitter);if(widget.find('.cat-post-thumbnail > a.fvp-dynamic').length>0){jQuery.loadScript('/wp-content/plugins/featured-video-plus/js/frontend.min.js',triggerFvpInit)} if(callback!=null&&typeof(callback)=="function")callback(typeAndSlug);return widget} function copyCompletedWidgetToWaitingSlugs(sourceWidget,waitingItems){var item,listItem,perspective,widgetWrapper,widgetCopy;if(debug>=2)console.debug('Debug2: copyCompletedWidgetToWaitingSlugs: '+sourceWidget.attr('id'));for(var i=0;i=2)console.log('Debug2: copyCompletedWidgetToWaitingSlugs item: '+perspective+' '+widgetWrapper);copyWidgetToDestination(widgetSlug,sourceWidget,widgetWrapper,perspective)}} function copyWidgetToDestination(slug,sourceWidget,destinationWrapperSelector,destPerspective){var widgetClassSelector=' .'+slug;if(typeof destPerspective!=='undefined'&&destPerspective!='')widgetClassSelector+='.'+destPerspective;else destPerspective='';var destContainer=jQuery(destinationWrapperSelector+widgetClassSelector);if(destContainer.length)destContainer.remove();if(debug>=4)console.log('destContainer '+destinationWrapperSelector+widgetClassSelector);var widgetCopy=sourceWidget.clone(!0,!0).attr({"id":"","perspective":destPerspective});if(destPerspective!=sourceWidget.attr('perspective')){widgetCopy.removeClass(sourceWidget.attr('perspective'));widgetCopy.addClass(destPerspective)} if(debug>=4)console.log('no destContainer '+destinationWrapperSelector+widgetClassSelector+', copying entire thing');jQuery(destinationWrapperSelector).append(widgetCopy);if(widgetCopy.find('.main-nav').length==0){createWidgetInterface(widgetCopy)} widgetCopy.find('.twitter-timeline-delay').each(delayLoadTwitter)} function triggerFvpInit(){initFeaturedVideoPlus()} function convertPostViewToWidget(selector='#content'){var contentContainer=jQuery(selector);contentContainer.find('>.content-margin:first-child > div.hentry:first-child').addClass('post-widget').removeClass('hentry').prependTo(contentContainer);jQuery(contentContainer.find('>.content-margin')[0]).remove();var featImg=contentContainer.find('.post_featured_image');jQuery('').append(featImg.find('img')).insertBefore(contentContainer.find('.page_title'));featImg.remove();contentContainer.find('.page_title').after(''+contentContainer.find('.page_title h1').text()+'').remove()} function createWidgetInterfaceSingle(postEl,maxH1=12){createWidgetInterface(postEl,'>a:first-child','',maxH1)} function enterWidget($widget){var $mainNav=$widget.find('.main-nav');console.debug('Entering widget');console.debug($widget[0]);$firstMenuItem=$mainNav.find('> div:first-child > div:first-child');$firstMenuItem.click()} function createWidgetInterface(postEl,titleSelector='.post-title',contentSelector='.post-content',showNav=!0,maxH1=12){postEl=jQuery(postEl);var h1=null;var h1nav,prevH1nav,navButton;var overview;var hId;var h1s=postEl.find(contentSelector+' h1').not('.tn_summary *').not(':empty');var headings;if(h1s.length<2){postEl.find(contentSelector+' h1').remove();headings=postEl.find(contentSelector+' h2').not('.tn_summary *').not(':empty');headings.each(function(ind){this.outerHTML='

'+this.innerHTML+'

'});headings=postEl.find(contentSelector+' h1').not('.tn_summary *').not(':empty')}else{headings=postEl.find(contentSelector+' h1,'+contentSelector+' h2').not('.tn_summary *').not(':empty')} var heading;var button;var hnum=0,h1Count=0;var hasSubheadings;var mainNav=jQuery('');var mnRow=null;mnRow=mainNav;var titleObj;if(postEl.find(titleSelector).length==1)titleObj=postEl.find(titleSelector);else return;var titleContainer=jQuery('').insertBefore(titleObj).append(titleObj);titleObj.removeClass('post-title').removeClass('cat-post-title');titleObj=titleContainer;titleObj.addClass('no-menu');if(headings.length<2){return} if(headings.length>1){postEl.addClass('has-menu')} titleObj.after(mainNav);for(var i=0;i');if(prevH1nav==null){mainNav.after(h1nav)}else{prevH1nav.after(h1nav)} var shortH=heading.attr('short');var headingText=((shortH!==undefined&&shortH!==!1)?shortH:heading.text());button=jQuery('
'+headingText+'
');button.appendTo(mnRow);button.click(function(hId){return function(){var $widget=jQuery(this).closest('.post-widget');$widget.find('.section-wrapper.topnews .tn_row.active, .topnews .section-wrapper .tn_row.active').click();$widget.find('.main-nav div.selected').removeClass('selected');$widget.find('.main-nav').hide();$widget.find('.'+hId+'-nav').show().find('div:nth-child(2)').click()}}(hId));button=jQuery('
'+heading.text()+'
');button.click(function(hId){return function(){var widget=jQuery(this).closest('.post-widget');widget.find('.'+hId+'-nav').hide();widget.find('.main-nav').css('display','table');jQuery(this).closest('.post-widget').find('.section-wrapper:visible').hide();widget.find('.main-nav .related_links').show()}}(hId));h1nav.append(button);if(!heading.next().is('h2')&&!heading.next().is('.topnews')){hId='h_'+hnum;overview=jQuery('

Overview

');hnum++;heading.after(overview);addSectionHeading(h1nav,overview,hId)}}else if(heading.next().length==1&&!heading.next().is('h1')){addSectionHeading(mnRow,heading,hId)}}else if(heading.is('h2')){addSectionHeading(h1nav,heading,hId)}} if(h1Count0){for(var i=h1Count;i%3>0;i++){button=jQuery('
');button.appendTo(mnRow)}} mainNav.hide();mainNav.siblings('.headings-nav').hide();titleObj.removeClass('loading');if(showNav=='slide')mainNav.slideDown(350,function(){enterWidget(mainNav.closest('.post-widget'))});else if(showNav){mainNav.show();enterWidget(mainNav.closest('.post-widget'))}} function addSectionHeading($parentNav,$heading,headingId,hasChildren=!1){var parentNavId=$parentNav.attr('navid');var shortH=$heading.attr('short');var headingText=((shortH!==undefined&&shortH!==!1)?shortH:$heading.text());var $navButton=jQuery('
'+headingText+'
');if(parentNavId=='main-nav'){$navButton.click(function(){var $button=jQuery(this);var $widget=$button.closest('.post-widget');$widget.find('.section-wrapper:visible').hide();$widget.find('.topnews:visible').hide();$widget.find('.section-wrapper.topnews .tn_row.active, .topnews .section-wrapper .tn_row.active').click();$button.closest('.main-nav').find('.selected').removeClass('selected');$button.addClass('selected');var $wrapper=$widget.find('.'+headingId+'-wrapper').show();$wrapper.closest('.topnews').show();$wrapper.closest('.slider-main-content').scrollTop(0);$widget.find('.main-nav .related_links').hide()})}else{$navButton.click(function(){var $widget=jQuery(this).closest('.post-widget');$widget.find('.slider-main-content').scrollTop(0);$widget.find('.section-wrapper:visible').hide().closest('.topnews').hide();jQuery(this).siblings().removeClass('selected');jQuery(this).addClass('selected');var $wrapper=$widget.find('.'+headingId+'-wrapper').show();$wrapper.closest('.section-wrapper').show().closest('.topnews').show()})} $parentNav.append($navButton);var $wrapper=jQuery('
');$heading.after($wrapper);$heading.nextUntil('h1,h2').appendTo($wrapper);$wrapper.prepend($heading);$heading.html(''+$heading.text()+'');var $enclosingWrapper=$wrapper.parents('div.section-wrapper');if($enclosingWrapper.length){$enclosingWrapper.after($wrapper)} if($heading.hasClass('post_summary')){$wrapper.addClass('summary');$heading.siblings('.summary').removeClass('summary');$navButton.addClass('post_summary')} if($heading.hasClass('topnews')){$wrapper.addClass('topnews');$heading.siblings('.topnews').removeClass('topnews')}} function generateWidgetsByCategory(categorySlug,container){container=jQuery(container)} function postContentToAllSlides(){} function postContentToSlide(widget,slide){widget=jQuery(widget);slide=jQuery(slide)} function phoneWidgetSliderNav(widgetWrapper){var widgetWrapper=jQuery(widgetWrapper);var titles=widgetWrapper.find('.post-widget span.post-title > *,.post-widget a.post-title').map(function(){return jQuery(this).text()}).get();var returnToFirst='';if(titles.length>8)returnToFirst='
';var sliderContainer=jQuery('
').insertBefore(widgetWrapper);widgetWrapper.appendTo(sliderContainer);var slideNumWidth=1+1.45*(1+Math.log10(titles.length));var navbar=jQuery('
'+returnToFirst+'
1 / '+titles.length+'
');navbar.insertBefore(widgetWrapper);var widget=widgetWrapper.find('.post-widget').css('margin-top','0');widgetWrapper.cycle({fx:'fade',pause:!0,autostop:0,fit:1,height:'auto',width:'100%',prev:'.widgets .prev',next:'.widgets .next',before:function(elOut,elIn,options){elIn=jQuery(elIn);var inIndex=elIn.attr('idx');var inIndexInt=parseInt(inIndex);if(!isNaN(inIndexInt)){widgetWrapper.parent().find('.slide-numbers > .current').text((inIndexInt+1)+'')} var filterBarHeight=widgetWrapper.parent().find('.filter-bar').outerHeight();var maxHeight=jQuery(window).outerHeight()-filterBarHeight-jQuery('#wpadminbar').outerHeight()-10;widgetWrapper.css('height',maxHeight+'px').css('width','100%')},after:function(elOut,elIn,options){},pagerAnchorBuilder:function(index,slide){slide=jQuery(slide);var container=slide.closest('.widgetWrapper');slide.attr('idx',index)},});widgetWrapper.cycle('pause');widgetSliderCycleControl(widgetWrapper)} widgetSliderCycleControl=function(slider){slider.parent().find('.tostart').click(function(){jQuery(this).closest('.sliderContainer').find('>.widgetWrapper').cycle(0)});jQuery(document).keydown(function(e){switch(e.which){case 37:slider.cycle('prev');break;case 38:break;case 39:slider.cycle('next');break;case 40:break;default:return} e.preventDefault()})}; } catch(e){console.error("An error has occurred: "+e.stack);} /* https://cogov.onair.cc/wp-content/themes/onair-7.0/assets/js/category-view.js */ try{ function loadPostsForCategory(category){console.log('Start loadPostsForCategory: '+category)}; } catch(e){console.error("An error has occurred: "+e.stack);} /* https://cogov.onair.cc/wp-content/themes/onair-7.0/assets/js/left-nav-imp.js */ try{ jQuery(document).ready(function(){jQuery('ln-btn').each('.menu-drawer li.dropdown',function(k,v){});jQuery('.navpulldown').click(function(){if(jQuery(this).attr('data-target')!=undefined) jQuery(jQuery(this).attr('data-target')).toggle();else jQuery('.menu-drawer').toggle()});jQuery('.menu-drawer a.dropdown-arrow').click(function(evt){evt.preventDefault();var element=jQuery(this);var itemID=element.attr('title');jQuery('.menu-drawer #dropdown-child-of-'+itemID).slideToggle()});jQuery('.intel_nav a.dropdown-arrow').click(function(evt){evt.preventDefault();var element=jQuery(this);var itemID=element.attr('title');jQuery('.intel_nav #dropdown-child-of-'+itemID).slideToggle()})}); } catch(e){console.error("An error has occurred: "+e.stack);} /* https://cogov.onair.cc/wp-content/themes/onair-7.0/lib/js.cookie.min.js */ try{ /** * Minified by jsDelivr using UglifyJS v3.4.4. * Original file: /npm/js-cookie@2.2.0/src/js.cookie.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function g(){for(var e=0,n={};e0&&ext.parent().find('arrow').length==0){ext.before('
');ext.prev().click(function(){var arrow=jQuery(this);if(arrow.hasClass('down')){arrow.attr('title','Read less');arrow.attr('alt','Read less')}else{arrow.attr('title','Read more');arrow.attr('alt','Read more')} jQuery(this).next().slideToggle("fast",function(){jQuery(this).prev().toggleClass('down')})})}} jQuery(document).ready(function(){jQuery('.sliderContainer .slider-main-content > .extended_summary').each(extendedSummaryToggle);jQuery('body.home #widgets .extended_summary').each(extendedSummaryToggle);jQuery('.cyclenav .excerpt .extended_summary').each(extendedSummaryToggle)}); } catch(e){console.error("An error has occurred: "+e.stack);}