var ActivityListTemplate = new Template('<div class="Item"><a#{nUrl}>#{nTitle}</a><div class="Intro">#{nIntro}</div>#{nFileSrc}</div>');
var ActivityList = Class.create({
    initialize: function(jsonA){
        this.arActivity = jsonA.jsonActivity;
       	this.getContent();
    },
    getContent : function(){
    	var today = new Date();
        this.arActivity.each(
            function(item){
                if(new Date(item.nStart) <= today && new Date(item.nEnd) >= today){
                    $('ActivityList').insert(
                    ActivityListTemplate.evaluate({
	                    nTitle: item.nTitle,
	                    nFileSrc: item.nFileSrc,
	                    nUrl: item.nUrl,
	                    nIntro: item.nIntro
                    }));
                }
            } 
        );
    }
    })
new ActivityList(jsonA);
