﻿function RenderPaymentMethods() { 
var i = 0;

$(".payment").find("li").each(function(){ 

var title = $(this).text();
$(this).text('');

var myBackground = "/images/payment-methods/boxy/" + $(this).attr("id").replace("pm","") + ".jpg";
$(this).css("background", "url(" + myBackground + ") no-repeat");
$(this).css("display","block");
$(this).addClass("paymentitem");
$(this).attr("title",title);
i++;

if (i % 2 == 0) { $(this).css("margin-left","11px"); }
if (i % 3 == 0) { $(this).css("margin-left","11px"); }
if (i % 4 == 0) { $(this).css("margin-left","0px"); }

});

}

$(function() {
$("#newsletter div").html("Click here to receive Live Sports Direct's regular newsletter for information on promotional offers and special deals for fans of the sportsbook written in the trademarked LSPD style. <span style='color:#2b7abf;font-weight:bold;'>[coming soon]</span>");
$(".newsletter").find("a").prepend('<span class="nlsb" title="Click here for more details on subscribing to our newsletter"></span>')
$("#newsletter div").hover(function() { $(this).addClass("over");}, function() { $(this).removeClass("over"); }); 
$(".related li").hover(function() { $(this).addClass("over");}, function() { $(this).removeClass("over"); }); 
$(".related li").each(function() { $(this).click(function() { n($(this).find("a").attr("href"));  }); });
$("#article .logo").click(function() { nB("/link/" + $("#article").attr("data-itemid")); });

var MyVisitText = "Click here to visit";
var MyVisitURL = $("#visit").attr("data-url");
if (MyVisitURL != null)
if (MyVisitURL != "") MyVisitText = 'Click here to Bet Now at <div style="color:#0e539a;margin-top:5px;">' + MyVisitURL + '</div>';

$("#visit h3").append('<a href="/link/' + $("#article").attr("data-itemid") + '" target="_blank" class="visit" title="Click to visit this site now">' + MyVisitText + '</a>');

$("#newsletter div").click(function() { n('/newsletter/'); }); 
RenderPaymentMethods();
});

