function getSelectorList(selector) {
	$("#loader").show();
	$(".contenttypeList").css("opacity","0.2");
	window.selectedSelector = selector;
	var selectorFunction = "";
	if(selector == "categories") {
		selectorFunction = "getCategoriesList"
	}
	else if(selector == "artists") {
		selectorFunction = "getArtistsList"
	}
	else if(selector == "subjects") {
		selectorFunction = "getSubjectsList"
	}
	else if(selector == "series") {
		selectorFunction = "getSeriesList"
	}
	else if(selector == "audiobooks") {
		selectorFunction = "getSoundBookList"
	}
	
	$.ajax({
		type: "POST",
		url: "/files/plugins/lyttilgud.selectors/php/functions.php",
		data: {
			phpfunction: selectorFunction
		},
		success: function(response){
			$(".contentList").hide();
			$("#"+window.selectedSelector).html(response);
			
			$("#"+window.selectedSelector).fadeIn(400,function(){
				$("#loader").hide();
			});
			ajustListNames();
		}
	 });
}

function setSelectedSelector(selector) {
	var argument = [selector];
	var arguments = $.toJSON(argument);
	$.ajax({
		type: "POST",
		url: "/files/plugins/lyttilgud.selectors/php/functions.php",
		data: {
			phpfunction: "setSelectedSelector",
			phparguments: arguments
		}
	 });

}
