0&&!(t.isTime(n)&&n.attr("title"))){n.attr("title",r)}}return n.data("timeago")}function s(e){return t.inWords(o(e))}function o(e){return(new Date).getTime()-e.getTime()}e.timeago=function(t){if(t instanceof Date){return s(t)}else if(typeof t==="string"){return s(e.timeago.parse(t))}else if(typeof t==="number"){return s(new Date(t))}else{return s(e.timeago.datetime(t))}};var t=e.timeago;e.extend(e.timeago,{settings:{refreshMillis:6e4,allowPast:true,allowFuture:false,localeTitle:false,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"in a moment",seconds:"a few seconds",minute:"%d minute",minutes:"%d mins",hour:"%d hour",hours:"%d hrs",day:"%d day",days:"%d days",month:"month",months:"%d months",year:"%d year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(t){function l(r,i){var s=e.isFunction(r)?r(i,t):r;var o=n.numbers&&n.numbers[i]||i;return s.replace(/%d/i,o)}if(!this.settings.allowPast&&!this.settings.allowFuture){throw"timeago allowPast and allowFuture settings can not both be set to false."}var n=this.settings.strings;var r=n.prefixAgo;var i=n.suffixAgo;if(this.settings.allowFuture){if(t<0){r=n.prefixFromNow;i=n.suffixFromNow}}if(!this.settings.allowPast&&t>=0){return this.settings.strings.inPast}var s=Math.abs(t)/1e3;var o=s/60;var u=o/60;var a=u/24;var f=a/365;var c=s<45&&l(n.seconds,Math.round(s))||s<90&&l(n.minute,1)||o<45&&l(n.minutes,Math.round(o))||o<90&&l(n.hour,1)||u<24&&l(n.hours,Math.round(u))||u<42&&l(n.day,1)||a<30&&l(n.days,Math.round(a))||a<45&&l(n.month,1)||a<365&&l(n.months,Math.round(a/30))||f<1.5&&l(n.year,1)||l(n.years,Math.round(f));var h=n.wordSeparator||"";if(n.wordSeparator===undefined){h=" "}return e.trim([r,c,i].join(h))},parse:function(t){var n=e.trim(t);n=n.replace(/\.\d+/,"");n=n.replace(/-/,"/").replace(/-/,"/");n=n.replace(/T/," ").replace(/Z/," UTC");n=n.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");n=n.replace(/([\+\-]\d\d)$/," $100");return new Date(n)},datetime:function(n){var r=t.isTime(n)?e(n).attr("datetime"):e(n).attr("title");return t.parse(r)},isTime:function(t){return e(t).get(0).tagName.toLowerCase()==="time"}});var n={init:function(){var n=e.proxy(r,this);n();var i=t.settings;if(i.refreshMillis>0){this._timeagoInterval=setInterval(n,i.refreshMillis)}},update:function(n){var i=t.parse(n);e(this).data("timeago",{datetime:i});if(t.settings.localeTitle)e(this).attr("title",i.toLocaleString());r.apply(this)},updateFromDOM:function(){e(this).data("timeago",{datetime:t.parse(t.isTime(this)?e(this).attr("datetime"):e(this).attr("title"))});r.apply(this)},dispose:function(){if(this._timeagoInterval){window.clearInterval(this._timeagoInterval);this._timeagoInterval=null}}};e.fn.timeago=function(e,t){var r=e?n[e]:n.init;if(!r){throw new Error("Unknown function name '"+e+"' for timeago")}this.each(function(){r.call(this,t)});return this};document.createElement("abbr");document.createElement("time")});
// jquery replacetext plugin https://github.com/cowboy/jquery-replacetext
(function(e){e.fn.replaceText=function(t,n,r){return this.each(function(){var i=this.firstChild,s,o,u=[];if(i){do{if(i.nodeType===3){s=i.nodeValue;o=s.replace(t,n);if(o!==s){if(!r&&/d){var a=c[0].children("li:last")[0];a&&c.unshift(t("<"+r+"/>").appendTo(a))}else c.splice(0,Math.min(d-e,Math.max(c.length-1,0)));t("
").appendTo(c[0]).append(t("
").text(n.text()).attr("href","#"+n.attr("id"))),d=e})})},e=t.fn.toc;t.fn.toc=n,t.fn.toc.noConflict=function(){return t.fn.toc=e,this},t(function(){n.call(t("[data-toc]"))})}(window.jQuery);
! function(o) {
o.fn.lazyyard = function(n) {
return n = o.extend({
onScroll: !0
}, n), this.each(function(t, c, e) {
var r = o(this),
l = o(window),
a = r.attr("src"),
h = "w" + Math.round(r.width() + r.width() / 10) + "-h" + Math.round(r.height() + r.height() / 10) + "-p-k-no-nu";
function s() {
var o = new Image;
o.onload = function() {
r.attr('src', '' + this.src + '').addClass("lazy-yard")
}, o.src = t
}
a.match("resources.blogblog.com") && (a = "undefined" != typeof noThumbnail ? noThumbnail : "//1.bp.blogspot.com/-rI4UCIrwEI4/YN3nGkf0nCI/AAAAAAAAAD0/DQ6fW7eCps8NL7S0oh374KFg1MsWUf2GQCLcBGAsYHQ/s72-c/ptb-nth.png"), a.match("blogger.googleusercontent.com") && a.match("=") && (e = a.split("="), a = e[1] && "" != e[1].trim() ? e[0] + "=w72-h72-p-k-no-nu" : a), a.match("blogger.googleusercontent.com") && !a.match("=") && (a += "=w72-h72-p-k-no-nu"), t = a.match("/s72-c") ? a.replace("/s72-c", "/" + h) : a.match("/w72-h") ? a.replace("/w72-h72-p-k-no-nu", "/" + h) : a.match("=w72-h") ? a.replace("=w72-h72-p-k-no-nu", "=" + h) : a, 1 == n.onScroll ? l.on("load resize scroll", function o() {
l.scrollTop() + l.height() >= r.offset().top && (l.off("load resize scroll", o), s())
}).trigger("scroll") : l.on("load", function o() {
l.off("load", o), s()
}).trigger("load")
})
}
}(jQuery);
$(function() {
$('#main-menu').each(function() {
var iTms = $(this).find('.LinkList ul > li').children('a'),
iLen = iTms.length;
for (var i = 0; i < iLen; i++) {
var i1 = iTms.eq(i),
t1 = i1.text();
if (t1.charAt(0) !== '_') {
var i2 = iTms.eq(i + 1),
t2 = i2.text();
if (t2.charAt(0) === '_') {
var l1 = i1.parent();
l1.append('');
}
}
if (t1.charAt(0) === '_') {
i1.text(t1.replace('_', ''));
i1.parent().appendTo(l1.children('.sub-menu'));
}
}
for (var i = 0; i < iLen; i++) {
var i3 = iTms.eq(i),
t3 = i3.text();
if (t3.charAt(0) !== '_') {
var i4 = iTms.eq(i + 1),
t4 = i4.text();
if (t4.charAt(0) === '_') {
var l2 = i3.parent();
l2.append('');
}
}
if (t3.charAt(0) === '_') {
i3.text(t3.replace('_', ''));
i3.parent().appendTo(l2.children('.sub-menu2'));
}
}
$('#main-menu ul li ul').parent('li').addClass('has-sub');
$('#main-menu .widget').addClass('show-menu');
});
$('#main-menu-nav').clone().appendTo('.mobile-menu');
$('.mobile-menu .has-sub').append('');
$('.mobile-menu-toggle').on('click', function() {
$('body').toggleClass('nav-active');
$('.overlay').fadeToggle(170);
});
$('.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);
}
}
});
$('.Label a').attr('href', function($this, href) {
return href.replace(href, href + '?&max-results=' + postPerPage);
});
$('.index-post .post-image-link .post-thumb, .PopularPosts .post-image-link .post-thumb, .FeaturedPost .post-image-link .post-thumb').lazyyard();
$('abbr.timeago').timeago();
$('.avatar-image-container img').attr('src', function($this, i) {
i = i.replace('/s35-c/', '/s45-c/');
i = i.replace('//img1.blogblog.com/img/blank.gif', '//4.bp.blogspot.com/-uCjYgVFIh70/VuOLn-mL7PI/AAAAAAAADUs/Kcu9wJbv790hIo83rI_s7lLW3zkLY01EA/s55-r/avatar.png');
return i;
});
$('.author-description a').each(function() {
$(this).attr('target', '_blank');
});
$('.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 strike').each(function() {
var $this = $(this),
type = $this.text();
if (type.match('left-sidebar')) {
$this.replaceWith('');
}
if (type.match('right-sidebar')) {
$this.replaceWith('');
}
if (type.match('full-width')) {
$this.replaceWith('');
}
});
$('.featured-posts .widget-content').each(function() {
var $this = $(this),
text = $this.text().trim(),
type = text.toLowerCase(),
map = text.split('/'),
num = map[0],
label = map[1];
ajaxPosts($this, type, num, label);
});
$('.common-widget .widget-content').each(function() {
var $this = $(this),
text = $this.text().trim(),
type = text.toLowerCase(),
map = text.split('/'),
num = map[0],
label = map[1];
ajaxPosts($this, type, num, label);
});
$('.related-ready').each(function() {
var $this = $(this),
label = $this.find('.related-tag').data('label');
ajaxPosts($this, 'related', 3, label);
});
function post_link(feed, i) {
for (var x = 0; x < feed[i].link.length; x++)
if (feed[i].link[x].rel == 'alternate') {
var link = feed[i].link[x].href;
break
}
return link;
}
function post_title(feed, i, link) {
var n = feed[i].title.$t,
code = '
' + n + '';
return code;
}
function post_date(feed, i) {
var c = feed[i].published.$t,
d = c.substring(0, 4),
f = c.substring(5, 7),
m = c.substring(8, 10),
h = monthFormat[parseInt(f, 10) - 1] + ' ' + m + ', ' + d,
code = '
' + h + '';
return code;
}
function postThumb($c, img) {
var $h = $('
').html($c),
$t = $h.find('img:first').attr('src'),
$a = $t.lastIndexOf('/') || 0,
$b = $t.lastIndexOf('/', $a - 1) || 0,
$p0 = $t.substring(0, $b),
$p1 = $t.substring($b, $a),
$p2 = $t.substring($a);
if($p1.match(/\/s[0-9]+/g) || $p1.match(/\/w[0-9]+/g) || $p1 == '/d') {
$p1 = '/w72-h72-p-k-no-nu'
}
img = $p0 + $p1 + $p2;
return img
}
function FeatImage(feed, i, img) {
var $c = feed[i].content.$t;
if(feed[i].media$thumbnail) {
var src = feed[i].media$thumbnail.url
} else {
src = noThumbnail;
}
if($c.indexOf($c.match(/
';
} else if (type.match('related')) {
kontent += '
' + title + '
' + date + '
';
}
kode += kontent;
}
kode += '';
} else {
kode = '
';
} if (type.match('feat-big')) {
$this.html(kode).parent().addClass('show-widget');
} else {
$this.html(kode);
}
$this.find('.post-thumb').lazyyard();
}
});
}
}
$('.blog-post-comments').each(function() {
var system = commentsSystem,
disqus_url = disqus_blogger_current_url,
disqus = '',
current_url = $(location).attr('href'),
facebook = '',
sClass = 'comments-system-' + system;
if (system == 'blogger') {
$(this).addClass(sClass).show();
} else if (system == 'disqus') {
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqusShortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
$('#comments, #gpluscomments').remove();
$(this).append(disqus).addClass(sClass).show();
} else if (system == 'facebook') {
$('#comments, #gpluscomments').remove();
$(this).append(facebook).addClass(sClass).show();
} else if (system == 'hide') {
$(this).hide();
} else {
$(this).addClass('comments-system-blogger').show();
}
});
});
function shortCodeIfy(e, t, a) {
for(var s = e.split("$"), i = /[^{\}]+(?=})/g, r = 0; r < s.length; r++) {
var o = s[r].split("=");
if(o[0].trim() == t) return null != (a = o[1]).match(i) && String(a.match(i)).trim()
}
return !1
}
$(".post-body a").each(function() {
var e = $(this),
t = e.html(),
a = t.toLowerCase(),
s = shortCodeIfy(t, "text"),
i = shortCodeIfy(t, "icon"),
r = shortCodeIfy(t, "color");
a.match("getbutton") && 0 != s && (e.addClass("button btn").text(s), 0 != i && e.addClass(i), 0 != r && e.addClass("colored-button").attr("style", "background-color:" + r + ";"))
}),$(".post-body b").each(function() {
var e = $(this),
t = e.text(),
a = t.toLowerCase().trim();
a.match("{tocify}") && (t = 0 != shortCodeIfy(t, "title") ? shortCodeIfy(t, "title") : "Table of Contents", e.replaceWith('
'), $(".tocify-title").each(function(e) {
(e = $(this)).on("click", function() {
e.toggleClass("is-expanded"), $("#tocify").slideToggle(170)
})
}), $("#tocify").toc({
content: "#post-body",
headings: "h2,h3,h4"
}), $("#tocify li a").each(function(e) {
(e = $(this)).click(function() {
return $("html,body").animate({
scrollTop: ($(e.attr("href")).offset().top) - 20
}, 500), !1
})
})), a.match("{contactform}") && (e.replaceWith('
'), $(".contact-form").append($("#ContactForm1")))
}), $(".post-body blockquote").each(function() {
var e = $(this),
t = e.text().toLowerCase().trim(),
a = e.html();
if(t.match("{alertsuccess}")) {
const t = a.replace("{alertSuccess}", "");
e.replaceWith('
' + t + "
")
}
if(t.match("{alertinfo}")) {
const t = a.replace("{alertInfo}", "");
e.replaceWith('
' + t + "
")
}
if(t.match("{alertwarning}")) {
const t = a.replace("{alertWarning}", "");
e.replaceWith('
' + t + "
")
}
if(t.match("{alerterror}")) {
const t = a.replace("{alertError}", "");
e.replaceWith('
' + t + "
")
}
if(t.match("{codebox}")) {
const t = a.replace("{codeBox}", "");
e.replaceWith('
' + t + "
")
}
}), $("#post-body iframe").each(function() {
var e = $(this);
e.attr("src").match("www.youtube.com") && e.wrap('
')
})
//]]>