var lteIE8, isPermalink, infiniteScroll, IOS;
(function($){$.fn.jTruncate=function(h){var i={length:300,minTrail:20,moreText:"more",lessText:"less",ellipsisText:"...",moreAni:"",lessAni:""};var h=$.extend(i,h);return this.each(function(){obj=$(this);var a=obj.html();if(a.length>h.length+h.minTrail){var b=a.indexOf(' ',h.length);if(b!=-1){var b=a.indexOf(' ',h.length);var c=a.substring(0,b);var d=a.substring(b,a.length-1);obj.html(c+''+h.ellipsisText+''+''+d+'');obj.find('.truncate_more').css("display","none");obj.append('
');var e=$('.truncate_more_link',obj);var f=$('.truncate_more',obj);var g=$('.truncate_ellipsis',obj);e.click(function(){if(e.text()==h.moreText){f.show(h.moreAni);e.text(h.lessText);g.css("display","none")}else{f.hide(h.lessAni);e.text(h.moreText);g.css("display","inline")}return false})}}})}})(jQuery);
(function(a, b) {
var e, f, d = b.event;
"use strict";
d.special.smartresize = {
setup: function() {
b(this).bind("resize", d.special.smartresize.handler);
},
teardown: function() {
b(this).unbind("resize", d.special.smartresize.handler);
},
handler: function(a, c) {
var d = this, f = arguments;
a.type = "smartresize", e && clearTimeout(e), e = setTimeout(function() {
b.event.handle.apply(d, f);
}, c === "execAsap" ? 0 : 100);
}
}, b.fn.smartresize = function(a) {
return a ? this.bind("smartresize", a) : this.trigger("smartresize", [ "execAsap" ]);
}, b.Mason = function(a, c) {
this.element = b(c), this._create(a), this._init();
}, b.Mason.settings = {
isResizable: !0,
isAnimated: !1,
animationOptions: {
queue: !1,
duration: 500
},
gutterWidth: 0,
isRTL: !1,
isFitWidth: !1,
containerStyle: {
position: "relative"
}
}, b.Mason.prototype = {
_filterFindBricks: function(a) {
var b = this.options.itemSelector;
return b ? a.filter(b).add(a.find(b)) : a;
},
_getBricks: function(a) {
var b = this._filterFindBricks(a).css({
position: "absolute"
}).addClass("masonry-brick");
return b;
},
_create: function(c) {
var d, e, f, g;
this.options = b.extend(!0, {}, b.Mason.settings, c), this.styleQueue = [];
d = this.element[0].style;
this.originalStyle = {
height: d.height || ""
};
e = this.options.containerStyle;
for (f in e) this.originalStyle[f] = d[f] || "";
this.element.css(e), this.horizontalDirection = this.options.isRTL ? "right" : "left", this.offset = {
x: parseInt(this.element.css("padding-" + this.horizontalDirection), 10),
y: parseInt(this.element.css("padding-top"), 10)
}, this.isFluid = this.options.columnWidth && typeof this.options.columnWidth == "function";
g = this;
setTimeout(function() {
g.element.addClass("masonry");
}, 0), this.options.isResizable && b(a).bind("smartresize.masonry", function() {
g.resize();
}), this.reloadItems();
},
_init: function(a) {
this._getColumns(), this._reLayout(a);
},
option: function(a) {
b.isPlainObject(a) && (this.options = b.extend(!0, this.options, a));
},
layout: function(a, b) {
var c, d, e, f, g, h, i;
for (c = 0, d = a.length; c < d; c++) this._placeBrick(a[c]);
e = {};
e.height = Math.max.apply(Math, this.colYs);
if (this.options.isFitWidth) {
f = 0;
c = this.cols;
while (--c) {
if (this.colYs[c] !== 0) break;
f++;
}
e.width = (this.cols - f) * this.columnWidth - this.options.gutterWidth;
}
this.styleQueue.push({
$el: this.element,
style: e
});
g = this.isLaidOut ? this.options.isAnimated ? "animate" : "css" : "css", h = this.options.animationOptions;
for (c = 0, d = this.styleQueue.length; c < d; c++) i = this.styleQueue[c], i.$el[g](i.style, h);
this.styleQueue = [], b && b.call(a), this.isLaidOut = !0;
},
_getColumns: function() {
var a = this.options.isFitWidth ? this.element.parent() : this.element, b = a.width();
this.columnWidth = this.isFluid ? this.options.columnWidth(b) : this.options.columnWidth || this.$bricks.outerWidth(!0) || b, this.columnWidth += this.options.gutterWidth, this.cols = Math.floor((b + this.options.gutterWidth) / this.columnWidth), this.cols = Math.max(this.cols, 1);
},
_placeBrick: function(a) {
var e, f, g, h, i, j, k, l, m, n, o, c = b(a), d = Math.ceil(c.outerWidth(!0) / this.columnWidth);
d = Math.min(d, this.cols);
if (d === 1) f = this.colYs; else {
e = this.cols + 1 - d, f = [];
for (h = 0; h < e; h++) g = this.colYs.slice(h, h + d), f[h] = Math.max.apply(Math, g);
}
i = Math.min.apply(Math, f), j = 0;
for (k = 0, l = f.length; k < l; k++) if (f[k] === i) {
j = k;
break;
}
m = {
top: i + this.offset.y
};
m[this.horizontalDirection] = this.columnWidth * j + this.offset.x, this.styleQueue.push({
$el: c,
style: m
});
n = i + c.outerHeight(!0), o = this.cols + 1 - l;
for (k = 0; k < o; k++) this.colYs[j + k] = n;
},
resize: function() {
var a = this.cols;
this._getColumns(), (this.isFluid || this.cols !== a) && this._reLayout();
},
_reLayout: function(a) {
var b = this.cols;
this.colYs = [];
while (b--) this.colYs.push(0);
this.layout(this.$bricks, a);
},
reloadItems: function() {
this.$bricks = this._getBricks(this.element.children());
},
reload: function(a) {
this.reloadItems(), this._init(a);
},
appended: function(a, b, c) {
var d;
if (b) {
this._filterFindBricks(a).css({
top: this.element.height()
});
d = this;
setTimeout(function() {
d._appended(a, c);
}, 1);
} else this._appended(a, c);
},
_appended: function(a, b) {
var c = this._getBricks(a);
this.$bricks = this.$bricks.add(c), this.layout(c, b);
},
remove: function(a) {
this.$bricks = this.$bricks.not(a), a.remove();
},
destroy: function() {
var c, d;
this.$bricks.removeClass("masonry-brick").each(function() {
this.style.position = "", this.style.top = "", this.style.left = "";
});
c = this.element[0].style;
for (d in this.originalStyle) c[d] = this.originalStyle[d];
this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"), b(a).unbind(".masonry");
}
}, b.fn.imagesLoaded = function(a) {
var e, f, g, h, i;
function c() {
a.call(e, f);
}
function d(a) {
var e = a.target;
e.src !== h && b.inArray(e, i) === -1 && (i.push(e), --g <= 0 && (setTimeout(c), f.unbind(".imagesLoaded", d)));
}
e = this, f = e.find("img").add(e.filter("img")), g = f.length, h = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==", i = [];
return g || c(), f.bind("load.imagesLoaded error.imagesLoaded", d).each(function() {
var a = this.src;
this.src = h, this.src = a;
}), e;
};
f = function(b) {
a.console && a.console.error(b);
};
b.fn.masonry = function(a) {
var c;
if (typeof a == "string") {
c = Array.prototype.slice.call(arguments, 1);
this.each(function() {
var d = b.data(this, "masonry");
if (!d) {
f("cannot call methods on masonry prior to initialization; attempted to call method '" + a + "'");
return;
}
if (!b.isFunction(d[a]) || a.charAt(0) === "_") {
f("no such method '" + a + "' for masonry instance");
return;
}
d[a].apply(d, c);
});
} else this.each(function() {
var c = b.data(this, "masonry");
c ? (c.option(a || {}), c._init()) : b.data(this, "masonry", new b.Mason(a, this));
});
return this;
};
})(window, jQuery);
lteIE8 = $("html").is(".lte-ie8") ? true : false;
isPermalink = typeof isPermalink === "undefined" ? false : true;
infiniteScroll = typeof infiniteScroll === "undefined" ? false : true;
IOS = navigator.platform == "iPad" || navigator.platform == "iPhone" || navigator.platform == "iPod" ? true : false;
(function(a) {
function b(b, d) {
var e = b ? b : a(".post:not(.loaded)");
e.each(function() {
var i, j, k, m, n, o, p, q, r, b = a(this), e = b.attr("id").split("-")[1];
if (b.hasClass("type-photo")) {
g(b);
}
if (b.hasClass("type_audio")) {
if (!IOS) {
if (d) {
i = b.find(".post_audio_player_ui").css("visibility", "hidden");
j = b.find(".js-string").html();
k = /\\x3cembed.+\\x3c\/embed\\x3e/;
m = j.match(k)[0].replace(/\\x3cembed/, '