/*Name : TweeCool
*version: 1.9
*Description: Get the latest tweets from twitter.
*Website: www.tweecool.com
*Licence: No licence, feel free to do whatever you want.
*Author: TweeCool
*/
!function (t) { t.fn.extend({ tweecool: function (e) { function a(t) { var e = new Date, a = Date.parse(e), r = 1e3 * t, i = (a - r) / 1e3, o = 1, n = 60, s = 3600, _ = 86400, l = 604800, c = 2592e3, u = 31536e3; return i > o && n > i ? Math.round(i / o) + " second" + (Math.round(i / o) > 1 ? "s" : "") + " ago" : i >= n && s > i ? Math.round(i / n) + " minute" + (Math.round(i / n) > 1 ? "s" : "") + " ago" : i >= s && _ > i ? Math.round(i / s) + " hour" + (Math.round(i / s) > 1 ? "s" : "") + " ago" : i >= _ && l > i ? Math.round(i / _) + " day" + (Math.round(i / _) > 1 ? "s" : "") + " ago" : i >= l && c > i ? Math.round(i / l) + " week" + (Math.round(i / l) > 1 ? "s" : "") + " ago" : i >= c && u > i ? Math.round(i / c) + " month" + (Math.round(i / c) > 1 ? "s" : "") + " ago" : "over a year ago" } var r = { username: "tweecool", limit: 5, profile_image: !0, show_time: !0, show_media: !1, show_media_size: "thumb", show_actions: !1, action_reply_icon: "↵", action_retweet_icon: "∝", action_favorite_icon: "❤", profile_img_url: "profile", show_retweeted_text: !1 }, e = t.extend(r, e); return this.each(function () { var r, i, o, n, s, _ = e, l = t(this), c = t("
").appendTo(l), u = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, h = /@+(\w+)/gi, w = /#+(\w+)/gi; t.getJSON("http://www.framework-y.com/tweecool/index.php/api/" + _.username + "/" + _.limit, function (e) { return e.errors || null == e ? (l.html("No tweets available."), !1) : void t.each(e.tweets, function (t, l) { r = _.profile_image ? "tweet" == _.profile_img_url ? '
' : '
' : "", o = _.show_time ? a(l.timestamp) : "", i = _.show_media && l.media_url ? '
' : "", _.show_actions ? (n = '") : n = "", s = _.show_retweeted_text && l.retweeted_text ? l.retweeted_text : l.text, c.append("- " + r + '
") }) }).fail(function (t, e, a) { l.html("No tweets available") }) }) } }) }(jQuery);
/*
* Facebook Wall
* https://github.com/thomasclausen/jquery-facebook-wall
* Under MIT License
*/
!function (e) { e.fn.facebook_wall = function (t) { function s(e) { return a(i(l(e))) } function a(e) { return e.replace(/(\r\n)|(\n\r)|\r|\n/g, "
") } function i(e) { return e.replace(/((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g, '$1') } function l(e) { return e.replace(//g, ">") } function n(e) { var s = new Date(1e3 * e), a = (s.toGMTString(), Math.round((new Date).getTime() / 1e3) - e); return a < 10 ? t.text_labels.seconds.few : a < 60 ? Math.round(a) + t.text_labels.seconds.plural : 1 === Math.round(a / 60) ? Math.round(a / 60) + t.text_labels.minutes.singular : Math.round(a / 60) < 60 ? Math.round(a / 60) + t.text_labels.minutes.plural : 1 === Math.round(a / 3600) ? Math.round(a / 3600) + t.text_labels.hours.singular : Math.round(a / 3600) < 24 ? Math.round(a / 3600) + t.text_labels.hours.plural : 1 === Math.round(a / 86400) ? Math.round(a / 86400) + t.text_labels.days.singular : Math.round(a / 86400) <= 10 ? Math.round(a / 86400) + t.text_labels.days.plural : t.text_labels.weekdays[s.getDay()] + " " + s.getDate() + ". " + t.text_labels.months[s.getMonth()] + " " + s.getFullYear() } if (void 0 !== t.id && void 0 !== t.access_token) { var o = "https://graph.facebook.com/", r = (t = e.extend({ id: "", access_token: "", limit: 15, timeout: 400, speed: 400, effect: "slide", locale: "en_US", avatar_size: "square", message_length: 200, comments: !0, show_guest_entries: !0, text_labels: { shares: { singular: "Shared % time", plural: "Shared % times" }, likes: { singular: "% Like", plural: "% Likes" }, comments: { singular: "% comment", plural: "% comments" }, like: "Like", comment: "Write comment", share: "Share", weekdays: ["Sunday", "Monday", "Thuesday", "Wednesday", "Thursday", "Friday", "Saturday"], months: ["januari", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"], seconds: { few: "second ago", plural: " seconds ago" }, minutes: { singular: " minut ago", plural: " minutes ago" }, hours: { singular: " hour ago", plural: " hours ago" }, days: { singular: " day ago", plural: " days ago" } }, on_complete: null }, t)).comments ? "comments," : "", d = o + "v2.9/" + t.id + "/?access_token=" + t.access_token + "&locale=" + t.locale + "&date_format=U&fields=posts.limit(" + t.limit + "){caption,message,picture,from,link,source,properties,icon,actions,is_hidden,is_expired,likes," + r + "shares,status_type,object_id,created_time,updated_time,type}", c = e(this); c.append(''), e.getJSON(d, function (a) { e.each(a.posts.data, function () { var e = "", a = "", i = ""; if (!1 === this.is_hidden) { if ("link" === this.type ? a = "type-link " : "photo" === this.type ? a = "type-photo " : "status" === this.type ? a = "type-status " : "video" === this.type && (a = "type-video "), e += '- ', e += '", void 0 !== this.message ? t.message_length > 0 && this.message.length > t.message_length ? e += '
' + s(this.message.substring(0, t.message_length)) + "...
" : e += '' + s(this.message) + "
" : void 0 !== this.story && (t.message_length > 0 && this.story.length > t.message_length ? e += '' + s(this.story.substring(0, t.message_length)) + "...
" : e += '' + s(this.story) + "
"), "link" !== this.type && "photo" !== this.type && "video" !== this.type || (e += '"), e += '", void 0 !== this.likes && void 0 !== this.likes.data) { e += ''; for (var l = 0; l < this.likes.data.length; l++) e += '- ', e += '", e += "
"; e += "
" } if (void 0 !== this.comments && void 0 !== this.comments.data) { e += '" } e += " ", c.append(e) } }) }).done(function () { e(".facebook-loading", c).fadeOut(800, function () { e(this).remove(); for (var s = 0; s < c.children("li").length; s++) "none" === t.effect ? c.children("li").eq(s).show() : "fade" === t.effect ? c.children("li").eq(s).delay(s * t.timeout).fadeIn(t.speed) : c.children("li").eq(s).delay(s * t.timeout).slideDown(t.speed, function () { e(this).css("overflow", "visible") }) }), e.isFunction(t.on_complete) && t.on_complete.call() }) } } }(jQuery);
/*
* ===========================================================
* SOCIAL STREAM - FRAMEWORK Y
* ===========================================================
* Social stream of Facebook and Twitter, this script have 4 display types: simple list, scroll box container, slider and carousel
* The script require Flexslider for slider and carousel display type and Scroll box for scroll box display type
* Documentation: www.framework-y.com/components/social.html
*
* Pixor - Copyright (c) Federico Schiocchet - Pixor - Framework Y
*/
var facebook_token = "468579063493515|vbOM4x_ROvDmC_03g3iI-KXqYA0"; !function (t) { t(document).ready(function () { t("*[data-social-id].social-feed-fb").each(function () { var i = this, a = 4, e = t(i).attr("data-options"), s = t(i).attr("data-social-id"), l = t(i).attr("data-token"); isEmpty(l) && (l = facebook_token); var n, o = { access_token: l, limit: a, locale: "en_US", show_guest_entries: !1 }; if (isEmpty(e) || (n = e.split(","), o = getOptionsString(e, o)), isEmpty(s) || (o.id = s), t(i).facebook_wall(o), t(i).hasClass("flexslider")) { var r; r = self.setInterval(function () { t(i).find("li.post").length == o.limit && 0 == t(i).find(".facebook-loading").length && (t(i).html(""), t(i).find("li").each(function (i) { t(this).html("" + t(this).html() + "
") }), isEmpty(t(i).attr("data-trigger")) && t(i).initFlexSlider(), t(i).css("opacity", 1), clearInterval(r)) }, 1e3) } }), t("*[data-social-id].social-feed-tw").each(function () { var i, a = this, e = t(a).attr("data-options"), s = t(a).attr("data-social-id"), l = { limit: 4, show_media: !0 }; if (isEmpty(e) || (i = e.split(","), l = getOptionsString(e, l)), isEmpty(s) || (l.username = s), t(a).tweecool(l), t(a).hasClass("flexslider")) { var n; n = self.setInterval(function () { t(a).find("ul li").length && (isEmpty(t(a).attr("data-trigger")) && t(a).initFlexSlider(), clearInterval(n)) }, 1300) } }) }) }(jQuery);