/* https://mi.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://mi.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://mi.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://mi.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={};e"),t},this.decrementAllCounts=function(){for(var t=s(".simplefavorite-button.active.has-count"),e=0;e ')+a.state_active,n(t).html(i.formatter.addFavoriteCount(s,o))):(s=(s+=' ')+a.state_default,n(t).html(i.formatter.addFavoriteCount(s,o)),i.applyIconColor(t,e),i.applyCountColor(t,e))},i.colors=function(t,e){var o;i.options.custom_colors&&(e?((o=i.options.active).background_active&&n(t).css("background-color",o.background_active),o.border_active&&n(t).css("border-color",o.border_active),o.text_active&&n(t).css("color",o.text_active)):((o=i.options.default).background_default&&n(t).css("background-color",o.background_default),o.border_default&&n(t).css("border-color",o.border_default),o.text_default&&n(t).css("color",o.text_default),i.boxShadow(t)))},i.boxShadow=function(t){i.options.box_shadow||(n(t).css("box-shadow","none"),n(t).css("-webkit-box-shadow","none"),n(t).css("-moz-box-shadow","none"))},i.applyIconColor=function(t,e){i.options.custom_colors&&(e&&i.options.active.icon_active&&n(t).find("i").css("color",i.options.active.icon_active),!e)&&i.options.default.icon_default&&n(t).find("i").css("color",i.options.default.icon_default)},i.applyCountColor=function(t,e){i.options.custom_colors&&(e&&i.options.active.count_active?n(t).find(Favorites.selectors.count).css("color",i.options.active.count_active):!e&&i.options.default.count_default&&n(t).find(Favorites.selectors.count).css("color",i.options.default.count_default))}},(Favorites=Favorites||{}).UserFavorites=function(){var e=this,o=jQuery;return e.initialLoad=!1,e.bindEvents=function(){o(window).on("load",function(){e.initialLoad=!0,e.getFavorites()})},e.getFavorites=function(){o.ajax({url:Favorites.jsData.ajaxurl,type:"POST",datatype:"json",data:{action:Favorites.formActions.favoritesarray},success:function(t){Favorites.jsData.dev_mode&&(console.log("The current user favorites were successfully loaded."),console.log(t)),Favorites.userFavorites=t.favorites,o(document).trigger("favorites-user-favorites-loaded",[t.favorites,e.initialLoad]),o(document).trigger("favorites-update-all-buttons"),e.initialLoad&&favorites_after_initial_load(Favorites.userFavorites)},error:function(t){Favorites.jsData.dev_mode&&(console.log("The was an error loading the user favorites."),console.log(t))}})},e.bindEvents()},(Favorites=Favorites||{}).Clear=function(){var s=this,i=jQuery;return s.activeButton,s.utilities=new Favorites.Utilities,s.formatter=new Favorites.Formatter,s.bindEvents=function(){i(document).on("click",Favorites.selectors.clear_button,function(t){t.preventDefault(),s.activeButton=i(this),s.clearFavorites()}),i(document).on("favorites-updated-single",function(){s.updateClearButtons()}),i(document).on("favorites-user-favorites-loaded",function(){s.updateClearButtons()})},s.clearFavorites=function(){s.loading(!0);var e=i(s.activeButton).attr("data-siteid");i.ajax({url:Favorites.jsData.ajaxurl,type:"post",datatype:"json",data:{action:Favorites.formActions.clearall,siteid:e},success:function(t){Favorites.jsData.dev_mode&&(console.log("Favorites list successfully cleared."),console.log(t)),Favorites.userFavorites=t.favorites,s.formatter.decrementAllCounts(),s.loading(!1),s.clearSiteFavorites(e),i(document).trigger("favorites-cleared",[s.activeButton,t.old_favorites]),i(document).trigger("favorites-update-all-buttons")},error:function(t){Favorites.jsData.dev_mode&&(console.log("There was an error clearing the favorites list."),console.log(t))}})},s.loading=function(t){t?(i(s.activeButton).addClass(Favorites.cssClasses.loading),i(s.activeButton).attr("disabled","disabled")):i(s.activeButton).removeClass(Favorites.cssClasses.loading)},s.updateClearButtons=function(){for(var t=0;t",t=(t+='
")+'
'+Favorites.jsData.authentication_modal_content+"
\x3c!-- .simplefavorites-modal-content-body --\x3e
\x3c!-- .simplefavorites-modal-content --\x3e",o("body").prepend(t))},e.closeModal=function(){o("["+Favorites.selectors.modals+"]").removeClass("active"),o(document).trigger("favorites-modal-closed")},e.bindEvents()},(Favorites=Favorites||{}).RequireConsent=function(){var s=this,o=jQuery;return s.consentData,s.postData,s.activeButton,s.bindEvents=function(){o(document).on("favorites-require-consent",function(t,e,o,a){s.consentData=e,s.postData=o,s.activeButton=a,s.openModal()}),o(document).on("favorites-user-consent-approved",function(t,e){void 0!==e?(o(s.activeButton).attr("data-user-consent-accepted","true"),o(s.activeButton).click(),s.closeModal()):s.setConsent(!0)}),o(document).on("favorites-user-consent-denied",function(){s.setConsent(!1)}),o(document).on("click",".simplefavorites-modal-backdrop",function(t){s.closeModal()}),o(document).on("click","[data-favorites-consent-deny]",function(t){t.preventDefault(),s.closeModal(),o(document).trigger("favorites-user-consent-denied")}),o(document).on("click","[data-favorites-consent-accept]",function(t){t.preventDefault(),o(document).trigger("favorites-user-consent-approved",[o(this)])})},s.openModal=function(){s.buildModal(),setTimeout(function(){o("["+Favorites.selectors.consentModal+"]").addClass("active")},10)},s.buildModal=function(){var t;0")+('
')+s.consentData.message+"
")+'\x3c!-- .simplefavorites-modal-footer --\x3e
\x3c!-- .simplefavorites-modal-content-body --\x3e
\x3c!-- .simplefavorites-modal-content --\x3e",o("body").prepend(t))},s.closeModal=function(){o("["+Favorites.selectors.consentModal+"]").removeClass("active")},s.setConsent=function(t){o.ajax({url:Favorites.jsData.ajaxurl,type:"post",dataType:"json",data:{action:Favorites.formActions.cookieConsent,consent:t}})},s.bindEvents()},jQuery(document).ready(function(){new Favorites.Factory}),(Favorites=Favorites||{}).selectors={button:".simplefavorite-button",list:".favorites-list",clear_button:".simplefavorites-clear",total_favorites:".simplefavorites-user-count",modals:"data-favorites-modal",consentModal:"data-favorites-consent-modal",close_modals:"data-favorites-modal-close",count:".simplefavorite-button-count",post_favorite_count:"data-favorites-post-count-id"},Favorites.cssClasses={loading:"loading",active:"active"},Favorites.jsData={ajaxurl:favorites_data.ajaxurl,favorite:favorites_data.favorite,favorited:favorites_data.favorited,include_count:favorites_data.includecount,indicate_loading:favorites_data.indicate_loading,loading_text:favorites_data.loading_text,loading_image_active:favorites_data.loading_image_active,loading_image:favorites_data.loading_image,cache_enabled:favorites_data.cache_enabled,authentication_modal_content:favorites_data.authentication_modal_content,authentication_redirect:favorites_data.authentication_redirect,authentication_redirect_url:favorites_data.authentication_redirect_url,button_options:favorites_data.button_options,dev_mode:favorites_data.dev_mode,logged_in:favorites_data.logged_in,user_id:favorites_data.user_id},Favorites.userFavorites=null,Favorites.authenticated=!0,Favorites.formActions={favoritesarray:"favorites_array",favorite:"favorites_favorite",clearall:"favorites_clear",favoritelist:"favorites_list",cookieConsent:"favorites_cookie_consent"},Favorites.Factory=function(){jQuery;return this.build=function(){new Favorites.UserFavorites,new Favorites.Lists,new Favorites.Clear,new Favorites.Button,new Favorites.ButtonUpdater,new Favorites.TotalCount,new Favorites.PostFavoriteCount,new Favorites.RequireAuthentication,new Favorites.RequireConsent},this.build()}; } catch(e){console.error("An error has occurred: "+e.stack);} try{ var cnArgs = {"ajaxUrl":"https:\/\/mi.onair.cc\/wp-admin\/admin-ajax.php","nonce":"0958848b23","hideEffect":"fade","position":"bottom","onScroll":false,"onScrollOffset":100,"onClick":false,"cookieName":"cookie_notice_accepted","cookieTime":2592000,"cookieTimeRejected":2592000,"globalCookie":false,"redirection":false,"cache":true,"revokeCookies":false,"revokeCookiesOpt":"automatic"}; } catch(e){console.error("An error has occurred: "+e.stack);} /* https://mi.onair.cc/wp-content/plugins/cookie-notice/js/front.min.js */ try{ !function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(){var e=function(e){return RegExp("(^| )"+e+"( |$)")},t=function(e,t,n){for(var i=0;i0?" "+e:e)},this)},remove:function(){t(arguments,function(t){this.element.className=this.element.className.replace(e(t),"")},this)},toggle:function(e){return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)},contains:function(t){return e(t).test(this.element.className)},replace:function(e,t){this.remove(e),this.add(t)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new n(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=n.prototype.replace)}(),function(e,t,n){var i=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(n){var i=this,o="",s="",c=new Date,a=new Date;cnArgs.onScroll&&e.removeEventListener("scroll",this.handleScroll),"accept"===n?(n="true",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTime))):(n="false",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),cnArgs.globalCookie&&(o=this.getDomain(t.location.hostname)),"localhost"===t.location.hostname&&(s=t.location.pathname.split("/")[1]);var r="";"https:"===t.location.protocol&&(r=";secure"),t.cookie=cnArgs.cookieName+"="+n+";expires="+a.toUTCString()+";path=/"+s+";domain="+o+r,this.cookiesAccepted="true"===n;var d=new CustomEvent("setCookieNotice",{detail:{value:n,time:c,expires:a,data:cnArgs}});if(t.dispatchEvent(d),this.setBodyClass(["cookies-set","true"===n?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function e(){i.noticeContainer.removeEventListener("animationend",e),i.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){i.noticeContainer.removeEventListener("webkitAnimationEnd",e),i.showRevokeNotice()})),cnArgs.redirection&&("true"===n&&null===this.cookiesAccepted||n!==this.cookiesAccepted&&null!==this.cookiesAccepted)){var l=e.location.protocol+"//",h=e.location.host+"/"+e.location.pathname;cnArgs.cache?(l=l+h.replace("//","/")+(""===e.location.search?"?":e.location.search+"&")+"cn-reloaded=1"+e.location.hash,e.location.href=l):(l=l+h.replace("//","/")+e.location.search+e.location.hash,e.location.reload(!0));return}},this.getDomain=function(e){RegExp(/https?:\/\//).test(e)||(e="https://"+e);var t=new URL(e).hostname.split(".");return t.slice(0).slice(-(4===t.length?3:2)).join(".")},this.getStatus=function(e){var n=("; "+t.cookie).split("; cookie_notice_accepted=");if(2!==n.length)return null;var i=n.pop().split(";").shift();return e?"true"===i:i},this.showCookieNotice=function(){var e=this,n=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-notice-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var e=this,n=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var e=this,n=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-revoke-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var e=this,n=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(e){t.body.classList.remove("cookies-revoke"),t.body.classList.remove("cookies-accepted"),t.body.classList.remove("cookies-refused"),t.body.classList.remove("cookies-set"),t.body.classList.remove("cookies-not-set");for(var n=0;nparseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(e,n){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1});e&&e!==t;e=e.parentNode)if(e.matches(n))return e;return null},this.inIframe=function(){try{return e.self!==e.top}catch(t){return!0}},this.init=function(){var n=this;if(!0!==this.inIframe()&&(this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=t.getElementById("cookie-notice"),this.noticeContainer)){var i=t.getElementsByClassName("cn-set-cookie"),o=t.getElementsByClassName("cn-revoke-cookie"),s=t.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?(cnArgs.onScroll&&e.addEventListener("scroll",function(e){n.handleScroll()}),cnArgs.onClick&&e.addEventListener("click",function(e){null===n.getClosest(e.target,"#cookie-notice")&&n.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var c=0;c0&&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);}