$(function(){
	if($.cookie('ck') == 'true'){
		$('*[class^=comment-area]').show();
	}else{
		$('*[class^=comment-area]').hide();
	}
	$('*[class^=comment-open]').click(function(){
	var str = ".comment-area-" + $(this).attr('class').replace('comment-open-','');
	if($(str).css('display') == 'none'){
		$(str).show();
		$.cookie('ck', true, { expires: 90 });
	}else{
		$(str).hide();
		$.cookie('ck', false, { expires: 90 });
	}
	return false;
	});
});

function openWindow(theURL, width, height, features, winName) { //v2.0
	if(typeof(width) == "undefined" || width == 0){
		width = 650;
	}
	
	if(typeof(height) == "undefined" || height == 0){
		height = 800;
	}
	
	if(typeof(features) == "undefined" || features == ""){
		features = "status=yes,menubar=no,scrollbars=yes,resizable=yes";
	}
	
	features = features + ', width = ' + width + ', height = ' + height;
	
  window.open(theURL,winName,features);
}

 