|
|
|
| |
IBT: Platinum price outlook mixed |
|
| |
Platinum price outlook mixed
var lastMouseOverDtm = new Date();
var ajaxSpotPricesTimer = null;
var chartRefreshTimer = null;
var metalSymbols = new Array("Gg", "Xg", "Pg", "Pl");
$(document).ready(function() {
$(document).mouseover(function() {lastMouseOverDtm = new Date(); });
gm_js_initSpotPriceAjax();
gm_js_initChartRefresh();
});
function gm_js_initSpotPriceAjax() {
$("#spot-price-animation").css("visibility", "hidden");
var ajaxSpotPricesTimer = setTimeout(gm_js_GetSpotPrices, 25000);
}
function gm_js_GetSpotPrices() {
clearTimeout(ajaxSpotPricesTimer);
var now = new Date();
if ((now.getTime() - lastMouseOverDtm.getTime()) < (1000 * 60 * 600)) {
$("#spot-price-animation").css("visibility", "visible");
$("#spot-price-animation").css("opacity", "0");
$("#spot-price-animation").fadeTo("slow", 1);
var timeoutAnimation = setTimeout(gm_js_stopAnimation, 1200);
$.getJSON("/ajax/gm_getSpotPrices.php?select_pcu=" + $("#currency_code").val() + "&d=" + now.getTime(), function(data) {
$("#spot-price-gold-base").html(data.goldBase);
$("#spot-price-gold-oz").html(data.goldOz);
gm_js_setTrendImage("gold", data.goldTrend);
$("#spot-price-silver-g").html(data.silverG);
$("#spot-price-silver-oz").html(data.silverOz);
gm_js_setTrendImage("silver", data.silverTrend);
$("#spot-price-platinum-base").html(data.platinumBase);
$("#spot-price-platinum-oz").html(data.platinumOz);
gm_js_setTrendImage("platinum", data.platinumTrend);
$("#spot-price-palladium-base").html(data.palladiumBase);
$("#spot-price-palladium-oz").html(data.palladiumOz);
gm_js_setTrendImage("palladium", data.palladiumTrend);
ajaxSpotPricesTimer = setTimeout(gm_js_GetSpotPrices, 25000);
});
} else {
ajaxSpotPricesTimer = setTimeout(gm_js_GetSpotPrices, 25000);
}};
function gm_js_stopAnimation() {
$("#spot-price-animation").fadeTo("slow", 0);
$("#spot-price-animation").css("visibility", "hidden");
};
function gm_js_initChartRefresh() {
for(i = 0; i < metalSymbols.length; i++) {
$("#chart-animation-" + metalSymbols[i]).css("visibility", "hidden");
};
var chartRefreshTimer = setTimeout(gm_js_RefreshChart, 60000);
};
function gm_js_RefreshChart() {
clearTimeout(chartRefreshTimer);
var now = new Date();
if ((now.getTime() - lastMouseOverDtm.getTime()) < (1000 * 60 * 10)) {
gm_js_checkForRefreshChartImage();
};
chartRefreshTimer = setTimeout(gm_js_RefreshChart, 60000);
};
function gm_js_startChartAnimation(p_metalSymbol) {
$("#chart-animation-" + p_metalSymbol).css("visibility", "visible");
$("#chart-animation-" + p_metalSymbol).fadeTo("slow", 0.5);
var timeoutAnimation = setTimeout("gm_js_stopChartAnimation('"+p_metalSymbol+"')", 2000);
var timeoutRefreshChartImage = setTimeout("gm_js_refreshChartImage('"+p_metalSymbol+"')", 1000);
};
function gm_js_stopChartAnimation(p_metalSymbol) {
$("#chart-animation-" + p_metalSymbol).fadeTo("slow", 0);
$("#chart-animation-" + p_metalSymbol).css("visibility", "hidden");
};
function gm_js_checkForRefreshChartImage() {
var chartsTabBlockContainer = gm_js_getChartsTabbedBlockContainer();
if ( (chartsTabBlockContainer != undefined) && (chartsTabBlockContainer.length > 0) ) { var selectedMetalSymbol = gm_js_getSelectedChartMetalSymbol(chartsTabBlockContainer);
if ( (selectedMetalSymbol != undefined) && (selectedMetalSymbol.length > 0) ) { var chartImage = gm_js_getChartImage(chartsTabBlockContainer, selectedMetalSymbol);
if ( (chartImage != undefined) && (chartImage.length > 0) ) {
chartImageSrc = chartImage.attr("src");
if (chartImageSrc != undefined) {
chartImageSrcTokens = chartImageSrc.split("?", 5);
if (chartImageSrcTokens.length > 0) {
gm_js_startChartAnimation(selectedMetalSymbol);
}}}}};
};
function gm_js_refreshChartImage(p_selectedMetalSymbol) {
var chartsTabBlockContainer = gm_js_getChartsTabbedBlockContainer();
var chartImage = gm_js_getChartImage(chartsTabBlockContainer, p_selectedMetalSymbol);
if ( (chartImage != undefined) && (chartImage.length >0) ) {
chartImageSrc = chartImage.attr("src");
if (chartImageSrc != undefined) {
chartImageSrcTokens = chartImageSrc.split("?", 5);
if (chartImageSrcTokens.length > 0) {
dNow = new Date();
chartImage.fadeTo("slow", 0); chartImage.css("visibility", "hidden"); chartImage.attr("src", "");
chartImage.attr("src", chartImageSrcTokens[0] + "?" + dNow.getTime());
chartImage.css("visibility", "visible"); chartImage.fadeTo("slow", 1); }}};
};
function gm_js_getChartsTabbedBlockContainer() {
var tabBlock = undefined;
var chartsBlock = $("#chartsTabbedBox");
if ( (chartsBlock != undefined) && (chartsBlock.length > 0) ){
tabBlock = $(chartsBlock).find("div.tab-block-container")
};
return tabBlock;
};
function gm_js_getSelectedChartMetalSymbol(p_chartsTabBlockContainer) {
var selectedMetalSymbol = undefined;
if ( (p_chartsTabBlockContainer != undefined) && (p_chartsTabBlockContainer.length > 0) ) { var selectedTabIndex = p_chartsTabBlockContainer.tabs("option", "selected");
if ( (selectedTabIndex >= 0) && (selectedTabIndex 0) ) { var chartTimeID = p_chartsTabBlockContainer.find('input[name="chrtTime' + p_selectedMetalSymbol + '"]');
if (chartTimeID.val() == "1") {
selectedChartHTMLid = "#chrtImg" + p_selectedMetalSymbol;
chartImage = $(selectedChartHTMLid);
}};
return chartImage;
};
function gm_js_setTrendImage($v_metalName, $v_trendDirection) {
if ($v_trendDirection != "") {
$trendDirectionText = ( ($v_trendDirection == "1") ? "upward" : "downward");
$("#spot-price-"+$v_metalName+"-trend img").attr("src", "/template/english/images/"+$trendDirectionText+"-trend-indicator.png");
} else {$("#spot-price-"+$v_metalName+"-trend img").attr("src", "");
};
};
$(document).ready(function() {
$("div.tag_cloud_area").each(function(index){
$(this).css("visibility", "visible");
$(this).css("max-height", "10000px");
});
$("#tag_cloud_list").tagcloud({type:"list", sizemin:9, height:250, colormin:"336699", colormax:"336699"});
});
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-843699-1']);
_gaq.push(['_setDomainName', '.goldmoney.com']);
_gaq.push(['_setCampaignCookieTimeout', 2592000000]); // 30 days
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
var k_push_vars = {
"display_after": 90,
"view_percentage": 30,
"popup_font_color": "#000000",
"popup_background": "#ffffff",
"popup_separator": "#D4E2F0",
"header": "Your feedback is important to us!",
"question": "Would you be willing to give us a short (1 minute) feedback?",
"footer": "Thank you for helping us improve our website.",
"remind": "Remind me later",
"remind_font_color": "#3882C3",
"yes": "Yes",
"no": "No",
"text_direction": "ltr",
"images_dir": "/kampyle/images/",
"yes_background": "#76AC78",
"no_background": "#8D9B86",
"site_code": 2771913,
"ff_link_id": "k_popup_link"
|
| Source |
|
|
|
|
|