// JavaScript Document
$(document).ready(function() {

tabs_tooltips();
//animateGrpCars();
carBox();
calculateHeightCols();
ajaxLoadPages();
ajaxForm();
showSearchParams();
$("a[rel^='newWindow']").attr('target','_blank');

$("a[href='']").click(function() {
	alert("Je nám líto, ale tento odkaz je zatím nefunkční. Na nápravě pracujeme.");
	return false;
});

$("#scroller").simplyScroll({
	speed: 5
});

$(".selectRegion").click(function() {
	id = this.id.substr(0,2);
	if ($("#region"+id).is(':checked')){
		$("#region"+id).attr('checked', false);
		$(".kraj."+id).css('display', 'none');
		$(".okresy.okres-"+id).css('display', 'none');
	}
	else{
		$("#region"+id).attr('checked', true);
		$(".kraj."+id).css('display', 'block');
		$(".okresy.okres-"+id).css('display', 'block');
	}
	
	return false;
});

$(".selectOkres").click(function() {
	id = this.id;
	if ($("#okres"+id).is(':checked')){
		$("#okres"+id).attr('checked', false);
	}
	else{
		$("#okres"+id).attr('checked', true);
	}
	
	return false;
});

$(document).ready(function() {
	$('.selectRegion').click(function() {
		var id = ($(this).attr("id"));
		$('#list-region').load('/0/0/0/okresy/?kraj='+id).fadeIn(500);
	});
});

 
});

