$(document).ready(function() {
	var iDelay = 7500;
	var iAmount = 3;
	var oInterval;
	
	function getSponsors() {
		oInterval = setInterval(function() {
							$.ajax({
								   type: "POST",
								   url: AbsPath + "includes/Components/Sponsoren_ajax.php",
								   data: "a=" + iAmount,
								   success: function(msg){
										$('div.SponsorImgWrapper').fadeOut(function() { 
									   		$('div.SponsorImgWrapper').html(msg);
									   		$('div.SponsorImgWrapper').fadeIn();
										});
								   }
								 });
						}, iDelay);
		return oInterval;
	}
	
	getSponsors();
	
	$('div.SponsorWrapper').bind('mouseenter', function() {
		clearInterval(oInterval);
	});
	
	$('div.SponsorWrapper').bind('mouseleave', function() {
		getSponsors();
	});
});
