$(document).ready(function(){
	//form
	$("form#search input[type=text]").focus(function() {
		if ($(this).attr("value") == "Enter the name of the track")
			$(this).attr("value", "");
	});
	
	
	//playerLink find
	$("#findPlayer").hide();
	$(".playerLink.find").toggle(function() {
		$("#findPlayer").show();
	}, function() {
		$("#findPlayer").hide();
	});
	
	
	function ajaxtags() {
		$("li[class*=tags]").click(function() {
			page = $(this).attr("class");
			page = page.substr(5, page.length);
			
			$.ajax({
				url: 'AJAXtags,'+page,
				success: function(msg){
					$(".pagelist").remove();
					$(".contentTags").before(msg).remove();
					ajaxtags();
				}
			});
		});
	}
	
	ajaxtags();
});


$(".popularityDate").ready(function() {
	$(".popularityDate select").change(function () {
		if($(this).attr("value") != 'none')
			document.location.href = 'popularne,1,'+$(this).attr("value");
	});
});

