jQuery(document).ready(function() {
	var loc	= ( window.location.href.indexOf("links") == -1 ) ? "front" : "links";
	jQuery("#next15").click(function(e) {
		var initStart	= ( loc == "front" ) ? 16 : 15;
		var initStop	= ( loc == "front" ) ? 46 : 45;
		var start 		= ( jQuery(this).data("start") != undefined ) ? jQuery(this).data("start") : initStart;
		jQuery.get("http://mobile.propublica.org/load_stories/"+loc+"/"+start, function(data) {
			jQuery("#list").append(data);
			jQuery("#next15").data("start",start+15);
			if (start == initStop) {
				jQuery("#next15").hide();
			}
		});
		return false;
	});
});
