﻿var currency = "EUR";
(function(A) { A.fn.extend({ currency: function(B) { var C = { s: ",", d: ".", c: 2 }; C = A.extend({}, C, B); return this.each(function() { var D = (C.n || A(this).text()); D = (typeof D === "number") ? D : ((/\./.test(D)) ? parseFloat(D) : parseInt(D)), s = D < 0 ? "-" : "", i = parseInt(D = Math.abs(+D || 0).toFixed(C.c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; A(this).text(s + (j ? i.substr(0, j) + C.s : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + C.s) + (C.c ? C.d + Math.abs(D - i).toFixed(C.c).slice(2) : "")); return this }) } }) })(jQuery); jQuery.currency = function() { var A = jQuery("<span>").text(arguments[0]).currency(arguments[1]); return A.text() };
function ScrollTicker(c, a) { var b = 0; switch (c) { case 55: for (i = 1; i < 20; i++) { JP[i] += (Inc[i]); b += JP[i] } break; default: JP[c] += (Inc[c]); b = JP[c]; break } $_thisTicker = $("input[name=progressive" + c + "]"); var d = $.currency(b / 100); switch (a) { case "EURO": case "EUR": d = d + (String.fromCharCode(8364) + String.fromCharCode(32)); break; case "CAD": d = (String.fromCharCode(36) + String.fromCharCode(67) + String.fromCharCode(65) + String.fromCharCode(32)) + d; break; case "GBP": d = (String.fromCharCode(163) + String.fromCharCode(32)) + d; break; default: d = (String.fromCharCode(36) + String.fromCharCode(32)) + d; break } $_thisTicker.val(d); setTimeout(function() { ScrollTicker(c, a) }, 1250) }
$(document).ready(function() { try { if (($("input[name=progressive55]").length > 0) || ($("input[name^=progressive]").length > 0)) { $.ajax({ type: "GET", url: "http://www.tickerassist.co.uk/ProgressiveTickers/WebServiceProgressiveTickerScript.asmx/renderScript?form=json", success: function() { setTimeout(function() { if ($("input[name=progressive55]").length > 0) { ScrollTicker(55, currency) } for (var b = 1; b < 20; b++) { if ($("input[name=progressive" + b + "]").length > 0) { ScrollTicker(b, currency) } } }, 200) }, dataType: "script", cache: false }) } } catch (a) { } });
