function setAction(action) {
	entry_remember_action = action;
}

function isLoggedIn(loggedin) {
	user_is_loggedin = loggedin;
}

function initNoticeBoxNotLoggedInDialog(title) {
	$("#noticeBoxNotLoggedIn").dialog({
		bgiframe: true,
		width: '580px',
		resizable: false,
		autoOpen:false,
		modal: true,
		title: title,
		overlay: {
			backgroundColor: '#000',
			opacity: 70
		}
	});
}

function rememberForgetEntry(id) {
	if (user_is_loggedin == 1) {
		$.ajax({
			type: "POST",
			dataType: "json",
			url: "/"+global_application_language+"/entry/index/remember",
			data: "id="+id+"&action="+entry_remember_action,

			success: function(dataText, textStatus) {
				if (dataText.result == true) {
					if (entry_remember_action == "remember") {
						entry_remember_action = "forget";
						$('#iconwatchlist').removeClass("sprites_features_perceiveAdvertise");
						$('#iconwatchlist').addClass("sprites_features_forgetAdvertise");
						$('#linkwatchlist').html(lang_text_entry_forget);
					}
					else {
						entry_remember_action = "remember";
						$('#iconwatchlist').removeClass("sprites_features_forgetAdvertise");
						$('#iconwatchlist').addClass("sprites_features_perceiveAdvertise");
						$('#linkwatchlist').html(lang_text_entry_note);
					}
				}
			},

			error: function (XMLHttpRequest, textStatus, errorThrown) {
			}
		});
	}
	else {
		$('#noticeBoxNotLoggedIn').dialog("open");
	}
}

function genderHasTits() {
	tits = false;
	if ($('#category_gender_id').val() > 1) {
		tits = true;
	}
	console.log($('#category_gender_id').val());

	if (tits == false) {
		$('#category_breast').css("display", "none");
	}
	else {
		$('#category_breast').css("display", "");
	}
}
