';
break;
case 'megagrid':
htmltype += '
';
break;
case 'block':
htmltype += '
';
break;
case 'sidebar':
htmltype += '
';
break;
case 'comments':
htmltype += '
';
break;
default:
htmltype += '
';
parent.html(htmltype);
break;
}
parent.find('img.snip-thumbnail').lazyimg()
$(".GalaxyPSpeedTic").lazyticker();
},
error: function () {
switch (order) {
case 'megamenu':
parent.append('
' + netError() + '
');
break;
default:
parent.html(netError());
break
}
}
});
}
$("#LSpeed-filter li a").each(function () {
var $this = $(this),
sp = $this.attr("href").trim();
if (sp.match("megamenu")) {
if (label.match('recent', 'random')) {
pt = '/search';
} else {
pt = '/search/label/' + label;
}
$this.attr('href', pt)
}
});
};
$(".GalaxyPSpeedTic .HTML .widget-content,.GalaxyPSpeedPro .HTML .widget-content,.sidebar .HTML .widget-content").each(function () {
var $this = $(this),
sp = $this.text().split("/");
if (!isNaN(sp[0])) {
var count = sp[0],
order = sp[1],
label = sp[2];
defaultCodeiki($this, count, label, order);
}
});
$('.xx0xx-wraprelated').each(function (count, label, order) {
var $this = $(this),
label = $this.find('.related-tag').attr('label'),
count = relatedPostsNum;
order = 'related';
defaultCodeiki($this, count, label, order);
});
$(".GlobeGalaxy .HTML .widget-content,.GalaxyPSpeedPro .HTML .widget-content").each(function (count, label, order) {
var $this = $(this),
sp = $this.text().trim(),
sp = sp.split("/");
if (2 === sp.length) {
var order = sp[0],
label = sp[1];
switch (order) {
case 'featured':
case 'megagrid':
count = 5;
break;
case 'block':
count = 2;
break;
}
defaultCodeiki($this, count, label, order);
}
});
$(".xx0xx-promenu li").each(function (label, order) {
var $this = $(this),
sp = $this.find("a").attr("href");
if (sp.match("megamenu")) {
var sp = sp.split("/");
if (2 === sp.length) {
var order = sp[0],
label = sp[1];
}
defaultCodeiki($this, 5, label, order);
}
});
});
$(function() {
$(".dark-toggle").click(function() {
localStorage.setItem("mode", "darkmode" === localStorage.getItem("mode") ? "GalaxyNew" : "darkmode");
if ("darkmode" === localStorage.getItem("mode")) {
document.querySelector("#mainContent").classList.add("dark");
} else {
document.querySelector("#mainContent").classList.remove("dark");
}
});
$(".PopularPosts .post-filter-link .snip-thumbnail,.FeaturedPost .post-filter-link .snip-thumbnail,.post-filter .post-filter-link .snip-thumbnail,.avatar-container .snip-thumbnail, .author-image .snip-thumbnail, .comment-image .snip-thumbnail").lazyimg();
$("#xx0xx-promenu").Menuiki();
$(".menu li").each(function () {
0 < $(this).find("ul").length && $(this).addClass("drop-down");
});
$("#LSpeed-filter").each(function() {
var a = $(this);
$("#xxqo-menuaflex-list").clone().appendTo(a);
$(".show-Globecontainer, .hide-LSpeed-filter, .overlay").on("click", function() {
$("body").toggleClass("GalaxyNew-open");
});
});
$(".LSpeed-filter ul .mega-menu").removeClass("sub-tab");
$(".LSpeed-filter ul li a").on("click", function() {
$(this).parent().removeClass("show").find("> .m-sub").slideToggle(170);
});
$(".social-GalaxyNew").each(function() {
var a = $(this), w = $("#social-sec ul.social").clone();
w.appendTo(a);
});
$(".mobile-GalaxyNew").each(function() {
var a = $(this), w = $("#menu-top ul.nav1").clone();
w.appendTo(a);
});
$(".search-button, .search-container-close").on("click", function() {
$(".search-container-overlay").toggleClass("search-container-overlay-show");
$("body").toggleClass("active-search");
});
$("#Menu-GalaxyNew .pro-GalaxyNew").each(function() {
var a = $(this);
if (1 == fixedMenu && 0 < a.length) {
var w = $(document).scrollTop(), l = a.offset().top, n = a.height(), r = l + n;
$(window).scroll(function() {
var e = $(document).scrollTop(), b = $("#footer-wrapper").offset().top - n;
e < b && (e > r ? a.addClass("fixed-nos") : 0 >= e && a.removeClass("fixed-nos"), e > w ? a.removeClass("show") : a.addClass("show"), w = $(document).scrollTop());
});
}
});
$(".post-body iframe").each(function() {
var a = $(this);
a.attr("src").match("www.youtube.com") && a.wrap('
');
});
$(".post-body strike").each(function() {
var a = $(this), w = a.text().trim();
"(ads1)" == w && a.replaceWith('
');
"(ads2)" == w && a.replaceWith('
');
});
$('.post-body blockquote').each(function() {
var $this = $(this),
type = $this.text().toLowerCase().trim(),
htmlorder = $this.html();
if (type.match('(alert-success)')) {
const content = htmlorder.replace('(alert-success)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(alert-ed)')) {
const content = htmlorder.replace('(alert-ed)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(alert-warning)')) {
const content = htmlorder.replace('(alert-warning)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(alert-error)')) {
const content = htmlorder.replace('(alert-error)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(code-box)')) {
const content = htmlorder.replace('(code-box)', '');
$this.replaceWith('
' + content + ' ');
}
});
$('.post-body strike').each(function() {
var $this = $(this),
type = $this.text().toLowerCase().trim(),
htmlorder = $this.html();
if (type.match('(-form)')) {
$this.replaceWith('
');
$('.-form').append($('#Form1'))
}
if (type.match('(toc)')) {
const content = htmlorder.replace('(toc)', '');
$this.replaceWith('
');
}
if (type.match('(caps)')) {
const content = htmlorder.replace('(caps)', '');
$this.replaceWith('
' + content + ' ');
}
if (type.match('(normal-bt)')) {
const content = htmlorder.replace('(normal-bt)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(small-bt)')) {
const content = htmlorder.replace('(small-bt)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(medium-bt)')) {
const content = htmlorder.replace('(medium-bt)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(large-bt)')) {
const content = htmlorder.replace('(large-bt)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('()')) {
const content = htmlorder.replace('()', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(buy)')) {
const content = htmlorder.replace('(buy)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(cart)')) {
const content = htmlorder.replace('(cart)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(link)')) {
const content = htmlorder.replace('(link)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(open)')) {
const content = htmlorder.replace('(open)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(info)')) {
const content = htmlorder.replace('(info)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(demo)')) {
const content = htmlorder.replace('(demo)', '');
$this.replaceWith('
' + content + '
');
}
if (type.match('(left-sidebar)')) {
const content = htmlorder.replace('(left-sidebar)', '');
$this.replaceWith('');
}
if (type.match('(right-sidebar)')) {
const content = htmlorder.replace('(right-sidebar)', '');
$this.replaceWith('');
}
if (type.match('(full-width)')) {
const content = htmlorder.replace('(full-width)', '');
$this.replaceWith('');
}
});
$(".share-GalaxyNew .window-piki").on("click", function() {
var a = $(this), w = a.data("url"), l = a.data("width");
a = a.data("height");
window.open(w, "_blank", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=" + l + ",height=" + a + ",left=" + Math.round(window.screen.width / 2 - l / 2) + ",top=" + Math.round(window.screen.height / 2 - a / 2)).focus();
});
$(".share-GalaxyNew").each(function() {
var a = $(this);
a.find(".show-hid a").on("click", function() {
a.toggleClass("show-hidden");
});
});
$(".xxqo-tociki-title").each(function(d) {
(d = $(this)).on("click", function() {
d.toggleClass("opened");
$("#xxqo-tociki").slideToggle(180);
});
}), $("#xxqo-tociki").toc({content:".post-body", headings:"h2,h3,h4"}), $("#xxqo-tociki li a").each(function(d) {
(d = $(this)).click(function() {
$('html,body').animate({
scrollTop: $(d.attr("href")).offset().top
}, 500);
return false;
});
});
$("#new-bottom-ad-placeholder").each(function() {
var a = $(this);
a.length && $("#bottom-ad-placeholder").appendTo(a);
});
$("#new-top-ad-placeholder").each(function() {
var a = $(this);
a.length && $("#top-ad-placeholder").appendTo(a);
});
$("#upper-ad .widget").each(function() {
var a = $(this);
a.length && a.appendTo($("#bottom-ad-placeholder"));
});
$("#lower-ad .widget").each(function() {
var a = $(this);
a.length && a.appendTo($("#top-ad-placeholder"));
});
$("#main-ads-post .widget").each(function () {
var a = $(this);
a.length && a.appendTo($("#post-placeholder"));
});
$(".author-description a").each(function() {
$(this).attr("target", "_blank");
});
$(".xx0o-authord .author-description span a").each(function() {
var a = $(this), w = a.text().trim(), l = a.attr("href");
a.replaceWith('
');
$(".description-links").append($(".author-description span li"));
$(".description-links").addClass("show");
});
$(".xx0o-postnav").each(function() {
var a = $("a.prev-post-link").attr("href"), w = $("a.next-post-link").attr("href");
$.ajax({url:a, type:"get", success:function(l) {
l = $(l).find(".blog-post h1.entry-title").text();
$(".post-prev a .xx0o-postnav-inner p").text(l);
}});
$.ajax({url:w, type:"get", success:function(l) {
l = $(l).find(".blog-post h1.entry-title").text();
$(".post-next a .xx0o-postnav-inner p").text(l);
}});
});
$(".before-text").each(function() {
var a = $(this), b = followByEmailText;
"" != b && a.text(b);
});
$(".related-GalaxyNew .widget-title h3").each(function() {
var a = $(this), b = relatedPostsText;
"" != b && a.text(b);
});
$("#feed-view, #sidebar-container").each(function() {
1 == fixedSidebar && $(this).theiaStickySidebar({additionalMarginTop:30, additionalMarginBottom:30});
});
$(".backTop").each(function() {
var a = $(this);
$(window).on("scroll", function() {
100 <= $(this).scrollTop() ? a.fadeIn(250) : a.fadeOut(250);
});
a.click(function() {
$("html, body").animate({scrollTop:0}, 500);
});
});
$(".blog-post-comments").each(function() {
var a = commentsSystem, w = '', l = "comments-system-" + a;
"blogger" == a ? $(this).addClass(l).show() : "disqus" == a ? (a = document.createElement("script"), a.type = "text/javascript", a.async = !0, a.src = "//" + disqusShortname + ".disqus.com/embed.js", (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(a), $("#comments").remove(), $(this).append('').addClass(l).show()) : "facebook" == a ? ($("#comments").remove(), $(this).append(w).addClass(l).show()) : "hide" == a ? $(this).hide() :
$(this).addClass("comments-system-default").show();
});
$("p.comment-content").each(function() {
var e = $(this);
e.replaceText(/(https:\/\/\S+(\.png|\.jpeg|\.jpg|\.gif))/g, '
'), e.replaceText(/(?:https:\/\/)?(?:www\.)?(?:youtube\.com)\/(?:watch\?v=)?(.+)/g, '
VIDEO
')
});
});
//]]>
'; break; } var json = data.feed.entry; if (json != undefined) { for (var i = 0, feed = json; i < json.length; i++) { for (var j = 0; j < json[i].link.length; j++) { if (json[i].link[j].rel == "alternate") { link = json[i].link[j].href; break; } } var title = json[i].title.$t ? json[i].title.$t : pikiMessages.noTitle, author = json[i].author[0].name.$t, content = json[i].content.$t, $content = $('').html(content),
authorImage = json[i].author[0].gd$image.src.replace("/s220", "/w55-h55-p-k-no-nu"),
shortSummary = $content.text().substr(0, 110) + '...',
longSummary = $content.text().substr(0, 210) + '...';
if ('category' in json[i]) {
if (json[i].category[0].term !== undefined) {
var tag = json[i].category[0].term;
}
} else {
var tag = 'Uncategorized';
}
var getDate = json[i].published.$t,
y = getDate.substring(0, 4),
m = getDate.substring(5, 7),
d = getDate.substring(8, 10),
date = monthsName[parseInt(m, 10) - 1] + ' ' + d + ', ' + y;
var sort = '';
if (json[i].media$thumbnail) {
var src = json[i].media$thumbnail.url
} else {
src = noThumb;
}
if (content.indexOf(content.match(/