$(document).ready(function() {
						   
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
	
	
	$("#click_link").click(function(){
		$("#mapa-flash").animate({"height": 470}, "slow");
		$("#flash").hide("slow");
		$(this).hide("slow");
	});

	$("#hide_link").click(function(){
		$("#mapa-flash").animate({"height": 183}, "slow");
		$("#flash").show("slow");
		$("#click_link").show("slow");
	});
	
	
	


	$("#show_filter").click(function(){
			if ($(this).hasClass("hide")) {
				$(this).removeClass("hide");
				$(this).html("Prikaži filter");
				$("#filter").fadeTo("normal",0);
				$("#filter").slideToggle("normal");
			} else {
		//$("#filter").animate({"height": 0}, "slow");
		$("#filter").slideToggle("normal");
		$("#filter").fadeTo("normal",1);		
		$(this).html("Sakrij filter");
		$(this).addClass("hide");

		}
		//$(this).fadeTo("slow", 0);
		//$("#hide_filter").fadeTo("slow", 1);
	});	
	
	
	
	
	$('.change').focus(function() {
	if (this.value == this.defaultValue) {
	this.value = ''; }});
	$('.change').blur(function() {
	if (this.value == '') {
	this.value = this.defaultValue; }});
	
   $("#main table").find("tr:first").addClass("head");
   $("#termini table").find("tr:odd").addClass("odd");   
	
});

/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


