// JavaScript Document
	//		 $(window).load(function() {
	//			tinw.topnav();			   
	//		 });

$(document).ready(function() {
	
	// tinw.topnav();

	$("div.video-post a.thumbnail").overlay({expose: '#000'});	

	
	
	var newurl = '';
	var thelabel = '';
	
	// this part needs to be re-written
	
/*
	if ((theurl.indexOf('/tw/') < 0)  && (theurl.indexOf('/en/') < 0)) { // no tw or enh
		theurl = theurl + 'tw/';
		thelabel = '中文'
	} else {
		if (theurl.indexOf('/tw/') > 0) { // tw	
			theurl = theurl.replace("/tw/", "/en/");
			thelabel = 'English';
		} else {
			theurl = theurl.replace("/en/", "/tw/");
			thelabel = '中文';
		}
	}
	
	// to be re-written
	
	var liobj = $("ul.auxillary-nav li#lang a");
	$(liobj).html(thelabel);
	$(liobj).attr("href", theurl);
	
*/
	
	init_monthlist();
	
	$("div.meditate-imgs br").remove();
}); // end of doc ready
	 

$(window).unload(function() {
var theurl = document.URL;

if (theurl.indexOf('/about/directions/') > 0) {
	GUnload();
}
});
/*
$(window).load(function() {
	var theurl = document.URL;
	
	if (theurl.indexOf('/cmc') > 0) {
		
		var root_url = 'http://chancenter.org/';
		var frankleinbook = {
			src: root_url + 'cmc/wp-content/themes/thematic/library/swf/frankleinbook.swf'
		};
		sIFR.activate(frankleinbook);
		//alert('en before sifr');
		sIFR.replace(frankleinbook, {
		 selector: 'div#title-container h1'
		 ,css: ['.sIFR-root {text-align: left; color:#FFFFFF; background-color:#746C62 }'	]
		 ,wmode: 'transparent'
		});
		sIFR.replace(frankleinbook, {
		  selector: '#content div.landing-post h3'
		  ,css: ['.sIFR-root { font-size:28px; color:#ffffff; background-color:#969083; }' ]
		  ,wmode: 'transparent'
		});					
		sIFR.replace(frankleinbook, {
		  selector: 'div.main-aside div.landing-post h3'
		  ,css: ['.sIFR-root { font-size:28px; color:#ffffff; background-color:#969083; text-align:right; }' ]
		  ,wmode: 'transparent'
		});					
	}

});
*/
