function formatCurrency(t) {
return t = isNaN(t) || "" === t || null === t ? 0 : t,
parseFloat(t).toFixed(2)
}
(function() {
var t, n, e, s, r = function(t, n) {
return function() {
return t.apply(n, arguments)
}
}, i = Object.prototype.hasOwnProperty, a = function(t, n) {
function e() {
this.constructor = t
}
for (var s in n)
i.call(n, s) && (t[s] = n[s]);
return e.prototype = n.prototype,
t.prototype = new e,
t.__super__ = n.prototype,
t
};
t = jQuery,
t.fn.ticker = function(r) {
var i, a, o, p;
if ("function" == typeof String.prototype.trim) {
for (p = [],
a = 0,
o = this.length; o > a; a++)
i = this[a],
i = t(i),
i.hasClass("tick-flip") ? p.push(new e(t(i),r)) : i.hasClass("tick-scroll") ? p.push(new s(t(i),r)) : i.hasClass("tick-custom-scroll") ? p.push(new Tick_Custom_Scroll(t(i),r)) : p.push(new n(i,r));
return p
}
}
,
n = function() {
function n(t, n) {
this.element = t,
null == n && (n = {}),
this.running = !1,
this.options = {
delay: n.delay || 1e3,
separators: null != n.separators ? n.separators : !1,
autostart: null != n.autostart ? n.autostart : !0
},
this.increment = this.build_increment_callback(n.incremental),
this.value = Number(this.element.html().replace(/[^\d]/g, "")),
this.separators = this.element.html().trim().split(/[\d]/i),
this.element.addClass("tick-active"),
this.options.autostart && this.start()
}
return n.prototype.build_increment_callback = function(t) {
return null != t && "[object Function]" === {}.toString.call(t) ? t : "number" == typeof t ? function(n) {
return n + t
}
: function(t) {
return t + 1
}
}
,
n.prototype.render = function() {
var t, n, e, s, r, i, a;
if (e = String(this.value).split(""),
n = this.element.children(":not(.tick-separator)"),
e.length !== n.length)
for (s = 0,
i = e.length - n.length; i >= 0 ? i > s : s > i; i >= 0 ? s++ : s--)
this.options.separators && this.separators[s] && this.build_separator(this.separators[s]),
n.push(this.build_container(s, i - 1));
for (a = [],
s = 0,
r = n.length; r > s; s++)
t = n[s],
a.push(this.update_container(t, e[s], s, r - 1));
return a
}
,
n.prototype.build_container = function() {
return t("").appendTo(this.element)
}
,
n.prototype.build_separator = function(n) {
return t("" + n + "").appendTo(this.element)
}
,
n.prototype.update_container = function(n, e) {
return t(n).html(e)
}
,
n.prototype.refresh_delay = function(t) {
return clearTimeout(this.timer),
this.options.delay = t,
this.set_timer()
}
,
n.prototype.set_timer = function() {
var t = this;
return this.running ? this.timer = setTimeout(function() {
return t.tick()
}, this.options.delay) : void 0
}
,
n.prototype.tick = function() {
return this.value = this.increment(this.value),
this.render(),
this.set_timer()
}
,
n.prototype.start = function() {
return this.element.empty(),
this.render(),
this.running = !0,
this.set_timer()
}
,
n.prototype.stop = function() {
return clearTimeout(this.timer),
this.running = !1
}
,
n
}(),
e = function(n) {
function e() {
this.lower = r(this.lower, this),
e.__super__.constructor.apply(this, arguments)
}
return a(e, n),
e.prototype.build_container = function(n) {
var e;
return e = String(this.value).split("")[n],
t(" " + e + " " + e + " " + e + " ").appendTo(this.element)
}
,
e.prototype.flip = function(t, n, e, s, r) {
return t.css({
borderSpacing: 100
}),
t.stop(!0, !0).addClass("tick-moving").animate({
borderSpacing: 0
}, {
duration: s,
easing: "easeInCubic",
step: function(n) {
var s;
return s = e(n),
t.css({
"-webkit-transform": "scaleY(" + s + ")",
"-moz-transform": "scaleY(" + s + ")",
"-ms-transform": "scaleY(" + s + ")",
"-o-transform": "scaleY(" + s + ")",
transform: "scaleY(" + s + ")"
})
},
complete: function() {
return t.html(n).css({
borderSpacing: "",
"-webkit-transform": "",
"-moz-transform": "",
"-ms-transform": "",
"-o-transform": "",
transform: ""
}).removeClass("tick-moving"),
r()
}
})
}
,
e.prototype.upper = function(t) {
return t / 100
}
,
e.prototype.lower = function(t) {
return 1 - this.upper(t)
}
,
e.prototype.update_container = function(n, e) {
var s;
return s = t(n).children(),
this.running && s.eq(2).html() !== e && (this.flip(s.eq(1), e, this.upper, this.options.delay / 4, function() {}),
this.flip(s.eq(3).html(e), e, this.lower, this.options.delay / 3, function() {
return s.eq(0).html(e)
})),
s.eq(2).html(e)
}
,
e
}(n),
s = function(n) {
function e() {
e.__super__.constructor.apply(this, arguments)
}
return a(e, n),
e.prototype.build_container = function() {
return t('0123456789').appendTo(this.element)
}
,
e.prototype.update_container = function(n, e) {
return this.running ? t(n).animate({
top: -96 * e
}, this.options.delay) : t(n).css({
top: -96 * e
})
}
,
e
}(n),
Tick_Custom_Scroll = function(n) {
function e() {
e.__super__.constructor.apply(this, arguments)
}
var s;
return a(e, n),
e.prototype.build_container = function(n, e) {
return n === e ? t(' 09876543210').appendTo(this.element) : t("").appendTo(this.element)
}
,
e.prototype.update_container = function(n, e, r, i) {
var a = this
, e = +e;
if (s = s || parseInt(t(n).css("line-height")),
!this.running)
return r === i ? t(n).find(".inner-tick-scroll").css({
bottom: e * -s
}) : t(n).html(e);
if (r === i) {
var o = t(n).find(".inner-tick-scroll");
o.is(":animated") && o.stop(!0);
var p = a.options.delay
, c = parseInt(o.css("bottom"))
, u = Math.abs(c / s) % 10
, l = e > u
, h = (l ? e - u : e + 10 - u) * s
, m = h / p;
l ? o.animate({
bottom: -e * s
}, {
duration: p,
easing: "linear"
}) : o.animate({
bottom: -10 * s
}, {
duration: Math.abs((-10 * s - c) / m),
easing: "linear",
complete: function() {
t(this).css("bottom", 0),
a.incrementPrev(t(n))
}
}).animate({
bottom: -e * s
}, {
duration: e * s / m,
easing: "linear"
})
}
}
,
e.prototype.incrementPrev = function(t) {
var n = this.getPrev(t);
if (n.length) {
var e = +n.text() + 1;
e > 9 ? (n.text(0),
this.incrementPrev(n)) : n.text(e)
}
}
,
e.prototype.getPrev = function(t) {
var n = t.prev();
return n.length && n.is(".tick-separator") && (n = this.getPrev(n)),
n
}
,
e
}(n)
}
).call(this);
var random_generator = function(t, n) {
return Math.random() * (n - t) + t
};
$(document).ready(function() {
$("a[rel^='prettyPhoto']").prettyPhoto({show_title:false, social_tools:false, deeplinking: false});
$('.tick').text("R200,309,339.67");
var TickerInt=1;
$(".tick").ticker({
incremental: TickerInt,
delay: 1e3,
separators: !0
});
var t = $("h3").length;
2 >= t && $("h3").each(function() {
$(this).addClass("active").next("div").css("display", "block")
}),
console.log(t)
});