}
if(r[3].toLowerCase() === posttitle) {
var img = new Array();
var posturl;
var category = '<a class="post-category" href="/search/label/'+e.feed.entry[i].category[0].term+'?max-results=7">'+e.feed.entry[i].category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
var trtd4 = '<div class="right-box-wrapper clearfix"><div class="right-box right1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(r[4].toLowerCase() === posttitle) {
var img = new Array();
var posturl;
var category = '<a class="post-category" href="/search/label/'+e.feed.entry[i].category[0].term+'?max-results=7">'+e.feed.entry[i].category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[i] = d;
var tmb = img[i].replace('s1600/','s500-c/');
var trtd5 = '<div class="right-box right2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
}
if(sliderTitle === "slider1") {
slider.html(trtd1 + trtd2 + trtd3 + trtd4 + trtd5);
}
if(sliderTitle === "slider2") {
slider.html(trtd3 + trtd1 + trtd2 + trtd4 + trtd5);
}
}
});
} else if(sliderContent.match("random")) {
$.ajax({
url: "/feeds/posts/default?alt=json-in-script",
type: "get",
dataType: "jsonp",
success: function (e) {
var entryLength = e.feed.entry.length,
a = entryLength - 5,
n = Math.floor(Math.random() * (a + 1));
$.ajax({
url: "/feeds/posts/default?alt=json-in-script&end-index=" + n + "",
type: "get",
dataType: "jsonp",
success: function (e) {
var img = new Array();
for (var i = 0; i < 5; i++) {
var entry = e.feed.entry[n+i];
var posttitle = entry.title.$t;
var posturl;
var category = '<a class="post-category" href="/search/label/'+entry.category[0].term+'?max-results=7">'+entry.category[0].term+'</a>';
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
posturl = entry.link[k].href;
break;
}
}
if ("content" in entry) {
var postcontent = entry.content.$t;
}
s = postcontent; a = s.indexOf("<img"); b = s.indexOf("src=\"",a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")) img[n] = d;
var tmb = img[n].replace('s1600/','s500-c/');
if(i===0) {
var trtd1 = '<div class="left-box-wrapper clearfix"><div class="left-box left1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===1) {
var trtd2 = '<div class="left-box left2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
if(i===2) {
var trtd3 = '<div class="center-box clearfix" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===3) {
var trtd4 = '<div class="right-box-wrapper clearfix"><div class="right-box right1" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div>';
}
if(i===4) {
var trtd5 = '<div class="right-box right2" style="background: url('+ tmb +') no-repeat center;background-size: cover">'+ category +'<a href="'+ posturl +'" class="slider-post-title"><h3 class="heading">'+ posttitle +'</h3></a></div></div>';
}
}
if(sliderTitle === "slider1") {
slider.html(trtd1 + trtd2 + trtd3 + trtd4 + trtd5);
}
if(sliderTitle === "slider2") {
slider.html(trtd3 + trtd1 + trtd2 + trtd4 + trtd5);
}
}
});
}
});
}
} else if(sliderTitle === "slider3" || sliderTitle === "slider4") {
if((sliderContent !== "random") && (sliderContent.charAt(0) !
Back to home |
File page
Subscribe |
Register |
Login
| N