 


  
   


// JavaScript Document
	$(document).ready( function(){ 
	
	//alert("ok");
	
	 //Get our elements for faster access and set overlay width
   
	
	
	
$('#hledejj').click(function () {
				if($(this).val() == 'zadejte text...'){
					$(this).val("");
				}
		});
$('#hledejj').blur(function () {
				if($(this).val() == ''){
					$(this).val("zadejte text...");
				}
		});
$('#formul1').submit(function () {
				if($('#hledejj').val() != 'zadejte text...')
				window.location.href='http://www.korres.cz/hledej/' + $('#hledejj').val() + '/';
				return false;
		});
		
	var celk = $('#cen').text();
	
	var ce = Number(celk) + Number($("#doprava option:selected").attr("title"));		   
	$('#cen').text(ce.toFixed(0));
	
	$('#doprava').change(function () {
						var ce = Number(celk) + Number($("#doprava option:selected").attr("title"));		   
				$('#cen').text(ce.toFixed(0));
	});	
	$('input[name=SD]').click(function () {
			if ($("input[name=SD]").is(":checked"))
			{
				$("#prijem").hide("slow");
			}
			else
			{
				$("#prijem").show("slow");
			}
	});	
	
	$('input[name=K_TELEFON]').mask("+999999999999");
	$('input[name=TELEFON]').mask("+999999999999");
	$('input[name=K_PSC]').mask("99999");
	$('input[name=PSC]').mask("99999");
	
	
	$('.hl').hover(function () {
		//alert("fff");
		ob = $(this).attr("rel");
		$(".hlavicka").css("background","url(./images/"+ ob +") no-repeat right");
		});

								
								
			$('input[name=FIRM]').click(function () {
			if($(this).val()=="1")
			{
				$("#titul").html("Název firmy: <span class=\"red big\">*</span>");
				$("#ic").html("IČ: <span class=\"red big\">*</span>");
				$("#dic").html("DIČ:");
			}
			else
			{
				$("#titul").html("Titul: ");
				$("#ic").html("Jméno: <span class=\"red big\">*</span>");
				$("#dic").html("Příjmení: <span class=\"red big\">*</span>");
			}
			
			});	
			
			
			$('input[name=K_FIRM]').click(function () {
			if($(this).val()=="1")
			{
				$("#titul").html("Název firmy: <span class=\"red big\">*</span>");
				$("#ic").html("IČ: <span class=\"red big\">*</span>");
				$("#dic").html("DIČ:");
			}
			else
			{
				$("#titul").html("Titul: ");
				$("#ic").html("Jméno: <span class=\"red big\">*</span>");
				$("#dic").html("Příjmení: <span class=\"red big\">*</span>");
			}
			
			});	
			
			
			
		$('.skryj').hide();
		$('.zobr').click(function () {		
				 if($('.zobr').html()=="Zobrazit více parametrů")
				 {
					 $('.skryj').show();
				  $('.zobr').html("Skrýt parametry");
				 }
				  else
				{
				  $('.zobr').html("Zobrazit více parametrů");
				  $('.skryj').hide();
				}
				
				return false;
		});



	$('.vice').click(function () {		
				 
				//alert("test");
				$('.vice').hide();
				$('.delka span').show('slow');
				return false;
		});
	
	
	
				   
							   
} ); 


