jQuery(document).ready(function()
    {
		var AJAX_URL = '/de/ajax'
	
        jQuery.ajax({
            type: 'get',
            url: AJAX_URL+'/currentrates',
            timeout: 8000,
            dataType: 'html',
            error: function(){},
            success: function(t){
                jQuery('#current-rate tbody').html(t);
            }
        });
	 jQuery.ajax({
            type: 'get',
            url: AJAX_URL+'/toptrades',
            timeout: 8000,
            dataType: 'html',
            error: function(){
            //alert('Error loading text document');
            },
            success: function(t){
                jQuery('#top-trades tbody').html(t);
            }
        });
        jQuery.ajax({
            type: 'get',
            url: AJAX_URL+'/mosttraded',
            timeout: 8000,
            dataType: 'html',
            error: function(){
            //alert('Error loading text document');
            },
            success: function(t){
                jQuery('#most-trades tbody').html(t);
            }
        });

    });


function currentrates(){

	var AJAX_URL = '/de/ajax'

	jQuery.ajax({
		type: 'get',
		url: AJAX_URL+'/currentrates',
		timeout: 8000, 
		dataType: 'html',
		error: function(){
			//alert('Error loading text document');
		},
		success: function(t){
			jQuery('#current-rate tbody').html(t);
		}
	});
}
function toptrades(){

	var AJAX_URL = '/de/ajax'

	jQuery.ajax({
		type: 'get',
		url: AJAX_URL+'/toptrades',
		timeout: 8000, 
		dataType: 'html',
		error: function(){
			//alert('Error loading text document');
		},
		success: function(t){
			jQuery('#top-trades tbody').html(t);
		}
	});
}
function mosttraded(){
	
	var AJAX_URL = '/de/ajax'

	jQuery.ajax({
		type: 'get',
		url: AJAX_URL+'/mosttraded',
		timeout: 8000, 
		dataType: 'html',
		error: function(){
			//alert('Error loading text document');
		},
		success: function(t){
			jQuery('#most-trades tbody').html(t);
		}
	});
}
setInterval(currentrates, 60 * 1000);
setInterval(toptrades, 125 * 1000);
setInterval(mosttraded, 190 * 1000);


