function showCountries(cont){
	jQuery(".countryList").hide();
	jQuery("#countries"+cont).show("normal");
}

function showCountriesFor(cont){
	var cont = parseInt(cont);
	jQuery(".dropSelectCountries").hide();
	jQuery("#dropSelect"+cont).show();
}

function goToCountry(country) {
	var country = parseInt(country);
	window.location.assign("index.php?option=com_tracks&amp;view=tracks&amp;task=displaytracks&amp;country="+country);
}

jQuery(document).ready(function() {
	//oznacevanje aktivnega taba v glavnem meniju
	//tips
	if (jQuery(".navSub .item57").length > 0 || jQuery(".navSub .item58").length > 0 || jQuery(".navSub .item59").length > 0 || jQuery(".navSub .item60").length > 0) {
		jQuery(".navMain .item55").addClass("active");
	}
	//community
	else if (jQuery(".navSub .item62").length > 0 || jQuery(".navSub .item63").length > 0 || jQuery(".navSub .item64").length > 0) {
		jQuery(".navMain .item54").addClass("active");
	}
	
	if (jQuery("#dropSelectContinent").length > 0) {
		var contSelected = 0;
		var countrySelected = 0;
		
		jQuery("#dropSelectContinent option").click(function() {
			contSelected = parseInt(jQuery(this).val());
			showCountriesFor(contSelected);
		});
		
		jQuery(".dropSelectCountries option").click(function() {
			countrySelected = parseInt(jQuery(this).val());
			goToCountry(countrySelected);
		});
		
	}
});
