function refreshPrayerTimes (){

	$("#dailyprayers").html('Loading Prayer Times...');

	showPrayerTimes ();

}

function showPrayerTimes (){

	$("#dailyprayers").load("/includes/prayertimes.php",null,function(){
	   //alert("loaded!");
	   //$("#dailyprayers span").css('display', 'none');
	   showToolTip ();
	   $("#dailyprayers li.first a.refreshbtn").click(function(evt){
	
			refreshPrayerTimes();
			//alert("clicked me");
			evt.preventDefault();
	
		});

	   
	});

}
function setupRefreshBtn(){

	$("a.refreshbtn").click(function(e){
	
		refreshPrayerTimes();
	
	});

}
function showToolTip (){

	$("#dailyprayers li.first img.infobtn").qtip({
	
	content: 'Your location has been automatically detected and has been used to generate the salat times, courtesy of <em>www.islamicfinder.org</em>, in accordance with the Hijiri calendar.',
	style: {
	
		name: 'dark',
		fontSize: 11,
		border: {radius: 5},
		width: 180,
		tip: {corner: 'rightMiddle',size: {x: 10,y : 10}}
	
	},
	position: {
	
		corner: {    
	
		target: 'leftMiddle',
		tooltip: 'rightMiddle' 
	
		}     
	
	},        
	
	show: 'mouseover',
	hide: 'mouseout'
	
	});        


}

window.onload = showPrayerTimes;
