var TopModel=Backbone.Model.extend({
	defaults:{
		name:"top10",
		tpl:"indexTpl",
		now:function(){

			var time=new Date();	
			var h=time.getHours();
			if(h==0){
				var time=new Date(time.getTime()-60*60*1000);
				var y=time.getFullYear();
				var m=time.getMonth()+1;
					m=(m<10)?"0"+m:m;
				var d=time.getDate();
					d=(d<10)?"0"+d:d;
				var h=time.getHours();
					return y+"-"+m+"-"+d+" "+h+"点至24点";
				
			}else{
					
				var y=time.getFullYear();
				var m=time.getMonth()+1;
					m=(m<10)?"0"+m:m;
				var d=time.getDate();
					d=(d<10)?"0"+d:d;
				var h=time.getHours();
					//h=(h<10)?"0"+h:h;
					return y+"-"+m+"-"+d+" "+(h-1)+"点至"+h+"点";	
			}
			
		}(),
		time:function(){
			var time="";
			var t=new Date();
			var y=t.getFullYear();
			var m=t.getMonth()+1;
				m=(m<10)?"0"+m:m;
			var d=t.getDate();
				d=(d<10)?"0"+d:d;
			var h=t.getHours();
				h=(h<10)?"0"+h:h;
				time=y+"-"+m+"-"+d+" "+h+":00:00";				
			return time;
		}()
		
	},
	initialize:function(){
		var selt=this;
		this.on("change:time",function(a,b){
			var t=helper.getFulltimePoint(b);
			this.set("now",t);
		});
	},
	url:"servlet/Index.do"
});