
/* ------------------------------------------------------ comment posting --------------- */
function tncms_post_comment(formid){
	var thisUrl = document.location.href;
	oPostData = {};
	oPostData.subject_id = 'cms.user.uuid | jsquote';
	oPostData.subject_type = 'user';
	oPostData.content = jQuery('#' + formid + '>textarea[name=comment]').val();
	jQuery('#' + formid + '>input').each(function() {
		oPostData[jQuery(this).attr('name')] = jQuery(this).val();
	});
	jQuery.post(thisUrl, oPostData, function(data) {
		alert('Post Status: ' + data);
	});
}
        
jQuery(document).ready(function() {
/* -------------------------------------------------------- create tabs ----------------- */
	jQuery("#tabBox > ul").tabs();
	jQuery("#tabBox").css('display','block');
/* -------------------------------------------------------- detect logged in status ----- */
	if (jQuery.cookie('tncms-screenname') == 'cms.user.screen_name | jsquote') {
		jQuery('.edit').show();
	}

/* -------------------------------------------------------- adjust avatar size ---------- */
	if ($('.avatarImage').width() > 300){
		$('.avatarImage').attr('width', 300);
	}
});