﻿function loadBlogger() { $("#posts").empty(); var a = 55; var b = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); $.getJSON("http://jblackstone.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&max-results=4&callback=?", function(c) { $.each(c.feed.entry, function(d, e) { if (c.feed.openSearch$totalResults.$t > 0) { var f = e.title.$t; var g = e.content.$t; var h = /<\S[^>]*>/g; g = g.replace(h, ""); if (g.length > a) g = g.substring(0, a); var i = e.published.$t.substring(0, 10); var j = i.substring(0, 4); var k = i.substring(5, 7); var l = i.substring(8, 10); var m = $("<div class='divblogdate'></div>"); $("<div class='monthbg'></div>").html(b[parseInt(k, 10) - 1]).appendTo(m); $("<div class='datebg'></div>").html(l).appendTo(m); m.appendTo("#posts"); $.each(e.link, function(a, b) { if (b.rel == "alternate") { var c = $("<div class='divbloglink'></div>"); $("<a class='bloglink'></a>").html(f).attr("href", b.href).appendTo(c); $("<br /><br />").appendTo(c); c.appendTo("#posts") } }) } else { $("#posts").html("<h5>No Posts Found!</h5>") } }); $("<li></li>").html('<a class="more" href="http://jblackstone.blogspot.com" target="_blank">Read More...</a>').appendTo("#posts") }) } function getFeedList(a) { var b = $("#resultsFeeds"); $(b).empty(); var c = $("#listFeeds"); var d = "select * from rss(5) where url='" + c.val() + "'"; $.getJSON("http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(d) + "&format=json&callback=?", function(d) { $.each(d.query.results, function(d, e) { for (i = 0; i < e.length; i++) { var f = e[i]; var g = f.title; var h = ""; if (g.length >= a) { h = " ... " } $("<li></li>").html('<a target="_blank" href="' + f.link + '">' + f.title.substring(0, a) + h + "</a>").appendTo(b) } $("<li></li>").html('<a class="more" href="' + c.val() + '" target="_blank">Read More...</a>').appendTo(b) }) }) } function getFeed() { var a = "select * from rss(8) where url='" + url + "'"; $.getJSON("http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(a) + "&format=json&callback=?", function(a) { $.each(a.query.results, function(a, b) { list = $('<ul class="news"></ul>'); for (i = 0; i < b.length; i++) { var c = b[i]; $("<li></li>").html('<a target="_blank" href="' + c.link + '">' + c.title + "</a>").appendTo(list) } $("<li></li>").html('<br /><a class="more" href="' + fUrl + '" target="_blank">Read More...</a>').appendTo(list); $(loc).html(list) }) }) } function showTestimonials(a) { jQuery.each(testimonials.comment, function(b, c) { var d = c.text; var e = c.from; var f = c.fromHref; var g = new Date(c.timestamp); var h = $("<li />"); var i = ""; if (d.length >= a) { i = " ... " } $("<div />").addClass("body").html(d.substring(0, a) + i).appendTo(h); $("<div />").addClass("footer").html('-- <a href="' + f + '">' + e + "</a><br />" + g.toLocaleDateString()).appendTo(h); $(h).appendTo("#testimonials") }); startTicker("#testimonials", 1, 4e3) } function validateEmail(a) { var b = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; return b.test(a) } var root = location.protocol + "//" + location.host; (function(a) { a.fn.jHover = function(b) { var c = { opacity: "0.6", cursor: "pointer" }; var b = a.extend(c, b); a(this).hover(function() { a(this).css("opacity", c.opacity).css("cursor", c.cursor) }, function() { a(this).css("opacity", "1.0") }) } })(jQuery)





