window.addEvent('load', function(){	

	/*
	 * Check if Cufon is loaded? Quite useless but who cares..
	 */
	if(Cufon){
		
		/*
		 * Add if's for speeding things up. MooTools is much faster than Cufon
		 */
		if($$('div#header div#shoppingcart ul li h4')){
			Cufon.replace('div#header div#shoppingcart ul li h4', {fontFamily:'condensed'});
		}
		
		if($$('div#content div#sportix h3')){
			Cufon.replace('div#content div#sportix h3', {fontFamily:'bold'});
		}
		
		if($$('div#content div.last div.box h4')){
			Cufon.replace('div#content div.last div.box h4', {fontFamily:'bold'});
		}
		
		if($$('div#content div.detail div.why h3')){
			Cufon.replace('div#content div.detail div.why h3', {fontFamily:'bold'});
		}
		
		if($$('div#content div.detail div.why h5')){
			Cufon.replace('div#content div.detail div.why h5', {fontFamily:'bold'});
		}
	}
	
	
	//testimonials
	if($('testimonialsBox'))
	{
		var testimonialRefresh = function()
		{
			var testimonialId = $('testimonialsBox').getElement('span').get('rel');
			var req = new Request.HTML({
				update:'testimonialsBox',
				method: 'post',
				url:'/testimonials/refresh'
			}).send('id='+testimonialId);
		}
		testimonialRefresh.periodical(5000, testimonialRefresh); 	
	}
});