function submitPledge(){
	
	var name = $("#name").val();
	var email = $("#ilsut-ilsut").val();
	
	error = "";
		if(name == ""){
			error += "-Name\n";	
		}
		if(email == ""){
			error += "-Email\n";
		}
		if(error == "")
		{
			$.ajax({  
			type: "GET",
			url: "_php/ajax.php",
			data: 'pledge&name='+name+'&email='+email,
			success: function(){
				$("#takePledge").hide();
				$("#thankYou").show();

			}
		});
		return false;
		}else{
			alert('You are missing the following required field(s):\n\n'+error);
			return false;
		}
	
	
	
}

function getNews(){
		$.ajax({  
			type: "GET",
			url: "_php/homepage_news.php",
			data: 'news&home',
			success: function(msg){
				$('#news').text('');
				$('#news').append(msg);
			}
		});
}
$(document).ready(function(){
	    //GETS IMAGES
		$.ajax({  
			type: "GET",
			url: "_php/random_images.php",
			data: 'featured',
			success: function(msg){
				//alert(msg);
				$('#featured_business_logos').text('');
				$('#featured_business_logos').append(msg);
			}
		});
		$.ajax({  
			type: "GET",
			url: "_php/ajax.php",
			data: 'count',
			success: function(msg){
				//alert(msg);
				$('#pledge_count').text('');
				$('#pledge_count').append(msg);
			}
		});
		getNews();
});