var wpAjaxUrl='https://ccdmag.com/wp-admin/admin-ajax.php';var flBuilderUrl='https://ccdmag.com/wp-content/plugins/bb-plugin/';var FLBuilderLayoutConfig={anchorLinkAnimations:{duration:1000,easing:'swing',offset:100},paths:{pluginUrl:'https://ccdmag.com/wp-content/plugins/bb-plugin/',wpAjaxUrl:'https://ccdmag.com/wp-admin/admin-ajax.php'},breakpoints:{small:768,medium:992,large:1200},waypoint:{offset:80},emptyColWidth:'0%'};(function($){if(typeof FLBuilderLayout!='undefined'){return;}
FLBuilderLayout={init:function(){FLBuilderLayout._destroy();FLBuilderLayout._initClasses();FLBuilderLayout._initBackgrounds();FLBuilderLayout._initButtons();FLBuilderLayout._initRowShapeLayerHeight();if(0===$('.fl-builder-edit').length){FLBuilderLayout._initAnchorLinks();FLBuilderLayout._initHash();FLBuilderLayout._initForms();FLBuilderLayout._reorderMenu();}else{FLBuilderLayout._initNestedColsWidth();}
$('body').removeClass('fl-no-js');},refreshGalleries:function(element){var $element='undefined'==typeof element?$('body'):$(element),mfContent=$element.find('.fl-mosaicflow-content'),wmContent=$element.find('.fl-gallery'),mfObject=null;if(mfContent){mfObject=mfContent.data('mosaicflow');if(mfObject){mfObject.columns=$([]);mfObject.columnsHeights=[];mfContent.data('mosaicflow',mfObject);mfContent.mosaicflow('refill');}}
if(wmContent){wmContent.trigger('refreshWookmark');}},refreshGridLayout:function(element){var $element='undefined'==typeof element?$('body'):$(element),msnryContent=$element.find('.masonry');if(msnryContent.length){msnryContent.masonry('layout');}},reloadSlider:function(content){var $content='undefined'==typeof content?$('body'):$(content);if($content.find('.bx-viewport > div').length>0){$.each($content.find('.bx-viewport > div'),function(key,slider){setTimeout(function(){$(slider).data('bxSlider').reloadSlider();},100);});}},resizeAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio'),player=null,mejsPlayer=null,rail=null,railWidth=400;if(audioPlayers.length&&typeof mejs!=='undefined'){audioPlayers.each(function(){player=$(this);mejsPlayer=mejs.players[player.attr('id')];rail=player.find('.mejs-controls .mejs-time-rail');var innerMejs=player.find('.mejs-inner'),total=player.find('.mejs-controls .mejs-time-total');if(typeof mejsPlayer!=='undefined'){railWidth=Math.ceil(player.width()*0.8);if(innerMejs.length){rail.css('width',railWidth+'px!important');mejsPlayer.options.autosizeProgress=true;setTimeout(function(){mejsPlayer.setControlsSize();},50);player.find('.mejs-inner').css({visibility:'visible',height:'inherit'});}}});}},preloadAudio:function(element){var $element='undefined'==typeof element?$('body'):$(element),contentWrap=$element.closest('.fl-accordion-item'),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio');if(!contentWrap.hasClass('fl-accordion-item-active')&&audioPlayers.find('.mejs-inner').length){audioPlayers.find('.mejs-inner').css({visibility:'hidden',height:0});}},resizeSlideshow:function(){if(typeof YUI!=='undefined'){YUI().use('node-event-simulate',function(Y){Y.one(window).simulate("resize");});}},reloadGoogleMap:function(element){var $element='undefined'==typeof element?$('body'):$(element),googleMap=$element.find('iframe[src*="google.com/maps"]');if(googleMap.length){googleMap.attr('src',function(i,val){return val;});}},_destroy:function(){var win=$(window);win.off('scroll.fl-bg-parallax');win.off('resize.fl-bg-video');},_isTouch:function(){if(('ontouchstart'in window)||(window.DocumentTouch&&document instanceof DocumentTouch)){return true;}
return false;},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent);},_initClasses:function(){var body=$('body'),ua=navigator.userAgent;if(!body.hasClass('fl-builder-blocks-only')&&!body.hasClass('archive')&&$('.fl-builder-content-primary').length>0){body.addClass('fl-builder');}
if(FLBuilderLayout._isTouch()){body.addClass('fl-builder-touch');}
if(FLBuilderLayout._isMobile()){body.addClass('fl-builder-mobile');}
if($(window).width()<FLBuilderLayoutConfig.breakpoints.small){body.addClass('fl-builder-breakpoint-small');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.small&&$(window).width()<FLBuilderLayoutConfig.breakpoints.medium){body.addClass('fl-builder-breakpoint-medium');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.medium&&$(window).width()<FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-large');}
if($(window).width()>FLBuilderLayoutConfig.breakpoints.large){body.addClass('fl-builder-breakpoint-default');}
if(ua.indexOf('Trident/7.0')>-1&&ua.indexOf('rv:11.0')>-1){body.addClass('fl-builder-ie-11');}},_initBackgrounds:function(){var win=$(window);if($('.fl-row-bg-parallax').length>0&&!FLBuilderLayout._isMobile()){FLBuilderLayout._scrollParallaxBackgrounds();FLBuilderLayout._initParallaxBackgrounds();win.on('resize.fl-bg-parallax',FLBuilderLayout._initParallaxBackgrounds);win.on('scroll.fl-bg-parallax',FLBuilderLayout._scrollParallaxBackgrounds);}
if($('.fl-bg-video').length>0){FLBuilderLayout._initBgVideos();FLBuilderLayout._resizeBgVideos();var resizeBGTimer=null;win.on('resize.fl-bg-video',function(e){clearTimeout(resizeBGTimer);resizeBGTimer=setTimeout(function(){FLBuilderLayout._resizeBgVideos(e);},100);});}},_initButtons:function(){$('a.fl-button[role="button"]').on('keydown',function(event){if(event.key==='Enter'||event.key===' '){event.preventDefault();$(this).trigger('click');}});},_initParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._initParallaxBackground);},_initParallaxBackground:function(){var row=$(this),content=row.find('> .fl-row-content-wrap'),winWidth=$(window).width(),screenSize='',imageSrc={default:'',medium:'',responsive:'',};imageSrc.default=row.data('parallax-image')||'';imageSrc.medium=row.data('parallax-image-medium')||imageSrc.default;imageSrc.responsive=row.data('parallax-image-responsive')||imageSrc.medium;if(winWidth>FLBuilderLayoutConfig.breakpoints.medium){screenSize='default';}else if(winWidth>FLBuilderLayoutConfig.breakpoints.small&&winWidth<=FLBuilderLayoutConfig.breakpoints.medium){screenSize='medium';}else if(winWidth<=FLBuilderLayoutConfig.breakpoints.small){screenSize='responsive';}
content.css('background-image','url('+imageSrc[screenSize]+')');row.data('current-image-loaded',screenSize);},_scrollParallaxBackgrounds:function(){$('.fl-row-bg-parallax').each(FLBuilderLayout._scrollParallaxBackground);},_scrollParallaxBackground:function(){var win=$(window),row=$(this),content=row.find('> .fl-row-content-wrap'),speed=row.data('parallax-speed'),offset=content.offset(),yPos=-((win.scrollTop()-offset.top)/ speed),initialOffset=(row.data('parallax-offset')!=null)?row.data('parallax-offset'):0,totalOffset=yPos-initialOffset;content.css('background-position','center '+totalOffset+'px');},_initBgVideos:function(){$('.fl-bg-video').each(FLBuilderLayout._initBgVideo);},_initBgVideo:function(){var wrap=$(this),width=wrap.data('width'),height=wrap.data('height'),mp4=wrap.data('mp4'),youtube=wrap.data('youtube'),vimeo=wrap.data('vimeo'),mp4Type=wrap.data('mp4-type'),webm=wrap.data('webm'),webmType=wrap.data('webm-type'),fallback=wrap.data('fallback'),loaded=wrap.data('loaded'),videoMobile=wrap.data('video-mobile'),playPauseButton=wrap.find('.fl-bg-video-play-pause-control'),fallbackTag='',videoTag=null,mp4Tag=null,webmTag=null;if(loaded){return;}
videoTag=$('<video autoplay loop muted playsinline></video>');if('undefined'!=typeof fallback&&''!=fallback){videoTag.attr('poster','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')
videoTag.css({backgroundImage:'url("'+fallback+'")',backgroundColor:'transparent',backgroundRepeat:'no-repeat',backgroundSize:'cover',backgroundPosition:'center center',})}
if('undefined'!=typeof mp4&&''!=mp4){mp4Tag=$('<source />');mp4Tag.attr('src',mp4);mp4Tag.attr('type',mp4Type);videoTag.append(mp4Tag);}
if('undefined'!=typeof webm&&''!=webm){webmTag=$('<source />');webmTag.attr('src',webm);webmTag.attr('type',webmType);videoTag.append(webmTag);}
if(!FLBuilderLayout._isMobile()||(FLBuilderLayout._isMobile()&&"yes"==videoMobile)){if('undefined'!=typeof youtube){FLBuilderLayout._initYoutubeBgVideo.apply(this);}
else if('undefined'!=typeof vimeo){FLBuilderLayout._initVimeoBgVideo.apply(this);}else{wrap.append(videoTag);if(playPauseButton.length>0){var video=videoTag[0];playPauseButton.on('click',{video:video},function(e){var video=e.data.video;if(video.paused){video.play();}else{video.pause();}});$(video).on('play playing',function(){playPauseButton.removeClass('fa-play').addClass('fa-pause');});$(video).on('pause ended waiting',function(){playPauseButton.removeClass('fa-pause').addClass('fa-play');});}}}else{videoTag.attr('src','')
wrap.append(videoTag);}
wrap.data('loaded',true);},_initYoutubeBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),startTime='undefined'!==typeof playerWrap.data('start')?playerWrap.data('start'):0,startTime='undefined'!==typeof playerWrap.data('t')&&startTime===0?playerWrap.data('t'):startTime,endTime='undefined'!==typeof playerWrap.data('end')?playerWrap.data('end'):0,loop='undefined'!==typeof playerWrap.data('loop')?playerWrap.data('loop'):1,stateCount=0,player,fallback_showing;if(videoId){fallback=playerWrap.data('fallback')||false
if(fallback){playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');fallbackTag.css('background-size','cover');fallbackTag.css('transition','background-image 1s')
playerWrap.append(fallbackTag);fallback_showing=true;}
FLBuilderLayout._onYoutubeApiReady(function(YT){setTimeout(function(){player=new YT.Player(videoPlayer[0],{videoId:videoId,events:{onReady:function(event){if("no"===enableAudio||FLBuilderLayout._isMobile()){event.target.mute();}
else if("yes"===enableAudio&&event.target.isMuted){event.target.unMute();}
playerWrap.data('YTPlayer',player);FLBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);event.target.playVideo();if(audioButton.length>0&&!FLBuilderLayout._isMobile()){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}
if(playPauseButton.length>0){playPauseButton.on('click',{player:player},function(e){var player=e.data.player;if(1===player.getPlayerState()){player.pauseVideo();}else{player.playVideo();}});}},onStateChange:function(event){if(event.data===1){if(fallback_showing){$('.fl-bg-video-fallback').css('background-image','url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)')}}
if(stateCount<4){stateCount++;}
if(stateCount>1&&-1===event.data&&"yes"===enableAudio){player.mute();player.playVideo();audioButton.show();}
if(event.data===YT.PlayerState.ENDED&&1===loop){if(startTime>0){player.seekTo(startTime);}else{player.playVideo();}}
if(event.data===YT.PlayerState.PLAYING){playPauseButton.removeClass('fa-play').addClass('fa-pause');}else if(event.data===YT.PlayerState.PAUSED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}else if(event.data===YT.PlayerState.BUFFERING){playPauseButton.removeClass('fa-play').addClass('fa-pause');}else if(event.data===YT.PlayerState.CUED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}else if(event.data===YT.PlayerState.ENDED){playPauseButton.removeClass('fa-pause').addClass('fa-play');}},onError:function(event){console.info('YT Error: '+event.data)
FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)}},playerVars:{playsinline:FLBuilderLayout._isMobile()?1:0,controls:0,showinfo:0,rel:0,start:startTime,end:endTime,}});},1);});}},_onErrorYoutubeVimeo:function(playerWrap){fallback=playerWrap.data('fallback')||false
if(!fallback){return false;}
playerWrap.find('iframe').remove()
fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+playerWrap.data('fallback')+')');playerWrap.append(fallbackTag);},_onYoutubeApiReady:function(callback){if(window.YT&&YT.loaded){callback(YT);}else{setTimeout(function(){FLBuilderLayout._onYoutubeApiReady(callback);},350);}},_initVimeoBgVideo:function(){var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoHash=playerWrap.data('video-hash'),videoPlayer=playerWrap.find('.fl-bg-video-player'),enableAudio=playerWrap.data('enable-audio'),audioButton=playerWrap.find('.fl-bg-video-audio'),playPauseButton=playerWrap.find('.fl-bg-video-play-pause-control'),playerState='',player,width=playerWrap.outerWidth(),ua=navigator.userAgent;if(typeof Vimeo!=='undefined'&&videoId){const vimOptions={loop:true,title:false,portrait:false,background:true,autopause:false,muted:true,};if(videoHash.length){vimOptions.url=`https://player.vimeo.com/video/${ videoId }?h=${ videoHash }`;}else{vimOptions.id=videoId;}
player=new Vimeo.Player(videoPlayer[0],vimOptions);playerWrap.data('VMPlayer',player);if("no"===enableAudio){player.setVolume(0);}
else if("yes"===enableAudio){if(ua.indexOf("Safari")>-1||ua.indexOf("Chrome")>-1||ua.indexOf("Firefox")>-1){player.setVolume(0);audioButton.show();}else{player.setVolume(1);}}
player.play().catch(function(error){FLBuilderLayout._onErrorYoutubeVimeo(playerWrap)});if(audioButton.length>0){audioButton.on('click',{button:audioButton,player:player},FLBuilderLayout._toggleBgVideoAudio);}
player.on('play',function(){playerState='play';playPauseButton.removeClass('fa-play').addClass('fa-pause');});player.on('pause',function(){playerState='pause';playPauseButton.removeClass('fa-pause').addClass('fa-play');});player.on('ended',function(){playerState='ended';playPauseButton.removeClass('fa-pause').addClass('fa-play');});player.on('bufferstart',function(){playerState='bufferstart';playPauseButton.removeClass('fa-play').addClass('fa-pause');});if(playPauseButton.length>0){playPauseButton.on('click',{player:player},function(e){var player=e.data.player;if(playerState==='play'){player.pause();}else{player.play();}});}}},_toggleBgVideoAudio:function(e){var player=e.data.player,control=e.data.button.find('.fl-audio-control');if(control.hasClass('fa-volume-off')){control.removeClass('fa-volume-off').addClass('fa-volume-up');e.data.button.find('.fa-times').hide();if('function'===typeof player.unMute){player.unMute();}else{player.setVolume(1);}}else{control.removeClass('fa-volume-up').addClass('fa-volume-off');e.data.button.find('.fa-times').show();if('function'===typeof player.unMute){player.mute();}else{player.setVolume(0);}}},_videoBgSourceError:function(e){var source=$(e.target),wrap=source.closest('.fl-bg-video'),vid=wrap.find('video'),fallback=wrap.data('fallback'),fallbackTag='';source.remove();if(vid.find('source').length){return;}else if(''!==fallback){fallbackTag=$('<div></div>');fallbackTag.addClass('fl-bg-video-fallback');fallbackTag.css('background-image','url('+fallback+')');wrap.append(fallbackTag);vid.remove();}},_resizeBgVideos:function(){$('.fl-bg-video').each(function(){FLBuilderLayout._resizeBgVideo.apply(this);if($(this).parent().find('img').length>0){$(this).parent().imagesLoaded($.proxy(FLBuilderLayout._resizeBgVideo,this));}});},_resizeBgVideo:function(){if(0===$(this).find('video').length&&0===$(this).find('iframe').length){return;}
var wrap=$(this),wrapHeight=wrap.outerHeight(),wrapWidth=wrap.outerWidth(),vid=wrap.find('video'),vidHeight=wrap.data('height'),vidWidth=wrap.data('width'),newWidth=wrapWidth,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newLeft=0,newTop=0,iframe=wrap.find('iframe'),isRowFullHeight=$(this).closest('.fl-row-bg-video').hasClass('fl-row-full-height'),vidCSS={top:'50%',left:'50%',transform:'translate(-50%,-50%)',};if(vid.length){if(vidHeight===''||typeof vidHeight==='undefined'||vidWidth===''||typeof vidWidth==='undefined'){vid.css({'left':'0px','top':'0px','width':newWidth+'px'});vid.on('loadedmetadata',FLBuilderLayout._resizeOnLoadedMeta);return;}
if(!isRowFullHeight){if(newHeight<wrapHeight){newHeight=wrapHeight;newLeft=-((newWidth-wrapWidth)/ 2);newWidth=vidHeight?Math.round(vidWidth*wrapHeight/vidHeight):newWidth;}else{newTop=-((newHeight-wrapHeight)/2);}
vidCSS={left:newLeft+'px',top:newTop+'px',height:newHeight+'px',width:newWidth+'px',}}
vid.css(vidCSS);}
else if(iframe.length){if(typeof wrap.data('youtube')!=='undefined'){FLBuilderLayout._resizeYoutubeBgVideo.apply(this);}}},_resizeOnLoadedMeta:function(){var video=$(this),wrapHeight=video.parent().outerHeight(),wrapWidth=video.parent().outerWidth(),vidWidth=video[0].videoWidth,vidHeight=video[0].videoHeight,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newWidth=wrapWidth,newLeft=0,newTop=0;if(newHeight<wrapHeight){newHeight=wrapHeight;newWidth=Math.round(vidWidth*wrapHeight/vidHeight);newLeft=-((newWidth-wrapWidth)/2);}else{newTop=-((newHeight-wrapHeight)/2);}
video.parent().data('width',vidWidth);video.parent().data('height',vidHeight);video.css({'left':newLeft+'px','top':newTop+'px','width':newWidth+'px','height':newHeight+'px'});},_resizeYoutubeBgVideo:function(){var wrap=$(this),wrapWidth=wrap.outerWidth(),wrapHeight=wrap.outerHeight(),player=wrap.data('YTPlayer'),video=player?player.getIframe():null,aspectRatioSetting='16:9',aspectRatioArray=aspectRatioSetting.split(':'),aspectRatio=aspectRatioArray[0]/ aspectRatioArray[1],ratioWidth=wrapWidth / aspectRatio,ratioHeight=wrapHeight*aspectRatio,isWidthFixed=wrapWidth / wrapHeight>aspectRatio,width=isWidthFixed?wrapWidth:ratioHeight,height=isWidthFixed?ratioWidth:wrapHeight;if(video){$(video).width(width).height(height);}},_initHash:function(){var hash=window.location.hash.replace('#','').split('/').shift(),element=null,tabs=null,responsiveLabel=null,tabIndex=null,label=null;if(''!==hash){try{element=$('#'+hash);if(element.length>0){if(element.hasClass('fl-accordion-item')){setTimeout(function(){element.find('.fl-accordion-button').trigger('click');},100);}
if(element.hasClass('fl-tabs-panel')){setTimeout(function(){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');label[0].click();FLBuilderLayout._scrollToElement(element);},100);}}}
catch(e){}}},_initAnchorLinks:function(){$('a, [role="link"]').each(FLBuilderLayout._initAnchorLink);},_initAnchorLink:function(){var link=$(this),href=link.data('url')?link.data('url'):link.attr('href'),target=link.data('url')?new URL(href,window.location.href):this,loc=window.location,id=null,element=null,flNode=false;if('undefined'!=typeof href&&href.indexOf('#')>-1&&link.closest('svg').length<1){if(loc.pathname.replace(/^\//,'')==target.pathname.replace(/^\//,'')&&loc.hostname==target.hostname){try{id=href.split('#').pop();if(!id){return;}
element=$('#'+id);if(element.length>0){flNode=element.hasClass('fl-row')||element.hasClass('fl-col')||element.hasClass('fl-module');if(!element.hasClass('fl-no-scroll')&&(link.hasClass('fl-scroll-link')||flNode)){$(link).on('click',FLBuilderLayout._scrollToElementOnLinkClick);}
if(element.hasClass('fl-accordion-item')){$(link).on('click',FLBuilderLayout._scrollToAccordionOnLinkClick);}
if(element.hasClass('fl-tabs-panel')){$(link).on('click',FLBuilderLayout._scrollToTabOnLinkClick);}}}
catch(e){}}}},_scrollToElementOnLinkClick:function(e,callback){var attribute=$(this).data('url')?$(this).data('url'):$(this).attr('href');var element=$('#'+attribute.split('#').pop());FLBuilderLayout._scrollToElement(element,callback);e.preventDefault();},_scrollToElement:function(element,callback){var config=FLBuilderLayoutConfig.anchorLinkAnimations,dest=0,win=$(window),doc=$(document);if(element.length>0){if('fixed'===element.css('position')||'fixed'===element.parent().css('position')){dest=element.position().top;}
else if(element.offset().top>doc.height()-win.height()){dest=doc.height()-win.height();}else{dest=element.offset().top-config.offset;}
$('html, body').stop(true).animate({scrollTop:dest},config.duration,config.easing,function(){if('undefined'!=typeof callback){callback();}
if(undefined!=element.attr('id')&&window.location.hash!=='#'+element.attr('id')){var firefox_version=window.navigator.userAgent.match(/Firefox\/(\d+)\./),firefox_version=firefox_version?parseInt(firefox_version[1],10):null;if(firefox_version!==null&&firefox_version<135){window.location.hash=element.attr('id');}else{if(history.pushState){history.pushState(null,null,'#'+element.attr('id'));}else{window.location.hash=element.attr('id');}}}});}},_scrollToAccordionOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop());if(element.length>0){var callback=function(){if(element){element.find('.fl-accordion-button').trigger('click');element=false;}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}},_scrollToTabOnLinkClick:function(e){var element=$('#'+$(this).attr('href').split('#').pop()),tabs=null,label=null,responsiveLabel=null;if(element.length>0){tabs=element.closest('.fl-tabs');responsiveLabel=element.find('.fl-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.fl-tabs-labels .fl-tabs-label[data-index='+tabIndex+']');if(responsiveLabel.is(':visible')){var callback=function(){if(element){responsiveLabel.trigger($.Event('click',{which:1}));}};FLBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}else{label[0].click();FLBuilderLayout._scrollToElement(element);}
e.preventDefault();}},_initForms:function(){if(!FLBuilderLayout._hasPlaceholderSupport){$('.fl-form-field input').each(FLBuilderLayout._initFormFieldPlaceholderFallback);}
$('.fl-form-field input').on('focus',FLBuilderLayout._clearFormFieldError);},_hasPlaceholderSupport:function(){var input=document.createElement('input');return'undefined'!=input.placeholder;},_initFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if('undefined'!=placeholder&&''===val){field.val(placeholder);field.on('focus',FLBuilderLayout._hideFormFieldPlaceholderFallback);field.on('blur',FLBuilderLayout._showFormFieldPlaceholderFallback);}},_hideFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(val==placeholder){field.val('');}},_showFormFieldPlaceholderFallback:function(){var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(''===val){field.val(placeholder);}},_clearFormFieldError:function(){var field=$(this);field.removeAttr('aria-invalid');field.removeClass('fl-form-error');const message=field.attr('aria-describedby');message?$('#'+message).hide():field.siblings('.fl-form-error-message').hide();},_initRowShapeLayerHeight:function(){FLBuilderLayout._adjustRowShapeLayerHeight();$(window).on('resize',FLBuilderLayout._adjustRowShapeLayerHeight);},_initNestedColsWidth:function(){var nestedCols=$('.fl-col-has-cols');if(nestedCols.length<=0){return;}
$(nestedCols).each(function(index,col){if($(col).width()<=0){$(col).css('width',FLBuilderLayoutConfig.emptyColWidth);}});},_adjustRowShapeLayerHeight:function(){var rowShapeLayers=$('.fl-builder-shape-layer');$(rowShapeLayers).each(function(index){var rowShapeLayer=$(this),shape=$(rowShapeLayer).find('svg'),height=shape.height(),excludeShapes='.fl-builder-shape-circle, .fl-builder-shape-dot-cluster, .fl-builder-shape-topography, .fl-builder-shape-rect';if(!rowShapeLayer.is(excludeShapes)){$(shape).css('height',Math.ceil(height));}});},_string_to_slug:function(str){str=str.replace(/^\s+|\s+$/g,'');if('undefined'==typeof window._fl_string_to_slug_regex){regex=new RegExp('[^a-zA-Z0-9\'":() !.,-_|]','g');}else{regex=new RegExp('[^'+window._fl_string_to_slug_regex+'\'":\(\) !.,-_|\\\p{Letter}]','ug');}
str=str.replace(regex,'').replace(/\s+/g,' ');return str;},_reorderMenu:function(){if($('#wp-admin-bar-fl-builder-frontend-edit-link-default li').length>1){$('#wp-admin-bar-fl-builder-frontend-duplicate-link').appendTo('#wp-admin-bar-fl-builder-frontend-edit-link-default').css('padding-top','5px').css('border-top','2px solid #1D2125').css('margin-top','5px')}}};$(function(){FLBuilderLayout.init();});})(jQuery);(function($){if(typeof FLBuilderLayoutModules!=='undefined'){return;}
FLBuilderLayoutModules={init:function(){if(0===$('.fl-builder-edit').length){FLBuilderLayoutModules._initModuleAnimations();}},_initModuleAnimations:function(){if(typeof jQuery.fn.waypoint!=='undefined'){$('.fl-animation').each(function(){var node=$(this),nodeTop=node.offset().top,winHeight=$(window).height(),bodyHeight=$('body').height(),waypoint=FLBuilderLayoutConfig.waypoint,offset='80%';if(typeof waypoint.offset!==undefined){offset=FLBuilderLayoutConfig.waypoint.offset+'%';}
if(bodyHeight-nodeTop<winHeight*0.2){offset='100%';}
node.waypoint({offset:offset,handler:FLBuilderLayoutModules._doModuleAnimation});});}},_doModuleAnimation:function(){var module='undefined'==typeof this.element?$(this):$(this.element),delay=parseFloat(module.data('animation-delay')),duration=parseFloat(module.data('animation-duration'));if(!isNaN(duration)){module.css('animation-duration',duration+'s');}
if(!isNaN(delay)&&delay>0){setTimeout(function(){module.addClass('fl-animated');},delay*1000);}else{setTimeout(function(){module.addClass('fl-animated');},1);}}};$(function(){FLBuilderLayoutModules.init();});})(jQuery);
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}((function(t){var e=Array.prototype.slice,i=Array.prototype.splice,n={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1,zIndex:"auto"},r=t(window),s=t(document),o=[],c=r.height(),a=function(){for(var e=r.scrollTop(),i=s.height(),n=i-c,a=e>n?n-e:0,p=0,d=o.length;p<d;p++){var l=o[p],h=l.stickyWrapper.offset().top-l.topSpacing-a;if(l.stickyWrapper.css("height",l.stickyElement.outerHeight()),e<=h)null!==l.currentTop&&(l.stickyElement.css({width:"",position:"",top:"","z-index":""}),l.stickyElement.parent().removeClass(l.className),l.stickyElement.trigger("sticky-end",[l]),l.currentTop=null);else{var u,g=i-l.stickyElement.outerHeight()-l.topSpacing-l.bottomSpacing-e-a;if(g<0?g+=l.topSpacing:g=l.topSpacing,l.currentTop!==g)l.getWidthFrom?u=t(l.getWidthFrom).width()||null:l.widthFromWrapper&&(u=l.stickyWrapper.width()),null==u&&(u=l.stickyElement.width()),l.stickyElement.css("width",u).css("position","fixed").css("top",g).css("z-index",l.zIndex),l.stickyElement.parent().addClass(l.className),null===l.currentTop?l.stickyElement.trigger("sticky-start",[l]):l.stickyElement.trigger("sticky-update",[l]),l.currentTop===l.topSpacing&&l.currentTop>g||null===l.currentTop&&g<l.topSpacing?l.stickyElement.trigger("sticky-bottom-reached",[l]):null!==l.currentTop&&g===l.topSpacing&&l.currentTop<g&&l.stickyElement.trigger("sticky-bottom-unreached",[l]),l.currentTop=g;var m=l.stickyWrapper.parent();l.stickyElement.offset().top+l.stickyElement.outerHeight()>=m.offset().top+m.outerHeight()&&l.stickyElement.offset().top<=l.topSpacing?l.stickyElement.css("position","absolute").css("top","").css("bottom",0).css("z-index",""):l.stickyElement.css("position","fixed").css("top",g).css("bottom","").css("z-index",l.zIndex)}}},p=function(){c=r.height();for(var e=0,i=o.length;e<i;e++){var n=o[e],s=null;n.getWidthFrom?n.responsiveWidth&&(s=t(n.getWidthFrom).width()):n.widthFromWrapper&&(s=n.stickyWrapper.width()),null!=s&&n.stickyElement.css("width",s)}},d={init:function(e){return this.each((function(){var i=t.extend({},n,e),r=t(this),s=r.attr("id"),c=s?s+"-"+n.wrapperClassName:n.wrapperClassName,a=t("<div></div>").attr("id",c).addClass(i.wrapperClassName);r.wrapAll((function(){if(0==t(this).parent("#"+c).length)return a}));var p=r.parent();i.center&&p.css({width:r.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"===r.css("float")&&r.css({float:"none"}).parent().css({float:"right"}),i.stickyElement=r,i.stickyWrapper=p,i.currentTop=null,o.push(i),d.setWrapperHeight(this),d.setupChangeListeners(this)}))},setWrapperHeight:function(e){var i=t(e),n=i.parent();n&&n.css("height",i.outerHeight())},setupChangeListeners:function(t){window.MutationObserver?new window.MutationObserver((function(e){(e[0].addedNodes.length||e[0].removedNodes.length)&&d.setWrapperHeight(t)})).observe(t,{subtree:!0,childList:!0}):window.addEventListener?(t.addEventListener("DOMNodeInserted",(function(){d.setWrapperHeight(t)}),!1),t.addEventListener("DOMNodeRemoved",(function(){d.setWrapperHeight(t)}),!1)):window.attachEvent&&(t.attachEvent("onDOMNodeInserted",(function(){d.setWrapperHeight(t)})),t.attachEvent("onDOMNodeRemoved",(function(){d.setWrapperHeight(t)})))},update:a,unstick:function(e){return this.each((function(){for(var e=t(this),n=-1,r=o.length;r-- >0;)o[r].stickyElement.get(0)===this&&(i.call(o,r,1),n=r);-1!==n&&(e.unwrap(),e.css({width:"",position:"",top:"",float:"","z-index":""}))}))}};window.addEventListener?(window.addEventListener("scroll",a,!1),window.addEventListener("resize",p,!1)):window.attachEvent&&(window.attachEvent("onscroll",a),window.attachEvent("onresize",p)),t.fn.sticky=function(i){return d[i]?d[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):d.init.apply(this,arguments)},t.fn.unstick=function(i){return d[i]?d[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):d.unstick.apply(this,arguments)},t((function(){setTimeout(a,0)}))}));
;
(function($, window, document, undefined){
'use strict';
var pluginName='newsTicker',
defaults={
row_height: 20,
row_width: 400,
max_rows: 3,
speed: 400,
duration: 2500,
direction: 'up',
autostart: 1,
pauseOnHover: 1,
nextButton: null,
prevButton: null,
startButton: null,
stopButton: null,
hasMoved: function(){},
movingUp: function(){},
movingLeft: function(){},
movingRight: function(){},
movingDown: function(){},
start: function(){},
stop: function(){},
pause: function(){},
unpause: function(){}};
function Plugin(element, options){
this.element=element;
this.$el=$(element);
this.options=$.extend({}, defaults, options);
this._defaults=defaults;
this._name=pluginName;
this.moveInterval;
this.state=0;
this.paused=0;
this.moving=0;
if(this.$el.is('ul, ol')){
this.init();
}}
Plugin.prototype={
init: function(){
this.$el.height(this.options.row_height * this.options.max_rows)
.css({overflow:'hidden'});
this.checkSpeed();
if(this.options.nextButton&&typeof(this.options.nextButton[0])!=='undefined')
this.options.nextButton.click(function(e){
this.moveNext();
this.resetInterval();
}.bind(this));
if(this.options.prevButton&&typeof(this.options.prevButton[0])!=='undefined')
this.options.prevButton.click(function(e){
this.movePrev();
this.resetInterval();
}.bind(this));
if(this.options.stopButton&&typeof(this.options.stopButton[0])!=='undefined')
this.options.stopButton.click(function(e){
this.stop()
}.bind(this));
if(this.options.startButton&&typeof(this.options.startButton[0])!=='undefined')
this.options.startButton.click(function(e){
this.start()
}.bind(this));
if(this.options.pauseOnHover){
this.$el.hover(function(){
if(this.state)
this.pause();
}.bind(this), function(){
if(this.state)
this.unpause();
}.bind(this));
}
if(this.options.autostart)
this.start();
},
start: function(){
if(!this.state){
this.state=1;
this.resetInterval();
this.options.start();
}},
stop: function(){
if(this.state){
clearInterval(this.moveInterval);
this.state=0;
this.options.stop();
}},
resetInterval: function(){
if(this.state){
clearInterval(this.moveInterval);
this.moveInterval=setInterval(function(){this.move()}.bind(this), this.options.duration);
}},
move: function(){
if(!this.paused) this.moveNext();
},
moveNext: function(){
if(this.options.direction==='down')
this.moveDown();
else if(this.options.direction==='up')
this.moveUp();
else if(this.options.direction==='right')
this.moveRight();
else if(this.options.direction==='left')
this.moveLeft();
},
movePrev: function(){
if(this.options.direction==='down')
this.moveUp();
else if(this.options.direction==='up')
this.moveDown();
else if(this.options.direction==='right')
this.moveLeft();
else if(this.options.direction==='left')
this.moveRight();
},
pause: function(){
if(!this.paused) this.paused=1;
this.options.pause();
},
unpause: function(){
if(this.paused) this.paused=0;
this.options.unpause();
},
moveDown: function(){
if(!this.moving){
this.moving=1;
this.options.movingDown();
this.$el.children('li:last').detach().prependTo(this.$el).css('marginTop', '-' + this.options.row_height + 'px')
.animate({marginTop: '0px'}, this.options.speed, function(){
this.moving=0;
this.options.hasMoved();
}.bind(this));
}},
moveUp: function(){
if(!this.moving){
this.moving=1;
this.options.movingUp();
var element=this.$el.children('li:first');
element.animate({marginTop: '-' + this.options.row_height + 'px'}, this.options.speed,
function(){
element.detach().css('marginTop', '0').appendTo(this.$el);
this.moving=0;
this.options.hasMoved();
}.bind(this));
}},
moveRight: function(){
if(!this.moving){
this.moving=1;
this.options.movingRight();
this.$el.children('li:last').detach().prependTo(this.$el).css('marginLeft', '-' + this.options.row_width + 'px')
.animate({marginLeft: '0px'}, this.options.speed, function(){
this.moving=0;
this.options.hasMoved();
}.bind(this));
}},
moveLeft: function(){
if(!this.moving){
this.moving=1;
this.options.movingLeft();
var element=this.$el.children('li:first');
element.animate({marginLeft: '-' + this.options.row_width + 'px'}, this.options.speed,
function(){
element.detach().css('marginLeft', '0').appendTo(this.$el);
this.moving=0;
this.options.hasMoved();
}.bind(this));
}},
updateOption: function(option, value){
if(typeof(this.options[option])!=='undefined'){
this.options[option]=value;
if(option=='duration'||option=='speed'){
this.checkSpeed();
this.resetInterval();
}}
},
add: function(content){
this.$el.append($('<li>').html(content));
},
getState: function(){
if(paused) return 2 
else return this.state;
},
checkSpeed: function(){
if(this.options.duration < (this.options.speed + 25))
this.options.speed=this.options.duration - 25;
},
destroy: function(){
this._destroy();
}};
$.fn[pluginName]=function(option){
var args=arguments;
return this.each(function(){
var $this=$(this),
data=$.data(this, 'plugin_' + pluginName),
options=typeof option==='object'&&option;
if(!data){
$this.data('plugin_' + pluginName, (data=new Plugin(this, options)));
}
if(typeof option==='string'){
data[option].apply(data, Array.prototype.slice.call(args, 1));
}});
};})(jQuery, window, document);
!(function (t, e){
'use strict';
'object'==typeof module &&
'object'==typeof module.exports &&
(module.exports=t.document
? void 0
: function (t){
if(!t.document)
throw new Error('jQuery requires a window with a document');
});
})('undefined'!=typeof window ? window:this),
(function (t){
'use strict';
(t.breakingNews=function (e, i){
var s={
effect: 'scroll',
direction: 'ltr',
height: 20,
fontSize: 'default',
themeColor: 'default',
background: 'default',
borderWidth: 1,
radius: 2,
source: 'html',
rss2jsonApiKey: '',
play: !0,
delayTimer: 4e3,
scrollSpeed: 2,
stopOnHover: !0,
position: 'auto',
zIndex: 99999,
},
n=this;
n.settings={};
var r=t(e),
o=((e=e), r.children('.bn-label')),
a=r.children('.bn-news'),
l=a.children('ul'),
c=l.children('li'),
d=r.children('.bn-controls'),
f=d.find('.bn-prev').parent(),
h=d.find('.bn-action').parent(),
u=d.find('.bn-next').parent(),
g = !1,
p = !0,
m=l.children('li').length,
b=0,
y = !1,
w=function (){
if((0 < o.length &&
('rtl'==n.settings.direction
? a.css({
right: o.outerWidth(),
})
: a.css({
left: o.outerWidth(),
})),
0 < d.length)
){
var e=d.outerWidth();
'rtl'==n.settings.direction
? a.css({
left: e,
})
: a.css({
right: e,
});
}
if('scroll'===n.settings.effect){
var i=0;
c.each(function (){
i +=t(this).outerWidth();
}),
(i +=10),
l.css({
width: i,
});
}},
k=function (){
var t=parseFloat(l.css('marginLeft'));
(t -=n.settings.scrollSpeed / 2),
l.css({
marginLeft: t,
}),
t <=-l.find('li:first-child').outerWidth() &&
(l.find('li:first-child').insertAfter(l.find('li:last-child')),
l.css({
marginLeft: 0,
})),
!1===g &&
((window.requestAnimationFrame&&requestAnimationFrame(k)) ||
setTimeout(k, 16));
},
v=function (){
var t=parseFloat(l.css('marginRight'));
(t -=n.settings.scrollSpeed / 2),
l.css({
marginRight: t,
}),
t <=-l.find('li:first-child').outerWidth() &&
(l.find('li:first-child').insertAfter(l.find('li:last-child')),
l.css({
marginRight: 0,
})),
!1===g &&
((window.requestAnimationFrame&&requestAnimationFrame(v)) ||
setTimeout(v, 16));
},
q=function (){
switch (((p = !0), n.settings.effect)){
case 'typography':
l.find('li').hide(),
l.find('li').eq(b).width(30).show(),
l.find('li').eq(b).animate({
width: '100%',
opacity: 1,
},
1500,
);
break;
case 'fade':
l.find('li').hide(), l.find('li').eq(b).fadeIn();
break;
case 'slide-down':
m <=1
? l.find('li').animate({
top: 30,
opacity: 0,
},
300,
function (){
t(this).css({
top: -30,
opacity: 0,
display: 'block',
}),
t(this).animate({
top: 0,
opacity: 1,
},
300,
);
},
)
: (l.find('li:visible').animate({
top: 30,
opacity: 0,
},
300,
function (){
t(this).hide();
},
),
l
.find('li')
.eq(b)
.css({
top: -30,
opacity: 0,
})
.show(),
l.find('li').eq(b).animate({
top: 0,
opacity: 1,
},
300,
));
break;
case 'slide-up':
m <=1
? l.find('li').animate({
top: -30,
opacity: 0,
},
300,
function (){
t(this).css({
top: 30,
opacity: 0,
display: 'block',
}),
t(this).animate({
top: 0,
opacity: 1,
},
300,
);
},
)
: (l.find('li:visible').animate({
top: -30,
opacity: 0,
},
300,
function (){
t(this).hide();
},
),
l
.find('li')
.eq(b)
.css({
top: 30,
opacity: 0,
})
.show(),
l.find('li').eq(b).animate({
top: 0,
opacity: 1,
},
300,
));
break;
case 'slide-left':
m <=1
? l.find('li').animate({
left: '50%',
opacity: 0,
},
300,
function (){
t(this).css({
left: -50,
opacity: 0,
display: 'block',
}),
t(this).animate({
left: 0,
opacity: 1,
},
300,
);
},
)
: (l.find('li:visible').animate({
left: '50%',
opacity: 0,
},
300,
function (){
t(this).hide();
},
),
l
.find('li')
.eq(b)
.css({
left: -50,
opacity: 0,
})
.show(),
l.find('li').eq(b).animate({
left: 0,
opacity: 1,
},
300,
));
break;
case 'slide-right':
m <=1
? l.find('li').animate({
left: '-50%',
opacity: 0,
},
300,
function (){
t(this).css({
left: '50%',
opacity: 0,
display: 'block',
}),
t(this).animate({
left: 0,
opacity: 1,
},
300,
);
},
)
: (l.find('li:visible').animate({
left: '-50%',
opacity: 0,
},
300,
function (){
t(this).hide();
},
),
l
.find('li')
.eq(b)
.css({
left: '50%',
opacity: 0,
})
.show(),
l.find('li').eq(b).animate({
left: 0,
opacity: 1,
},
300,
));
break;
default:
l.find('li').hide(), l.find('li').eq(b).show();
}},
x=function (){
if(((g = !1), n.settings.play))
switch (n.settings.effect){
case 'scroll':
'rtl'===n.settings.direction
? l.width() > a.width()&&v()
: l.width() > a.width()&&k();
break;
default:
n.pause(),
(y=setInterval(function (){
n.next();
}, n.settings.delayTimer));
}};
(n.init=function (){
if(((n.settings=t.extend({}, s, i)),
'fixed-top'===n.settings.position
? r.addClass('bn-fixed-top').css({
'z-index': n.settings.zIndex,
})
: 'fixed-bottom'===n.settings.position &&
r.addClass('bn-fixed-bottom').css({
'z-index': n.settings.zIndex,
}),
'default'!=n.settings.fontSize &&
r.css({
'font-size': n.settings.fontSize,
}),
'default'!=n.settings.themeColor &&
(r.css({
'border-color': n.settings.themeColor,
color: n.settings.themeColor,
}),
o.css({
background: n.settings.themeColor,
})),
'default'!=n.settings.background &&
r.css({
background: n.settings.background,
}),
r.css({
height: n.settings.height,
'line-height':
n.settings.height - 2 * n.settings.borderWidth + 'px',
'border-radius': n.settings.radius,
'border-width': n.settings.borderWidth,
}),
c.find('.bn-seperator').css({
height: n.settings.height - 2 * n.settings.borderWidth,
}),
r.addClass('bn-effect-' +
n.settings.effect +
' bn-direction-' +
n.settings.direction,
),
w(),
'object'==typeof n.settings.source)
)
switch (n.settings.source.type){
case 'rss':
'rss2json'===n.settings.source.usingApi
? (((d=new XMLHttpRequest()).onreadystatechange =
function (){
if(4==d.readyState&&200==d.status){
var t=JSON.parse(d.responseText),
e='',
i='';
switch (n.settings.source.showingField){
case 'title':
i='title';
break;
case 'description':
i='description';
break;
case 'link':
i='link';
break;
default:
i='title';
}
var s='';
void 0!==n.settings.source.seperator &&
void 0!==typeof n.settings.source.seperator &&
(s=n.settings.source.seperator);
for (var r=0; r < t.items.length; r++)
n.settings.source.linkEnabled
? (e +=
'<li><a target="' +
n.settings.source.target +
'" href="' +
t.items[r].link +
'">' +
s +
t.items[r][i] +
'</a></li>')
: (e +=
'<li><a>' + s + t.items[r][i] + '</a></li>');
l.empty().append(e),
(c=l.children('li')),
(m=l.children('li').length),
w(),
'scroll'!=n.settings.effect&&q(),
c.find('.bn-seperator').css({
height:
n.settings.height - 2 * n.settings.borderWidth,
}),
x();
}}),
d.open('GET',
'https://api.rss2json.com/v1/api.json?rss_url=' +
n.settings.source.url +
'&count=' +
n.settings.source.limit +
'&api_key=' +
n.settings.source.rss2jsonApiKey,
!0,
),
d.send())
: ((e=new XMLHttpRequest()).open('GET',
'https://query.yahooapis.com/v1/public/yql?q=' +
encodeURIComponent(
'select * from rss where url="' +
n.settings.source.url +
'" limit ' +
n.settings.source.limit,
) +
'&format=json',
!0,
),
(e.onreadystatechange=function (){
if(4==e.readyState)
if(200==e.status){
var t=JSON.parse(e.responseText),
i='',
s='';
switch (n.settings.source.showingField){
case 'title':
s='title';
break;
case 'description':
s='description';
break;
case 'link':
s='link';
break;
default:
s='title';
}
var r='';
'undefined'!=n.settings.source.seperator &&
void 0!==n.settings.source.seperator &&
(r=n.settings.source.seperator);
for (var o=0; o < t.query.results.item.length; o++)
n.settings.source.linkEnabled
? (i +=
'<li><a target="' +
n.settings.source.target +
'" href="' +
t.query.results.item[o].link +
'">' +
r +
t.query.results.item[o][s] +
'</a></li>')
: (i +=
'<li><a>' +
r +
t.query.results.item[o][s] +
'</a></li>');
l.empty().append(i),
(c=l.children('li')),
(m=l.children('li').length),
w(),
'scroll'!=n.settings.effect&&q(),
c.find('.bn-seperator').css({
height:
n.settings.height - 2 * n.settings.borderWidth,
}),
x();
} else
l.empty().append('<li><span class="bn-loader-text">' +
n.settings.source.errorMsg +
'</span></li>',
);
}),
e.send(null));
break;
case 'json':
t.getJSON(n.settings.source.url, function (t){
var e,
i='';
e =
'undefined'===n.settings.source.showingField
? 'title'
: n.settings.source.showingField;
var s='';
void 0!==n.settings.source.seperator &&
void 0!==typeof n.settings.source.seperator &&
(s=n.settings.source.seperator);
for (
var r=0;
r < t.length&&!(r >=n.settings.source.limit);
r++
)
n.settings.source.linkEnabled
? (i +=
'<li><a target="' +
n.settings.source.target +
'" href="' +
t[r].link +
'">' +
s +
t[r][e] +
'</a></li>')
: (i +='<li><a>' + s + t[r][e] + '</a></li>'),
'undefined'===t[r][e] &&
console.log('"' + e + '" does not exist in this json.');
l.empty().append(i),
(c=l.children('li')),
(m=l.children('li').length),
w(),
'scroll'!=n.settings.effect&&q(),
c.find('.bn-seperator').css({
height: n.settings.height - 2 * n.settings.borderWidth,
}),
x();
});
break;
default:
console.log('Please check your "source" object parameter. Incorrect Value',
);
}
else
'html'===n.settings.source
? ('scroll'!=n.settings.effect&&q(), x())
: console.log('Please check your "source" parameter. Incorrect Value',
);
var e, d;
n.settings.play
? h.find('span').removeClass('bn-play').addClass('bn-pause')
: h.find('span').removeClass('bn-pause').addClass('bn-play'),
r.on('mouseleave', function (e){
var i=t(document.elementFromPoint(e.clientX, e.clientY)).parents('.breaking-news-ticker',
)[0];
t(this)[0]!==i &&
(!0===n.settings.stopOnHover
? !0===n.settings.play&&n.play()
: !0===n.settings.play&&!0===g&&n.play());
}),
r.on('mouseenter', function (){
!0===n.settings.stopOnHover&&n.pause();
}),
u.on('click', function (){
p&&((p = !1), n.pause(), n.next());
}),
f.on('click', function (){
p&&((p = !1), n.pause(), n.prev());
}),
h.on('click', function (){
p &&
(h.find('span').hasClass('bn-pause')
? (h.find('span').removeClass('bn-pause').addClass('bn-play'),
n.stop())
: ((n.settings.play = !0),
h.find('span').removeClass('bn-play').addClass('bn-pause')));
}),
t(window).on('resize', function (){
r.width() < 480
? (o.hide(),
'rtl'==n.settings.direction
? a.css({
right: 0,
})
: a.css({
left: 0,
}))
: (o.show(),
'rtl'==n.settings.direction
? a.css({
right: o.outerWidth(),
})
: a.css({
left: o.outerWidth(),
}));
});
}),
(n.pause=function (){
(g = !0), clearInterval(y);
}),
(n.stop=function (){
(g = !0), (n.settings.play = !1);
}),
(n.play=function (){
x();
}),
(n.next=function (){
!(function (){
switch (n.settings.effect){
case 'scroll':
'rtl'===n.settings.direction
? l.stop().animate({
marginRight: -l.find('li:first-child').outerWidth(),
},
300,
function (){
l
.find('li:first-child')
.insertAfter(l.find('li:last-child')),
l.css({
marginRight: 0,
}),
(p = !0);
},
)
: l.stop().animate({
marginLeft: -l.find('li:first-child').outerWidth(),
},
300,
function (){
l
.find('li:first-child')
.insertAfter(l.find('li:last-child')),
l.css({
marginLeft: 0,
}),
(p = !0);
},
);
break;
default:
m <=++b&&(b=0), q();
}})();
}),
(n.prev=function (){
!(function (){
switch (n.settings.effect){
case 'scroll':
'rtl'===n.settings.direction
? (0 <=parseInt(l.css('marginRight'), 10) &&
(l.css({
'margin-right': -l.find('li:last-child').outerWidth(),
}),
l
.find('li:last-child')
.insertBefore(l.find('li:first-child'))),
l.stop().animate({
marginRight: 0,
},
300,
function (){
p = !0;
},
))
: (0 <=parseInt(l.css('marginLeft'), 10) &&
(l.css({
'margin-left': -l.find('li:last-child').outerWidth(),
}),
l
.find('li:last-child')
.insertBefore(l.find('li:first-child'))),
l.stop().animate({
marginLeft: 0,
},
300,
function (){
p = !0;
},
));
break;
default:
--b < 0&&(b=m - 1), q();
}})();
}),
n.init();
}),
(t.fn.breakingNews=function (e){
return this.each(function (){
if(null==t(this).data('breakingNews')){
var i=new t.breakingNews(this, e);
t(this).data('breakingNews', i);
}});
});
})(jQuery);
!function(){var e,a,t,n,s,r;if((e=document.getElementById("cm-primary-nav"))&&void 0!==(a=e.getElementsByClassName("cm-menu-toggle")[0]))if(void 0!==(t=e.getElementsByTagName("ul")[0])){for(t.setAttribute("aria-expanded","false"),-1===t.className.indexOf("nav-menu")&&(t.className+="nav-menu"),a.onclick=function(){-1!==e.className.indexOf("cm-mobile-nav")?(e.className=e.className.replace("cm-mobile-nav","cm-primary-nav"),a.setAttribute("aria-expanded","false"),t.setAttribute("aria-expanded","false")):(e.className=e.className.replace("cm-primary-nav","cm-mobile-nav"),a.setAttribute("aria-expanded","true"),t.setAttribute("aria-expanded","true"))},s=0,r=(n=t.getElementsByTagName("a")).length;s<r;s++)n[s].addEventListener("focus",i,!0),n[s].addEventListener("blur",i,!0);!function(e){var a,t,n=e.querySelectorAll(".menu-item-has-children > a, .page_item_has_children > a");if("ontouchstart"in window&&window.matchMedia("(min-width: 768px)").matches)for(a=function(e){var a,t=this.parentNode;if(t.classList.contains("focus"))t.classList.remove("focus");else{for(e.preventDefault(),a=0;a<t.parentNode.children.length;++a)t!==t.parentNode.children[a]&&t.parentNode.children[a].classList.remove("focus");t.classList.add("focus")}},t=0;t<n.length;++t)n[t].addEventListener("touchstart",a,!1)}(e)}else a.style.display="none";function i(){for(var e=this;-1===e.className.indexOf("nav-menu");)"li"===e.tagName.toLowerCase()&&(-1!==e.className.indexOf("focus")?e.className=e.className.replace(" focus",""):e.className+=" focus"),e=e.parentElement}}(),function(){const e=document.querySelector(".cm-mobile-nav-container");if(!e)return;const a=e.querySelector(".cm-menu-toggle"),t=e.querySelector(".cm-mobile-menu");a.addEventListener("click",(function(e){e.preventDefault();"false"===e.currentTarget.getAttribute("aria-expanded")?(e.currentTarget.setAttribute("aria-expanded","true"),t.classList.add("cm-mobile-menu--open")):(e.currentTarget.setAttribute("aria-expanded","false"),t.classList.remove("cm-mobile-menu--open"))}))}();
!function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("div");a.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',r.appendChild(a.childNodes[1])}return e&&t.extend(i,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));(a=(a=a.not("object object")).not(r)).each((function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var a="fitvid"+t.fn.fitVids._count;e.attr("name",a),t.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*i+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto);
!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){return!0===t.initialized||!(i("body").width()<t.minWidth)&&(function(t,e){t.initialized=!0,0===i("#theia-sticky-sidebar-stylesheet-"+t.namespace).length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>'));e.each((function(){var e={};if(e.sidebar=i(this),e.options=t||{},e.container=i(e.options.containerSelector),0==e.container.length&&(e.container=e.sidebar.parent()),e.sidebar.parents().css("-webkit-transform","none"),e.sidebar.css({position:e.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),e.stickySidebar=e.sidebar.find(".theiaStickySidebar"),0==e.stickySidebar.length){var a=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;e.sidebar.find("script").filter((function(i,t){return 0===t.type.length||t.type.match(a)})).remove(),e.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(e.sidebar.children()),e.sidebar.append(e.stickySidebar)}e.marginBottom=parseInt(e.sidebar.css("margin-bottom")),e.paddingTop=parseInt(e.sidebar.css("padding-top")),e.paddingBottom=parseInt(e.sidebar.css("padding-bottom"));var n=e.stickySidebar.offset().top,s=e.stickySidebar.outerHeight();function d(){e.fixedScrollTop=0,e.sidebar.css({"min-height":"1px"}),e.stickySidebar.css({position:"static",width:"",transform:"none"})}e.stickySidebar.css("padding-top",1),e.stickySidebar.css("padding-bottom",1),n-=e.stickySidebar.offset().top,s=e.stickySidebar.outerHeight()-s-n,0==n?(e.stickySidebar.css("padding-top",0),e.stickySidebarPaddingTop=0):e.stickySidebarPaddingTop=1,0==s?(e.stickySidebar.css("padding-bottom",0),e.stickySidebarPaddingBottom=0):e.stickySidebarPaddingBottom=1,e.previousScrollTop=null,e.fixedScrollTop=0,d(),e.onScroll=function(e){if(e.stickySidebar.is(":visible"))if(i("body").width()<e.options.minWidth)d();else{if(e.options.disableOnResponsiveLayouts)if(e.sidebar.outerWidth("none"==e.sidebar.css("float"))+50>e.container.width())return void d();var a,n,s=i(document).scrollTop(),r="static";if(s>=e.sidebar.offset().top+(e.paddingTop-e.options.additionalMarginTop)){var c,p=e.paddingTop+t.additionalMarginTop,b=e.paddingBottom+e.marginBottom+t.additionalMarginBottom,l=e.sidebar.offset().top,f=e.sidebar.offset().top+(a=e.container,n=a.height(),a.children().each((function(){n=Math.max(n,i(this).height())})),n),h=0+t.additionalMarginTop;c=e.stickySidebar.outerHeight()+p+b<i(window).height()?h+e.stickySidebar.outerHeight():i(window).height()-e.marginBottom-e.paddingBottom-t.additionalMarginBottom;var g=l-s+e.paddingTop,S=f-s-e.paddingBottom-e.marginBottom,u=e.stickySidebar.offset().top-s,m=e.previousScrollTop-s;"fixed"==e.stickySidebar.css("position")&&"modern"==e.options.sidebarBehavior&&(u+=m),"stick-to-top"==e.options.sidebarBehavior&&(u=t.additionalMarginTop),"stick-to-bottom"==e.options.sidebarBehavior&&(u=c-e.stickySidebar.outerHeight()),u=m>0?Math.min(u,h):Math.max(u,c-e.stickySidebar.outerHeight()),u=Math.max(u,g),u=Math.min(u,S-e.stickySidebar.outerHeight());var y=e.container.height()==e.stickySidebar.outerHeight();r=(y||u!=h)&&(y||u!=c-e.stickySidebar.outerHeight())?s+u-e.sidebar.offset().top-e.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==r){var k=i(document).scrollLeft();e.stickySidebar.css({position:"fixed",width:o(e.stickySidebar)+"px",transform:"translateY("+u+"px)",left:e.sidebar.offset().left+parseInt(e.sidebar.css("padding-left"))-k+"px",top:"0px"})}else if("absolute"==r){var v={};"absolute"!=e.stickySidebar.css("position")&&(v.position="absolute",v.transform="translateY("+(s+u-e.sidebar.offset().top-e.stickySidebarPaddingTop-e.stickySidebarPaddingBottom)+"px)",v.top="0px"),v.width=o(e.stickySidebar)+"px",v.left="",e.stickySidebar.css(v)}else"static"==r&&d();"static"!=r&&1==e.options.updateSidebarHeight&&e.sidebar.css({"min-height":e.stickySidebar.outerHeight()+e.stickySidebar.offset().top-e.sidebar.offset().top+e.paddingBottom}),e.previousScrollTop=s}},e.onScroll(e),i(document).on("scroll."+e.options.namespace,function(i){return function(){i.onScroll(i)}}(e)),i(window).on("resize."+e.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(e)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(e.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(e))}))}(t,e),!0)}function o(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return void 0===t&&(t=i.width()),t}return(t=i.extend({containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"},t)).additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,function(t,o){e(t,o)||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,o){return function(a){e(t,o)&&i(this).unbind(a)}}(t,o)),i(window).on("resize."+t.namespace,function(t,o){return function(a){e(t,o)&&i(this).unbind(a)}}(t,o)))}(t,this),this}}(jQuery);
!function(){var e=function(t,i){function s(){var e,t;this.q=[],this.add=function(e){this.q.push(e)},this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function o(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new s,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",o="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+o+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+o+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}(e,"position")]||(e.style.position="relative");var n,r,d=e.resizeSensor.childNodes[0],l=d.childNodes[0],c=e.resizeSensor.childNodes[1],h=(c.childNodes[0],function(){l.style.width=d.offsetWidth+10+"px",l.style.height=d.offsetHeight+10+"px",d.scrollLeft=d.scrollWidth,d.scrollTop=d.scrollHeight,c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight,n=e.offsetWidth,r=e.offsetHeight});h();var a=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)},f=function(){e.offsetWidth==n&&e.offsetHeight==r||e.resizedAttached&&e.resizedAttached.call(),h()};a(d,"scroll",f),a(c,"scroll",f)}var n=Object.prototype.toString.call(t),r="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(r)for(var d=0,l=t.length;d<l;d++)o(t[d],i);else o(t,i);this.detach=function(){if(r)for(var i=0,s=t.length;i<s;i++)e.detach(t[i]);else e.detach(t)}};e.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&void 0!==module.exports?module.exports=e:window.ResizeSensor=e}();
/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1);
jQuery(document).ready((function(){var e=function(){jQuery("#cm-masthead .search-form-top").removeClass("show"),jQuery("#cm-content").removeClass("backdrop")};jQuery(".search-top").click((function(){jQuery(this).next("#cm-masthead .search-form-top").toggleClass("show"),jQuery("#cm-content").toggleClass("backdrop"),setTimeout((function(){jQuery("#cm-masthead .search-form-top input").focus()}),200),jQuery(document).on("keyup",(function(t){27===t.keyCode&&jQuery("#cm-masthead .search-form-top").hasClass("show")&&e()})),jQuery(document).on("click.outEvent",(function(t){t.target.closest(".cm-top-search")||(e(),jQuery(document).off("click.outEvent"))}))})),jQuery("#scroll-up").hide(),jQuery(window).scroll((function(){jQuery(this).scrollTop()>1e3?jQuery("#scroll-up").fadeIn():jQuery("#scroll-up").fadeOut()})),jQuery("a#scroll-up").click((function(){return jQuery("body,html").animate({scrollTop:0},800),!1})),jQuery(".cm-menu-primary-container .menu-item-has-children"),jQuery(".cm-submenu-toggle").click((function(){jQuery(this).parent(".menu-item-has-children").children("ul.sub-menu").first().slideToggle("1000")})),jQuery(document).on("click","#cm-primary-nav ul li.menu-item-has-children > a",(function(e){var t=jQuery(this).parent(".menu-item-has-children");!t.hasClass("focus")&&jQuery(window).width()<=768&&(t.addClass("focus"),e.preventDefault(),t.children(".sub-menu").css({display:"block"}))}));let t,i=document.getElementsByClassName("cm-header-builder");if(t=i.length>0?".cm-header-bottom-row":".cm-primary-nav",jQuery(window).on("load",(function(){if(window.matchMedia("(max-width: 768px)").matches&&jQuery("#cm-masthead .sticky-wrapper, .cm-header-bottom-row .sticky-wrapper, #cm-masthead .headroom").length>=1){var e=jQuery(window).height()-88,t=jQuery("#cm-primary-nav").find("ul").first();t.css("max-height",e),t.addClass("menu-scrollbar")}})),jQuery(".wp-block-group__inner-container h2").wrap('<div class="block-title"></div>'),jQuery(".wp-block-heading").wrap('<div class="block-title"></div>'),void 0!==jQuery.fn.magnificPopup&&(jQuery(".image-popup").magnificPopup({type:"image"}),jQuery(".image-popup-blog").magnificPopup({type:"image"}),jQuery(".gallery").find('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"], a[href*=".ico"]').magnificPopup({type:"image",gallery:{enabled:!0}}),jQuery(".colormag-ticker-news-popup-link").magnificPopup({type:"ajax",callbacks:{parseAjax:function(e){var t=jQuery.magnificPopup.instance,i=jQuery(t.currItem.el[0]).data("fragment");e.data=jQuery(e.data).find(i)}}})),void 0!==jQuery.fn.fitVids&&jQuery(".fitvids-video").fitVids(),"undefined"!=typeof colormag_new_news_ticker_settings){let e=colormag_new_news_ticker_settings.ticker_slide_effect,t=colormag_new_news_ticker_settings.ticker_news_duration,i=colormag_new_news_ticker_settings.ticker_news_speed;jQuery("#cm-breaking-news-ticker").breakingNews({effect:e,scrollSpeed:i,delayTimer:t})}if(void 0!==jQuery.fn.newsTicker){if("undefined"!=typeof colormag_ticker_settings){var r=colormag_ticker_settings.breaking_news_slide_effect,a=parseInt(colormag_ticker_settings.breaking_news_duration,10),o=parseInt(colormag_ticker_settings.breaking_news_speed,10);jQuery(".newsticker").newsTicker({row_height:20,max_rows:1,direction:r,speed:o,duration:a,autostart:1,pauseOnHover:1,start:function(){jQuery(".newsticker").css("visibility","visible")}})}var s=jQuery(".cm-breaking-news");jQuery(s).each((function(){!function(e,t,i,r,a,o,s){jQuery(e).newsTicker({row_height:o,max_rows:s,duration:a,direction:r,prevButton:jQuery(t),nextButton:jQuery(i),start:function(){jQuery(".cm-breaking-news-slider-widget").css({visibility:"visible"})}})}(jQuery(this).children(".cm-breaking-news-slider-widget"),jQuery(this).children(".cm-slide-up"),jQuery(this).children(".cm-slide-down"),jQuery(this).children(".cm-breaking-news-slider-widget").data("direction"),jQuery(this).children(".cm-breaking-news-slider-widget").data("duration"),jQuery(this).children(".cm-breaking-news-slider-widget").data("rowheight"),jQuery(this).children(".cm-breaking-news-slider-widget").data("maxrows"))}))}var n,c,l,d,u,m,h,p,g,y,f,v,j;void 0!==jQuery.fn.sticky&&((w=jQuery("#wpadminbar")).length?jQuery(t).sticky({topSpacing:w.height(),zIndex:999}):jQuery(t).sticky({topSpacing:0,zIndex:999}));if(jQuery(".wp-block-search__input").attr("placeholder","Search posts"),void 0!==jQuery.fn.headroom){var Q=jQuery(t).offset().top,w=jQuery("#wpadminbar"),b=jQuery(t).width();w.length&&(Q=w.height()+jQuery(t).offset().top),jQuery(t).headroom({offset:Q,tolerance:0,onPin:function(){w.length?jQuery(t).css({top:w.height(),position:"fixed",width:b}):jQuery(t).css({top:0,position:"fixed","z-index":999,width:b})},onTop:function(){jQuery(t).css({top:0,position:"relative"})}})}if(void 0!==jQuery.fn.bxSlider){var k=jQuery(".cm-featured-category-slider ");jQuery(k).each((function(){!function(e,t,i,r,a,o){jQuery(e).bxSlider({mode:t,speed:i,auto:a,pause:r,autoHover:o,adaptiveHeight:!0,nextText:'<div class="cm-category-slide-next"><svg class="cm-icon coloramg-icon--arrow-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 11h15.59l-7.3-7.29a1 1 0 0 1 1.42-1.42l9 9a.93.93 0 0 1 .21.33A1 1 0 0 1 22 12a1.09 1.09 0 0 1-.08.39 1.06 1.06 0 0 1-.21.31l-9 9a1 1 0 0 1-1.42 0 1 1 0 0 1 0-1.42l7.3-7.28H3a1 1 0 0 1 0-2Z"></path></svg></div>',prevText:'<div class="cm-category-slide-prev"><svg class="cm-icon coloramg-icon--arrow-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 11H5.41l7.3-7.29a1 1 0 1 0-1.42-1.42l-9 9a.93.93 0 0 0-.21.33A1 1 0 0 0 2 12a1.09 1.09 0 0 0 .08.39 1.06 1.06 0 0 0 .21.31l9 9a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42L5.41 13H21a1 1 0 0 0 0-2Z"></path></svg></div>',pager:!1,tickerHover:!0,onSliderLoad:function(){jQuery(".cm-slider-area-rotate").css("visibility","visible"),jQuery(".cm-slider-area-rotate").css("height","auto")}})}(jQuery(this).children(".cm-slider-area-rotate"),jQuery(this).children(".cm-slider-area-rotate").data("mode"),jQuery(this).children(".cm-slider-area-rotate").data("speed"),jQuery(this).children(".cm-slider-area-rotate").data("pause"),jQuery(this).children(".cm-slider-area-rotate").data("auto"),jQuery(this).children(".cm-slider-area-rotate").data("hover"))}));var _=jQuery(".cm-posts");jQuery(_).each((function(){!function(e,t,i,r,a){jQuery(e).bxSlider({minSlides:1,maxSlides:2,slideWidth:390,slideMargin:20,speed:t,pause:i,auto:r,autoHover:a,adaptiveHeight:!0,nextText:'<div class="slide-next"><i class="fa fa-angle-right"></i></div>',prevText:'<div class="slide-prev"><i class="fa fa-angle-left"></i></div>',pager:!1,captions:!1,onSliderLoad:function(){jQuery(".cm-featured-posts--style-5 .cm-highlighted-post").css("visibility","visible"),jQuery(".cm-featured-posts--style-5 .cm-highlighted-post").css("height","auto")}})}(jQuery(this).children(".cm-featured-posts--style-5 .cm-highlighted-post"),jQuery(this).children(".cm-featured-posts--style-5 .cm-highlighted-post").data("speed"),jQuery(this).children(".cm-featured-posts--style-5 .cm-highlighted-post").data("pause"),jQuery(this).children(".cm-featured-posts--style-5 .cm-highlighted-post").data("auto"),jQuery(this).children(".cm-featured-posts--style-5 .cm-highlighted-post").data("hover"))}));var x=jQuery(".cm-thumbnail-slider-news");jQuery(x).each((function(){!function(e,t,i,r,a,o,s){jQuery(e).bxSlider({mode:i,speed:r,pause:a,auto:o,pagerCustom:t,autoHover:s,controls:!1,nextText:"",prevText:"",nextSelector:"",prevSelector:"",captions:!1,onSliderLoad:function(){jQuery(".thumbnail-big-sliders").css("visibility","visible"),jQuery(".thumbnail-big-sliders").css("height","auto")}})}(jQuery(this).children(".thumbnail-big-sliders"),jQuery(this).children(".cm-thumbnail-slider"),jQuery(this).children(".thumbnail-big-sliders").data("mode"),jQuery(this).children(".thumbnail-big-sliders").data("speed"),jQuery(this).children(".thumbnail-big-sliders").data("pause"),jQuery(this).children(".thumbnail-big-sliders").data("auto"),jQuery(this).children(".thumbnail-big-sliders").data("hover"))}));var S=jQuery(".cm-featured-posts--style-7");jQuery(S).each((function(){!function(e,t){jQuery(e).bxSlider({minSlides:5,maxSlides:8,slideWidth:150,slideMargin:12,ticker:!0,speed:t,tickerHover:!0,useCSS:!1,onSliderLoad:function(){jQuery(".cm-image-ticker-news").css("visibility","visible"),jQuery(".cm-image-ticker-news").css("height","auto")}})}(jQuery(this).children(".cm-image-ticker-news"),jQuery(this).children(".cm-image-ticker-news").data("speed"))})),jQuery(".blog .gallery-images, .archive .gallery-images, .search .gallery-images, .single-post .gallery-images").bxSlider({mode:"fade",speed:1500,auto:!0,pause:3e3,adaptiveHeight:!0,nextText:"",prevText:"",nextSelector:".slide-next",prevSelector:".slide-prev",pager:!1}),jQuery(window).on("load colormagAjaxSinglePostLoaded",(function(){jQuery(".related-post-carousel").bxSlider({minSlides:1,maxSlides:2,auto:!0,slideWidth:390,slideMargin:20,moveSlides:1,shrinkItems:!0,speed:3e3,autoHover:!0,nextText:'<div class="slide-next"><svg class="cm-icon coloramg-icon--arrow-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 11h15.59l-7.3-7.29a1 1 0 0 1 1.42-1.42l9 9a.93.93 0 0 1 .21.33A1 1 0 0 1 22 12a1.09 1.09 0 0 1-.08.39 1.06 1.06 0 0 1-.21.31l-9 9a1 1 0 0 1-1.42 0 1 1 0 0 1 0-1.42l7.3-7.28H3a1 1 0 0 1 0-2Z"></path></svg></i></div>',prevText:'<div class="slide-prev"><svg class="cm-icon coloramg-icon--arrow-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 11H5.41l7.3-7.29a1 1 0 1 0-1.42-1.42l-9 9a.93.93 0 0 0-.21.33A1 1 0 0 0 2 12a1.09 1.09 0 0 0 .08.39 1.06 1.06 0 0 0 .21.31l9 9a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42L5.41 13H21a1 1 0 0 0 0-2Z"></path></svg></div>',pager:!1,captions:!1,onSliderLoad:function(){jQuery(".related-post-carousel").css("visibility","visible"),jQuery(".related-post-carousel").css("height","auto")}})}))}if(void 0!==jQuery.fn.easytabs&&jQuery(".cm-tabbed-widget").easytabs(),void 0!==jQuery.fn.theiaStickySidebar&&"undefined"!=typeof ResizeSensor){var C=jQuery("#sticky-wrapper").outerHeight();null===C&&(C=0),jQuery("#cm-primary, #cm-secondary, #cm-tertiary").theiaStickySidebar({additionalMarginTop:40+C})}function I(e){e.find(".player-frame").each((function(){var e=jQuery(this),t=jQuery('[data-id="'+e.attr("id")+'"]');e.addVideoEvent("play",(function(e,i,r){t.removeClass("is-paused").addClass("is-playing")})),e.addVideoEvent("pause",(function(e,i,r){t.removeClass("is-playing").addClass("is-paused")})),e.addVideoEvent("finish",(function(e,i,r){t.removeClass("is-paused is-playing")}))}))}if(jQuery(".video-player").each((function(e){var t=jQuery(this),i="video-playlist-item-"+e,r=jQuery(this).find(".player-frame");t.attr("id",i),r.video(),I(t),r.addVideoEvent("ready",(function(){r.css("visibility","visible").fadeIn()})),t.on("click",".video-playlist-item",(function(){var e=jQuery(this),i=e.data("id"),r=jQuery("#"+i),a=e.data("src");t.find(".player-frame").each((function(){jQuery(this).pauseVideo().hide()})),r.length?r.playVideo():(t.find(".video-frame").append('<iframe id="'+i+'" class="player-frame" src="'+a+'" frameborder="0" width="100%" height="434" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),(r=jQuery("#"+i)).video(),r.addVideoEvent("ready",(function(e,t,i){r.playVideo()}))),r.css("visibility","visible").fadeIn(),I(t)}))})),void 0!==jQuery.fn.prognroll&&jQuery("body").prognroll({height:5,color:colormag_progress_bar_indicator_color.bg_color,custom:!1}),"undefined"!=typeof google&&"undefined"!=typeof colormag_google_maps_widget_settings){n=parseFloat(colormag_google_maps_widget_settings.longitude),c=parseFloat(colormag_google_maps_widget_settings.latitude),l=parseInt(colormag_google_maps_widget_settings.zoom_size),d={lat:c,lng:n},u=new google.maps.Map(document.getElementById("GoogleMaps"),{zoom:l,center:d}),new google.maps.Marker({position:d,map:u}),jQuery("#GoogleMaps").css({height:colormag_google_maps_widget_settings.height})}y=jQuery(".share-buttons #facebook")[0],f=jQuery(".share-buttons #twitter")[0],v=jQuery(".share-buttons #pinterest")[0],j=jQuery(".share-buttons #email")[0],y&&jQuery(y).click((function(e){return e.preventDefault(),(m=window.open("https://www.facebook.com/sharer/sharer.php?u="+document.URL+"&p[title]="+document.title,"facebook-popup","height=350,width=600")).focus&&m.focus(),!1})),f&&jQuery(f).click((function(e){return e.preventDefault(),(h=window.open("https://twitter.com/share?text="+document.title+"&url="+document.URL,"twitter-popup","height=350,width=600")).focus&&h.focus(),!1})),v&&jQuery(v).click((function(e){e.preventDefault();var t=jQuery(".cm-posts .cm-featured-image img").attr("src")?jQuery(".cm-posts .cm-featured-image img").attr("src"):"";return(p=window.open("https://pinterest.com/pin/create/button/?url="+document.URL+"&media="+t+"&description="+document.title,"pinterest-popup","height=350,width=600")).focus&&p.focus(),!1})),j&&jQuery(j).click((function(e){e.preventDefault();var t=document.URL,i=document.title,r="mailto:?subject="+encodeURIComponent(i)+"&body="+encodeURIComponent(t);return(g=window.open(r,"email-popup","height=350,width=600")).focus&&g.focus(),!1}))})),jQuery((function(){var e=jQuery("#related-posts-wrapper-flyout");function t(){jQuery("#cm-primary").outerHeight();var t=jQuery(this).scrollTop()+jQuery(this).height();t>jQuery(document).height()-t?e.addClass("flyout"):e.removeClass("flyout")}jQuery(window).on("scroll",t),jQuery("#flyout-related-post-close").click((function(){e.removeClass("flyout"),jQuery(window).off("scroll",t)}))})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("cm-color-switch-checkbox");let t=colormag_color_switcher.colormag_switcher;void 0===t&&(t="white"),null==e&&localStorage.removeItem("hasRunColor");let i=localStorage.getItem("hasRunColor");"false"!==i&&null!=i||("dark"===t?localStorage.setItem("colorSwitcherState","false"):localStorage.setItem("colorSwitcherState","true"));const r=localStorage.getItem("colorSwitcherState");"true"===r?document.body.classList.remove("dark-skin"):document.body.classList.add("dark-skin"),null!==e&&(localStorage.setItem("hasRunColor","true"),e.checked="true"===r,e.addEventListener("change",(function(){localStorage.removeItem("colorSwitcherState"),localStorage.setItem("colorSwitcherState",e.checked),e.checked?document.body.classList.remove("dark-skin"):document.body.classList.add("dark-skin")})))})),function(e){"use strict";e(document).ready((function(){function t(){e(".cm-header-off-canvas").removeClass("active"),e(".cm-off-canvas-overlay").removeClass("active"),e("body").removeClass("off-canvas-open"),e(".cm-off-canvas-toggle").attr("aria-expanded","false")}e(".cm-off-canvas-toggle").on("click",(function(t){t.preventDefault(),e(".cm-header-off-canvas").toggleClass("active"),e(".cm-off-canvas-overlay").toggleClass("active"),e("body").toggleClass("off-canvas-open"),e(".cm-header-off-canvas").hasClass("active")?e(".cm-off-canvas-toggle").attr("aria-expanded","true"):e(".cm-off-canvas-toggle").attr("aria-expanded","false")})),e(".cm-off-canvas-close, .cm-off-canvas-overlay").on("click",(function(e){e.preventDefault(),t()})),e(document).keyup((function(e){"Escape"===e.key&&t()}))}))}(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,(function(t,e){let i=t.console,n=void 0===i?function(){}:function(t){i.error(t)};return function(i,o,s){(s=s||e||t.jQuery)&&(o.prototype.option||(o.prototype.option=function(t){t&&(this.options=Object.assign(this.options||{},t))}),s.fn[i]=function(t,...e){return"string"==typeof t?function(t,e,o){let r,l=`$().${i}("${e}")`;return t.each((function(t,h){let a=s.data(h,i);if(!a)return void n(i+" not initialized. Cannot call method "+l);let c=a[e];if(!c||"_"==e.charAt(0))return void n(l+" is not a valid method");let u=c.apply(a,o);r=void 0===r?u:r})),void 0!==r?r:t}(this,t,e):(r=t,this.each((function(t,e){let n=s.data(e,i);n?(n.option(r),n._init()):(n=new o(e,r),s.data(e,i,n))})),this);var r})}})),function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},n=i[t]=i[t]||[];return n.includes(e)||n.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let n=i.indexOf(e);return-1!=n&&i.splice(n,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of i){n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t):t.fizzyUIUtils=e(t)}(this,(function(t){let e={extend:function(t,e){return Object.assign(t,e)},modulo:function(t,e){return(t%e+e)%e},makeArray:function(t){if(Array.isArray(t))return t;if(null==t)return[];return"object"==typeof t&&"number"==typeof t.length?[...t]:[t]},removeFrom:function(t,e){let i=t.indexOf(e);-1!=i&&t.splice(i,1)},getParent:function(t,e){for(;t.parentNode&&t!=document.body;)if((t=t.parentNode).matches(e))return t},getQueryElement:function(t){return"string"==typeof t?document.querySelector(t):t},handleEvent:function(t){let e="on"+t.type;this[e]&&this[e](t)},filterFindElements:function(t,i){return(t=e.makeArray(t)).filter(t=>t instanceof HTMLElement).reduce((t,e)=>{if(!i)return t.push(e),t;e.matches(i)&&t.push(e);let n=e.querySelectorAll(i);return t=t.concat(...n)},[])},debounceMethod:function(t,e,i){i=i||100;let n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){clearTimeout(this[o]);let t=arguments;this[o]=setTimeout(()=>{n.apply(this,t),delete this[o]},i)}},docReady:function(t){let e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,e,i){return e+"-"+i})).toLowerCase()}},i=t.console;return e.htmlInit=function(n,o){e.docReady((function(){let s="data-"+e.toDashed(o),r=document.querySelectorAll(`[${s}]`),l=t.jQuery;[...r].forEach(t=>{let e,r=t.getAttribute(s);try{e=r&&JSON.parse(r)}catch(e){return void(i&&i.error(`Error parsing ${s} on ${t.className}: ${e}`))}let h=new n(t,e);l&&l.data(t,o,h)})}))},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,(function(t,e,i){let n=t.jQuery,o={};function s(t,e){let r=i.getQueryElement(t);if(r){if((t=r).infiniteScrollGUID){let i=o[t.infiniteScrollGUID];return i.option(e),i}this.element=t,this.options={...s.defaults},this.option(e),n&&(this.$element=n(this.element)),this.create()}else console.error("Bad element for InfiniteScroll: "+(r||t))}s.defaults={},s.create={},s.destroy={};let r=s.prototype;Object.assign(r,e.prototype);let l=0;r.create=function(){let t=this.guid=++l;if(this.element.infiniteScrollGUID=t,o[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath&&this.getPath()){this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(let t in s.create)s.create[t].call(this)}else console.error("Disabling InfiniteScroll")},r.option=function(t){Object.assign(this.options,t)},r.callOnInit=function(){let t=this.options.onInit;t&&t.call(this,this)},r.dispatchEvent=function(t,e,i){this.log(t,i);let o=e?[e].concat(i):i;if(this.emitEvent(t,o),!n||!this.$element)return;let s=t+=".infiniteScroll";if(e){let i=n.Event(e);i.type=t,s=i}this.$element.trigger(s,i)};let h={initialized:t=>"on "+t,request:t=>"URL: "+t,load:(t,e)=>`${t.title||""}. URL: ${e}`,error:(t,e)=>`${t}. URL: ${e}`,append:(t,e,i)=>`${i.length} items. URL: ${e}`,last:(t,e)=>"URL: "+e,history:(t,e)=>"URL: "+e,pageIndex:function(t,e){return`current page determined to be: ${t} from ${e}`}};r.log=function(t,e){if(!this.options.debug)return;let i="[InfiniteScroll] "+t,n=h[t];n&&(i+=". "+n.apply(this,e)),console.log(i)},r.updateMeasurements=function(){this.windowHeight=t.innerHeight;let e=this.element.getBoundingClientRect();this.top=e.top+t.scrollY},r.updateScroller=function(){let e=this.options.elementScroll;if(e){if(this.scroller=!0===e?this.element:i.getQueryElement(e),!this.scroller)throw new Error("Unable to find elementScroll: "+e)}else this.scroller=t},r.updateGetPath=function(){let t=this.options.path;if(!t)return void console.error("InfiniteScroll path option required. Set as: "+t);let e=typeof t;"function"!=e?"string"==e&&t.match("{{#}}")?this.updateGetPathTemplate(t):this.updateGetPathSelector(t):this.getPath=t},r.updateGetPathTemplate=function(t){this.getPath=()=>{let e=this.pageIndex+1;return t.replace("{{#}}",e)};let e=t.replace(/(\\\?|\?)/,"\\?").replace("{{#}}","(\\d\\d?\\d?)"),i=new RegExp(e),n=location.href.match(i);n&&(this.pageIndex=parseInt(n[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};let a=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/],c=s.getPathParts=function(t){if(t)for(let e of a){let i=t.match(e);if(i){let[,t,e,n]=i;return{begin:t,index:e,end:n}}}};r.updateGetPathSelector=function(t){let e=document.querySelector(t);if(!e)return void console.error("Bad InfiniteScroll path option. Next link not found: "+t);let i=e.getAttribute("href"),n=c(i);if(!n)return void console.error("InfiniteScroll unable to parse next link href: "+i);let{begin:o,index:s,end:r}=n;this.isPathSelector=!0,this.getPath=()=>o+(this.pageIndex+1)+r,this.pageIndex=parseInt(s,10)-1,this.log("pageIndex",[this.pageIndex,"next link"])},r.updateGetAbsolutePath=function(){let t=this.getPath();if(t.match(/^http/)||t.match(/^\//))return void(this.getAbsolutePath=this.getPath);let{pathname:e}=location,i=t.match(/^\?/),n=e.substring(0,e.lastIndexOf("/")),o=i?e:n+"/";this.getAbsolutePath=()=>o+this.getPath()},s.create.hideNav=function(){let t=i.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},s.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},r.destroy=function(){this.allOff();for(let t in s.destroy)s.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete o[this.guid],n&&this.$element&&n.removeData(this.element,"infiniteScroll")},s.throttle=function(t,e){let i,n;return e=e||200,function(){let o=+new Date,s=arguments,r=()=>{i=o,t.apply(this,s)};i&&o<i+e?(clearTimeout(n),n=setTimeout(r,e)):r()}},s.data=function(t){let e=(t=i.getQueryElement(t))&&t.infiniteScrollGUID;return e&&o[e]},s.setJQuery=function(t){n=t},i.htmlInit(s,"infinite-scroll"),r._init=function(){};let{jQueryBridget:u}=t;return n&&u&&u("infiniteScroll",s,n),s})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core")):e(t,t.InfiniteScroll)}(window,(function(t,e){let i=e.prototype;Object.assign(e.defaults,{loadOnScroll:!0,checkLastPage:!0,responseBody:"text",domParseResponse:!0}),e.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},i.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()};let n=new DOMParser;function o(t){let e=document.createDocumentFragment();return t&&e.append(...t),e}return i.loadNextPage=function(){if(this.isLoading||!this.canLoad)return;let{responseBody:t,domParseResponse:e,fetchOptions:i}=this.options,o=this.getAbsolutePath();this.isLoading=!0,"function"==typeof i&&(i=i());let s=fetch(o,i).then(i=>{if(!i.ok){let t=new Error(i.statusText);return this.onPageError(t,o,i),{response:i}}return i[t]().then(s=>("text"==t&&e&&(s=n.parseFromString(s,"text/html")),204==i.status?(this.lastPageReached(s,o),{body:s,response:i}):this.onPageLoad(s,o,i)))}).catch(t=>{this.onPageError(t,o)});return this.dispatchEvent("request",null,[o,s]),s},i.onPageLoad=function(t,e,i){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e,i]),this.appendNextPage(t,e,i)},i.appendNextPage=function(t,e,i){let{append:n,responseBody:s,domParseResponse:r}=this.options;if(!("text"==s&&r)||!n)return{body:t,response:i};let l=t.querySelectorAll(n),h={body:t,response:i,items:l};if(!l||!l.length)return this.lastPageReached(t,e),h;let a=o(l),c=()=>(this.appendItems(l,a),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,l,i]),h);return this.options.outlayer?this.appendOutlayerItems(a,c):c()},i.appendItems=function(t,e){t&&t.length&&(function(t){let e=t.querySelectorAll("script");for(let t of e){let e=document.createElement("script"),i=t.attributes;for(let t of i)e.setAttribute(t.name,t.value);e.innerHTML=t.innerHTML,t.parentNode.replaceChild(e,t)}}(e=e||o(t)),this.element.appendChild(e))},i.appendOutlayerItems=function(i,n){let o=e.imagesLoaded||t.imagesLoaded;return o?new Promise((function(t){o(i,(function(){let e=n();t(e)}))})):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},i.onAppendOutlayer=function(t,e,i){this.options.outlayer.appended(i)},i.checkLastPage=function(t,e){let i,{checkLastPage:n,path:o}=this.options;if(n){if("function"==typeof o){if(!this.getPath())return void this.lastPageReached(t,e)}"string"==typeof n?i=n:this.isPathSelector&&(i=o),i&&t.querySelector&&(t.querySelector(i)||this.lastPageReached(t,e))}},i.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},i.onPageError=function(t,e,i){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e,i]),t},e.create.prefill=function(){if(!this.options.prefill)return;let t=this.options.append;t?(this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()):console.error("append option required for prefill. Set as :"+t)},i.prefill=function(){let t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},i.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},i.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;return Object.assign(e.defaults,{scrollThreshold:400}),e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);let t=this.options.scrollThreshold;(t||0===t)&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){let i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle((function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")})),n.getBottomDistance=function(){let e,i;return this.options.elementScroll?(e=this.scroller.scrollHeight,i=this.scroller.scrollTop+this.scroller.clientHeight):(e=this.top+this.element.clientHeight,i=t.scrollY+this.windowHeight),e-i},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;Object.assign(e.defaults,{history:"replace"});let o=document.createElement("a");return e.create.history=function(){if(!this.options.history)return;o.href=this.getAbsolutePath(),(o.origin||o.protocol+"//"+o.host)==location.origin?this.options.append?this.createHistoryAppend():this.createHistoryPageLoad():console.error(`[InfiniteScroll] cannot set history with different origin: ${o.origin} on ${location.origin} . History behavior disabled.`)},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPage=this.scrollPages[0],this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){let i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=n.destroyHistory=function(){this.options.history&&this.options.append&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){if(!i||!i.length)return;let n=i[0],s=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:s,path:o.href,title:t.title})},n.getElementScrollY=function(e){if(this.options.elementScroll)return e.offsetTop-this.top;return e.getBoundingClientRect().top+t.scrollY},n.onScrollHistory=function(){let t=this.getClosestScrollPage();t!=this.scrollPage&&(this.scrollPage=t,this.setHistory(t.title,t.path))},i.debounceMethod(e,"onScrollHistory",150),n.getClosestScrollPage=function(){let e,i;e=this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.scrollY+this.windowHeight/2;for(let t of this.scrollPages){if(t.top>=e)break;i=t}return i},n.setHistory=function(t,e){let i=this.options.history;i&&history[i+"State"]&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onUnload=function(){if(0===this.scrollPage.top)return;let e=t.scrollY-this.scrollPage.top+this.top;this.destroyHistory(),scrollTo(0,e)},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){class n{constructor(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}onClick(t){t.preventDefault(),this.infScroll.loadNextPage()}enable(){this.element.removeAttribute("disabled")}disable(){this.element.disabled="disabled"}hide(){this.element.style.display="none"}destroy(){this.element.removeEventListener("click",this.clickHandler)}}return e.create.button=function(){let t=i.getQueryElement(this.options.button);t&&(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},e.Button=n,e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;function o(t){r(t,"none")}function s(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}return e.create.status=function(){let t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},n.bindHideStatus=function(t){let e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},n.showRequestStatus=function(){this.showStatus("request")},n.showErrorStatus=function(){this.showStatus("error")},n.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},n.showStatus=function(t){s(this.statusElement),this.hideStatusEventElements(),s(this.statusEventElements[t])},n.hideAllStatus=function(){o(this.statusElement),this.hideStatusEventElements()},n.hideStatusEventElements=function(){for(let t in this.statusEventElements){o(this.statusEventElements[t])}},e})),
function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var i=t.jQuery,n=t.console;function o(t,e){for(var i in e)t[i]=e[i];return t}var s=Array.prototype.slice;function r(t,e,l){if(!(this instanceof r))return new r(t,e,l);var h,a=t;("string"==typeof t&&(a=document.querySelectorAll(t)),a)?(this.elements=(h=a,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?s.call(h):[h]),this.options=o({},this.options),"function"==typeof e?l=e:o(this.options,e),l&&this.on("always",l),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):n.error("Bad element for imagesLoaded "+(a||t))}r.prototype=Object.create(e.prototype),r.prototype.options={},r.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},r.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&l[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var s=t.querySelectorAll(this.options.background);for(n=0;n<s.length;n++){var r=s[n];this.addElementBackgroundImages(r)}}}};var l={1:!0,9:!0,11:!0};function h(t){this.img=t}function a(t,e){this.url=t,this.element=e,this.img=new Image}return r.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},r.prototype.addImage=function(t){var e=new h(t);this.images.push(e)},r.prototype.addBackground=function(t,e){var i=new a(t,e);this.images.push(i)},r.prototype.check=function(){var t=this;function e(e,i,n){setTimeout((function(){t.progress(e,i,n)}))}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach((function(t){t.once("progress",e),t.check()})):this.complete()},r.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&n&&n.log("progress: "+i,t,e)},r.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},h.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype=Object.create(h.prototype),a.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},r.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((i=e).fn.imagesLoaded=function(t,e){return new r(this,t,e).jqDeferred.promise(i(this))})},r.makeJQueryPlugin(),r}));
!function(n){n(window).on("load",(function(){!function(){if("undefined"!=typeof colormagInfiniteScrollParams){var t=colormagInfiniteScrollParams,o=n(".tg-infinite-pagination"),i=n(".tg-infinite-scroll-container"),l=t.infiniteScrollEvent;o.length&&i.length&&o.find(".next").length&&!o.infinitescroll&&(o.infinitescroll=new InfiniteScroll(".tg-infinite-scroll-container",{path:".next",checkLastPage:".next",append:".tg-infinite-scroll-container .post",button:"button"===l?".tg-load-more-btn":null,outlayer:null,scrollThreshold:"scroll"===l&&500,onInit:function(){var n=o.find(".tg-load-more");this.on("load",(function(){n.removeClass("loading")})),this.on("request",(function(){n.addClass("loading")})),this.on("last",(function(){n.find(".tg-all-post-loaded-text").css("display","block")}))}}))}}(),function(){if("undefined"!=typeof colormagInfiniteScrollParams){var t=colormagInfiniteScrollParams,o=n(".tg-infinite-pagination"),i=n(".tg-autoload-posts"),l=t.autoLoadEvent;i.length&&o.find(".next").length&&!o.infinitescroll&&(o.infinitescroll=new InfiniteScroll(".tg-autoload-posts",{path:function(){var n=o.find('a[data-index="'+(this.pageIndex+1)+'"]');return n.length||(this.canLoad=!1),n.attr("href")},append:".tg-autoload-posts .tg-post",button:"button"===l?".tg-load-more-btn":null,outlayer:null,scrollThreshold:"scroll"===l&&500,onInit:function(){var n=o.find(".tg-load-more");this.on("load",(function(){n.removeClass("loading")})),this.on("request",(function(){n.addClass("loading")})),this.on("last",(function(){n.hide()}))}}))}}()}))}(jQuery);
jQuery(document).ready((function(){var t=jQuery(".tg-ajax-btn-wrapper");jQuery(t).each((function(){!function(t,r,a,e,o,n,d,i,u,g){var l=1,s=colormag_script_vars.no_more_posts,c=r,y=e,h=a,j=o,Q=n,_=d,p=i;jQuery(t).on("click",(function(){l++,jQuery(g).show(),jQuery(t).attr("disabled",!0);var r={action:"get_ajax_results",tg_nonce:colormag_load_more.tg_nonce,tg_pagenumber:l,tg_category:c,tg_number:y,tg_random:h,tg_child_category:j,tg_tag:Q,tg_author:_,tg_type:p};return jQuery.post(colormag_load_more.ajax_url,r,(function(r){var a=jQuery(r);a.length?(jQuery(u).append(a),jQuery(g).hide(),jQuery(t).attr("disabled",!1)):(jQuery(g).hide(),jQuery(t).attr("disabled",!0),jQuery(t).html("<span>"+s+"</span>"))})),!1}))}("#"+jQuery(this).children(".tg-front-post-load-more").attr("id"),jQuery(this).children(".tg-front-post-load-more").data("category"),jQuery(this).children(".tg-front-post-load-more").data("random"),jQuery(this).children(".tg-front-post-load-more").data("number"),jQuery(this).children(".tg-front-post-load-more").data("child_category"),jQuery(this).children(".tg-front-post-load-more").data("tag"),jQuery(this).children(".tg-front-post-load-more").data("author"),jQuery(this).children(".tg-front-post-load-more").data("type"),"#"+jQuery(this).children(".tg-append-ajax-datas").attr("id"),"#"+jQuery(this).find(".waiting").attr("id"))}))}));
!function(o){"use strict";var l=window.GEM||{};l.DEBUG_FLAG=!0,l.init=function(){o("form.gem-form").submit(function(e){var i,t,a,s,n,r=o(this),u=o(".gem-spinner",r),h=r.find(".gem-error, .gem-info"),c=[],d=[];e.preventDefault(),o(this).find("input[type=checkbox]").each(function(){var e=o(this).data("name");t!==e&&(a=o('input:checkbox[data-name="'+(t=e)+'"]:checked').map(function(){return this.value}).get().join(", "),o('input[name="'+e+'"]').val(a))}),o(this).find("[fingerprint=date]").each(function(){var e=o(this).data("name");s!==e&&(o('select[data-name="'+(s=e)+'"]').each(function(){var e=o(this).val();e&&d.push(e)}),3===d.length&&(n=d[0]+" "+d[1]+", "+d[2],o('input[name="'+e+'"]').val(n)))}),i=o(this).serialize(),r.find("input.gem-invalid").removeClass("gem-invalid"),o(this).find(".gem-required").each(function(){var e=o(this).val();"signup[email]"!==o(this).attr("name")||l.isEmail(e)?""===e&&o(this).is("input")?c.push(o(this)):o(this).is('input[type="checkbox"]')&&!o(this).is(":checked")?c.push(o(this)):o(this).is("label")&&void 0===o('input:radio[name="'+o(this).data("name")+'"]:checked').val()&&c.push(o(this)):c.push(o(this))}),0===c.length?(u.css("display","inline-block"),o.post(r.attr("action")+".json",i,function(i){r.fadeOut("fast",function(){var e;i.success?(e=i.result.audience_member.suppressed,i.result.has_redirect&&(window.location.href=i.result.redirect),r.html(l.addMessage(e?["suppressed","success"]:["info","success"],e?l.thankyou_suppressed:l.thankyou)).fadeIn("fast")):r.html(l.addMessage("info",l.oops)).fadeIn("fast")})},"jsonp")):(0!==h.length&&h.remove(),o(c.reverse()).each(function(){var e="";o(this).addClass("gem-invalid"),"signup[email]"===o(this).attr("name")?e=""===o(this).val()?l.required.replace("%s",o(this).data("label")):l.email:o(this).data("label")&&(e=l.required.replace("%s",o(this).data("label"))),e&&r.prepend(l.addMessage("error",e))}))})},l.addMessage=function(e,i){var t=[];return o.isArray(e)?o.each(e,function(e,i){t.push("gem-"+i)}):t.push("gem-"+e.toString()),o("<p/>",{class:t.join(" ")}).text(i)},l.isEmail=function(e){return/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)},o(document).ready(l.init)}(jQuery);