Fence City: Do-it-yourself Fence Installation Instructions

‘);
$(‘#recentPost2’).html(‘

‘+data.posts[1].title+’

‘);
$(‘#recentPost3’).html(‘

‘+data.posts[2].title+’

‘);
$(‘#recentPost4’).html(‘

‘+data.posts[3].title+’

‘);
$(‘#recentPost5’).html(‘

‘+data.posts[4].title+’

‘);
});

$promoHD = $(“#promoHeadline”);
$promoTop = $(“#promoText1”);
$promoBtm = $(“#promoText3”);
$promoLink = $(“#promoLink”)
$promoBack = $(“#promoBack”);

var currentPosition = 0;

var promotions = [];

promotions[0] = {

src: ‘/common/images/promo-back-pool.png’,

top: ‘Use code: ThinkSpring19’,

hd: ‘Swimming Pool Fence 20% OFF’,

bottom: ‘Great Time to Save $$$’,

url: ‘aluminum_fence’

};
promotions[1] = {

src: ‘/common/images/promo-back-grass.png’,

top: ‘Use code: ThinkSpring19’,

hd: ‘ALL ALUMINUM FENCE 20% OFF’,

bottom: ‘Largest Sale of the Season’,

url: ‘aluminum_fence’

};
promotions[2] = {

src: ‘/common/images/promo-back-grass-sky.png’,

top: ‘Use code: ThinkSpring19’,

hd: ‘Save 20% on Aluminum Fence’,

bottom: ‘Great Time to Save $$$’,

url: ‘aluminum_fence’

};
promotions[3] = {

src: ‘/common/images/promo-back-grass-sky.png’,

top: ‘Use Code: ThinkSpring19’,

hd: ‘ULTRA ALUMINUM FENCE 20% OFF’,

bottom: ‘Largest Sale of the Season’,

url: ‘aluminum_fence’

};

function switchAD () {

$promoHD.html(promotions[currentPosition].hd);
$promoTop.html(promotions[currentPosition].top);
$promoBtm.html(promotions[currentPosition].bottom);
if (promotions[currentPosition].url === “”) {
$promoLink.attr(“href”,”/default.asp”);
} else {
$promoLink.attr(“href”,”/” + promotions[currentPosition].url);
}
if (promotions[currentPosition].src === “”) {
$promoBack.attr(“src”,”/common/images/side-banner.gif”);
} else {
$promoBack.attr(“src”,promotions[currentPosition].src);
}

if (currentPosition === promotions.length -1) {
currentPosition = 0;
} else {
currentPosition++;
}

}

if (promotions.length > 0) {

switchAD();
currentPosition = 1;

setInterval(switchAD,8000);

} else {
$(“#promo”).hide();
}

});

Source

Leave a Comment