    function goUrl(url) {
		window.location = url;
	}
	//TODO implement actors list loading from java backend
	function loadHitlist(tabNum) {
        var urlstr = location.href.split("/");
        var url = "/external/artistProfile";
        if (urlstr.length > 1) {
            url = url + "/" + urlstr[urlstr.length-1]+"&operationName=artist.profile";
        }

        $("#page_content").load(url, function() {showTabActors(tabNum);});
    }
	
	function loadPage(url) {
		$("#page_content").load(url, function() {});
	}	
	
	$(document).ready( function(){
		$(".icon").live('click',	
			function(event) {
				if(!$(this).is('.icon_video') && !$(this).is('.icon_music')) {
					event.stopImmediatePropagation();
					var id = $(this).parent().parent().attr("id").substring(1);
					if ($(this).is('.icon_plus')){
						addArtist(id);
						$(this).removeClass('icon_plus');
						$(this).addClass('icon_plus_on');
					}
					else if ($(this).is('.icon_plus_on')){
						removeArtist(id);
					}
					return false;
				}
			}
		);
		$(".box").live('mouseover',function () {
			$(this).addClass("box_over");
		});

		$(".box").live('mouseout',function () {
			$(this).removeClass("box_over");
		});
		$(".box").live('click',
			function (event){
				event.stopImmediatePropagation();
				//Here we'll show artist details page
				var voiceOnly = $("#voiceOnly").val();
				if (voiceOnly == "true") {
					goUrl($(this).attr("id").substring(1) + "?_voicesOnly=true");
				}
				else {
					goUrl($(this).attr("id").substring(1));
				}
				return false;
		});
		
		$(".remove-artist").live("click", function() {
			id = $(this).parent().attr("id").substring(1);
			removeArtist(id); 
		});
		$(".remove-webartist").live("click", function() {
			id = $(this).parent().attr("id").substring(1);
			removeWebArtist(id); 
		});
	});


	function realValueOf(field) {
		if ($(field).val() != $(field).attr("title")) {
			return $(field).val();
		}
		return "";
	}
