function log(msg) {
	if (window.console) {
		console.log(msg);
	}
}

// Reformat a value for debugging display.
function debugValue(val) {
    if (typeof val == 'string') {
        val = val.replace(/\\/g, '\\\\');
        val = val.replace(/"/g, '\\"');
        val = val.replace(/\n/g, '\\n');
        val = val.replace(/\r/g, '\\r');
        val = val.replace(/\t/g, '\\t');
        return '"' + val + '"';
    } else if (typeof val == 'number') {
        return val;
	} else if (typeof val == 'object' && val instanceof Array) {
		s = '[';
		for (var i in val) {
			if (i > 0)
				s += ', ';
			s += debugValue(val[i]);
		}
		s += ']';
		return s;
    } else {
        return '<Unknown type ' + typeof val + ': ' + val + '>';
    }
}

$(function () {
	//RUZEE.ShadedBorder.create({ corner:8, shadow:16 }).render($('.main-container'));
	//RUZEE.ShadedBorder.create({ corner:8, border:1 }).render($('.left-column'));
	
	$('.email-link').each(function() {
		this.href = 'mai'+'lto:a'+'dmin'+'@se'+'emonkey.'+'net?subj'+'ect=Commen'+'ts%20from'+'%20SeeM'+'onkey.net';
		//console.log('$(this).html(): ' + $(this).html());
		if ($(this).html() == '') {
			$(this).html('a'+'dmin'+'@se'+'emonkey.'+'net');
		}
	});
	
	$('textarea.tinymce').tinymce({
		theme: "advanced",
		relative_urls: false,
		remove_script_host: false,
		content_css: '/media/css/tinymce_style.css',
		plugins: 'inlinepopups'
	});
	
});

