// JavaScript Document

$(document).ready(function(){

	


	
$('#orphans-table tr').each(function(){
										tr	=	$(this)
										var yearlyAmountTD = tr.find('td:last')
										var country = tr.find('td:first').text()
										
										var project	=	'Orphan Sponsorship'
										var yearlyAmount	=	yearlyAmountTD.text().substr(1)
										
										var monthlyAmount = yearlyAmount/12
										
										if (monthlyAmount>0){
										var $button	=	$('<button></button>').addClass('donate-button')
										.click(function(){
																														
											addToBasket(yearlyAmount, project, country, 'Sadaqah', 12, 'article', 399)	
																														
										})

										
										yearlyAmountTD.append($button)
										}
										
											 })
				  
				  $(".target").each(function(){
						   var e = $(this)
						   var widthPercentage	=	e.css('width')
						   e.find("span").hide()
						   e.css('width', 0).animate({width: widthPercentage}, 7000, function(){e.find("span").show()} );
						
						   
						   })
				  
				  })

