
$jq(function() {
	
	$jq(document).oneTime(5000, function() {
		$jq(".map_links .response_images a").each(function() {
			var interval = Math.ceil(Math.random()*15000);
			$jq(this).oneTime(interval, function() {
				$jq(this).everyTime(15000, function(i) {
					// console.log(window.images);
					// $jq(this).fadeOut(1500);
					var random_id = Math.floor(Math.random()*window.images.length);
					var new_response = window.images[random_id];
					var new_src = new_response.flickr_img+"_s.jpg";
					$jq(this).attr({href: new_response.story_link});
					$jq(this).children("img").attr({ src: new_src, alt: new_response.full_name });
					// $jq(this).fadeIn(1500);
				});
			});
		});
	});
});

