(function() {
	var Realmac = Realmac || {};

	Realmac.meta = {
		
		// Set the browser title
		//
		// @var String text
		setTitle: function(text) {
			return document.title = text;
		},
		
		// Set the content attribute of a meta tag
		//
		// @var String name
		// @var String content
		setTagContent: function(tag, content){
			// If the tag being set is title
			// return the result of setTitle
			if ( tag === 'title' )
			{
				return this.setTitle(content);
			}
			
			// Otherwise try and find the meta tag
			var tag = this.getTag(tag);
			
			// If we have a tag, set the content
			if ( tag !== false )
			{
				return tag.setAttribute('content', content);
			}
			
			return false;
		},
		
		// Find a meta tag
		//
		// @var String name
		getTag: function(name) {
			var meta = document.querySelectorAll('meta');
			
			for ( var i=0; i<meta.length; i++ )
			{
				if (meta[i].name == name){
					return meta[i];
				}
			}
			
			var tag = document.createElement('meta');
			tag.name = name;
			document.getElementsByTagName('head')[0].appendChild(tag);
			
			return tag;
		}
	};
 
	// Object containing all website meta info
	var websiteMeta = {"61205a715fcab45420abbcca66faad62-0.html":"親愛的牧者、教會領袖及弟兄姊妹:\n感謝天父讓信祂的人都可以休息並重新得力！\n","e372833148289e53c7791834e358e626-3.html":"教會過去幾年主要服侍成人及兒童；十月起，我們開始中學生團契，萌夏和川村玄是首兩名團友，他們的同學亦是我們的對象，首次團契計劃，參觀沛鋒母校-TCU(10月9日的開放日)，求主保守當日天氣及讓大家有美好分享。         11至12月TMC亦設有感恩節晚會和平安夜崇拜，沛鋒負責籌備平安夜報佳音及於","ff9244f130c724a2dab4c080e1804d26-4.html":"1.感恩沛鋒在東京順利更換認別證，請為明年回澳修正個人資料禱告。\n2.感恩TMC查經房已順利完成，請繼續為同工會議室裝修工程代禱。\n3.為首次中學團契順利參觀沛鋒母校開放日的安排及當日天氣禱告。\n4.為10月29日、11月19日和12月31日的華語小組禱告，及組員協助TMC網站中文翻譯代禱。\n5.為","961686c7b05346bcfc1824210a4e7386-1.html":"加拿大差會與TMC共13位同工，於9月中在仙台有5日4夜的退修；在退修期間，我們從營地出發，探訪了在311地震後、參與當地復興工作的美國宣教士Andy及Lorna。他們收集日本人結婚和畢業時穿過的和服，親手改造出獨一無二的貨品出售。這事工過去三年幫助了十位痛失家園的姊妹，使他們的孩子都因這事工可以健","2a851d5aa45f5ac5851b849cd3da16b7-2.html":" 9月我們開始了第一次在TMC的華語小組，共7位出席者。當中最年輕的一位組員預計明年3月出生；爸爸是來自西安的家庭，自幼返三自教會，大學開始參與家庭教會聚會；來日本幾年都因語言及路途遙遠、不太常在主日回教會崇拜，但感恩神聆聽到他們的需求，讓TMC的地點能配合到他們一家。        9月開始TMC"};
 
	// pageId must match the key in websiteMeta object
	var url = window.location.pathname;
	var pageId = url.substring(url.lastIndexOf('/')+1);
	if (!pageId || pageId.length == 0){
		pageId = 'index.html';
	}
	pageMeta = websiteMeta[pageId];
 
	// If we have meta for this page
	if (pageMeta){
		Realmac.meta.setTagContent('description', pageMeta);
	}
 
 })();