$(function(){
	
	$('div#news').css({
		'background' : ' url(/img/ajax-loader.gif) no-repeat center'
	});
	
	$('div#noveltyList').css({
		'background' : ' url(/img/ajax-loader.gif) no-repeat center'
	});
	
	var num = 10; //リストの表示件数
	var $list = $('div#noveltyList div.inner');
	
	$list.load('/novelty.html #resultsList table',function(){
	
		$('div#noveltyList').css({
			'background' : ' none'
		});
		
		var $infoTable = $('table tr',$list);		
		$infoTable.css('display','none');
		
		$infoTable.each(function(){
			var day = $('td:eq(0)',this).text();
			var place = $('td:eq(2)',this).text();
			var place_detail = $('td:eq(4)',this).text();
			
			var _index = $(this).index();
			if(_index > 0 && _index <= num ){
				$('<dl><dt>'+day+'</dt><dd>'+place+'（'+place_detail+'）新規オープンしました。</dd></dl>').appendTo('div#noveltyList');
			}
		});
	});
	
	var $news = $('div#news div.inner');
	$news.load('/news.html div#uploadList dl',function(){
		
		$('div#news ').css({
			'background' : ' none'
		});		
	});
});
