';break;case'grid1':html='
';break;case'grid2':html='
';break;case'carousel':html='
';break;case'videos':html='
';break;case'list':html='
';$this.html(html);break;case'block2':html+='
';$this.html(html);break;case'carousel':html+='
';$this.html(html);var $slider=$this.find('.block-carousel');$slider.owlCarousel({items:3,slideBy:3,margin:20,smartSpeed:150,rtl:slideRTL,nav:true,navText:['',''],loop:true,autoHeight:true,autoplay:false,dots:false,responsive:{0:{items:1},541:{items:2},681:{items:3}}});break;default:html+='
';$this.html(html);break}$this.find('span.entry-thumb').lazyify()},error:function(){switch(type){case'msimple':$this.append('
');break;case'breaking':$this.html(msgServerError()).parent().addClass('show-ify');break;default:$this.html(msgServerError());break}}})}}function ajaxMega($this,type,num,label,text){if(text.match('getmega')){if(type=='msimple'||type=='megatabs'||type=='mtabs'){return getAjax($this,type,num,label)}else{$this.addClass('has-sub mega-menu').append('
')}}}function ajaxBreaking($this,type,num,label,text){if(text.match('getbreaking')){if(type=='breaking'){return getAjax($this,type,num,label)}else{$this.html(msgError()).parent().addClass('show-ify')}}}function ajaxFeatured($this,type,num,label,text){if(text.match('getfeatured')){if(type=='featured1'||type=='featured2'||type=='featured3'||type=='featured4'||type=='featured5'||type=='featured6'){return getAjax($this,type,num,label)}else{$this.html(beforeLoader()).parent().addClass('show-ify');setTimeout(function(){$this.html(msgError())},500)}}}function ajaxBlock($this,type,num,label,text){if(text.match('getblock')){if(type=='block1'||type=='block2'||type=='col-left'||type=='col-right'||type=='grid1'||type=='grid2'||type=='carousel'||type=='videos'){var moreText=showMoreText,text='';if(moreText!=''){text=moreText}else{text=messages.showMore}$this.parent().find('.widget-title').append('
'+text+'');return getAjax($this,type,num,label)}else{$this.html(msgError()).parent().addClass('show-ify')}}}function ajaxWidget($this,type,num,label,text){if(text.match('getwidget')){if(type=='list'){return getAjax($this,type,num,label)}else{$this.html(msgError())}}}function ajaxRelated($this,type,num,label,text){if(text.match('getrelated')){return getAjax($this,type,num,label)}}$('.comments-title h3.title').each(function(){var $t=$(this),$tx=$t.text().trim(),$c=$t.attr('count').trim(),$m=$t.attr('message').trim(),$sp=$tx.split('/'),$r='';if($c==0){$r=$sp[1]}else{if($sp[2]==undefined){$r=$sp[0]+' '+$m}else{$r=$sp[0]+' '+$sp[2]}}$t.text($r)});$('.galaxymag-blog-post-comments').each(function(){var $this=$(this),system=commentsSystem,facebook='',sClass='comments-system-'+system;switch(system){case'blogger':$this.addClass(sClass).show();$('.entry-meta .entry-comments-link').addClass('show');break;case'disqus':$this.addClass(sClass).show();break;case'facebook':$this.addClass(sClass).show().find('#comments').replaceWith(facebook);break;case'hide':$this.hide();break;default:$this.addClass('comments-system-default').show();$('.entry-meta .entry-comments-link').addClass('show');break}var $r=$this.find('.comments .toplevel-thread > ol > .comment .comment-actions .comment-reply'),$c=$this.find('.comments .toplevel-thread > #top-continue');$r.on('click',function(){$c.show()});$c.on('click',function(){$c.hide()})});$(function(){$('.index-post .entry-image-link .entry-thumb, .PopularPosts .entry-image-link .entry-thumb, .FeaturedPost .entry-image-link .entry-thumb,.about-author .author-avatar').lazyify();$('.mobile-logo').each(function(){var $t=$(this),$l=$('#main-logo .header-widget a').clone();$l.find('#h1-tag').remove();$l.appendTo($t)});$('#mobile-menu').each(function(){var $t=$(this),$m=$('#galaxymag-main-menu-nav').clone();$m.attr('id','main-mobile-nav');$m.find('.getMega, .mega-widget, .mega-tab').remove();$m.find('li.mega-tabs .complex-tabs').each(function(){var $eq=$(this);$eq.replaceWith($eq.find('> ul.select-tab').attr('class','sub-menu m-sub'))});$m.find('.mega-menu:not(.mega-tabs) > a').each(function(){var $t=$(this),$h=$t.attr('href').trim(),$tlc=$h.toLowerCase();if($tlc.match('getmega')){$t.append('
'+$h+'
');$t.find('.getMega').shortcode({getMega:function($u,$l){$l=this.options.label;$l=='recent'?$u='/search':$u='/search/label/'+$l;$t.attr('href',$u)}})}});$m.find('.mega-tabs ul li > a').each(function(){var $a=$(this),$l=$a.text().trim();$a.attr('href','/search/label/'+$l)});$m.appendTo($t);$('.show-mobile-menu, .hide-mobile-menu, .overlay').on('click',function(){$('body').toggleClass('nav-active')});$('.mobile-menu .has-sub').append('');$('.mobile-menu .mega-menu').find('.submenu-toggle').remove();$('.mobile-menu .mega-tabs').append('');$('.mobile-menu ul li .submenu-toggle').on('click',function($this){if($(this).parent().hasClass('has-sub')){$this.preventDefault();if(!$(this).parent().hasClass('show')){$(this).parent().addClass('show').children('.m-sub').slideToggle(170)}else{$(this).parent().removeClass('show').find('> .m-sub').slideToggle(170)}}})});$('.social-mobile').each(function(){var $t=$(this),$l=$('#about-section .social-footer').clone();$l.removeClass('social-color');$l.appendTo($t)});$('.navbar-wrap .navbar').each(function(){var $this=$(this);if(fixedMenu==true){if($this.length>0){var t=$(document).scrollTop(),w=$this.offset().top,s=$this.height(),h=(w+s);$(window).scroll(function(){var n=$(document).scrollTop(),f=$('#footer-wrapper').offset().top,m=(f-s);if(n
h){$this.addClass('is-fixed')}else if(n<=0){$this.removeClass('is-fixed')}if(n>t){$this.removeClass('show')}else{$this.addClass('show')}t=$(document).scrollTop()}})}}});$('#main-wrapper, #sidebar-wrapper').each(function(){if(fixedSidebar==true){$(this).theiaStickySidebarIfy({additionalMarginTop:30,additionalMarginBottom:30})}});$('.back-top').each(function(){var $this=$(this);$(window).on('scroll',function(){$(this).scrollTop()>=100?$this.fadeIn(250):$this.fadeOut(250)}),$this.click(function(){$('html, body').animate({scrollTop:0},500)})});$('#post-body iframe').each(function(){var $t=$(this),$mtc=$t.attr('src');if($mtc.match('www.youtube.com')){$t.wrap('')}});$('p.comment-content').each(function(){var $t=$(this);$t.replaceText(/(https:\/\/\S+(\.png|\.jpeg|\.jpg|\.gif))/g,'');$t.replaceText(/(?:https:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)?(.+)/g,'')});$('#load-more-link').each(function(){var $this=$(this),$loadLink=$this.data('load');if($loadLink){$('#load-more-link').show()}$('#load-more-link').on('click',function(a){$('#load-more-link').hide();$.ajax({url:$loadLink,success:function(data){var $p=$(data).find('.blog-posts');$p.find('.index-post').addClass('post-animated post-fadeInUp');$('.blog-posts').append($p.html());$loadLink=$(data).find('#load-more-link').data('load');if($loadLink){$('#load-more-link').show()}else{$('#load-more-link').hide();$('#blog-pager .no-more').addClass('show')}$('.index-post .entry-image-link .entry-thumb').lazyify()},beforeSend:function(){$('#blog-pager .loading').show()},complete:function(){$('#blog-pager .loading').hide()}});a.preventDefault()})})});
//]]>