$(document).ready(function()
{
    // Init pdBox
    $('.thickbox').pdBox({minWidth: 400});

    // Hover input - text out
	$('input#q').each(function(){
        var btntext = $(this).attr('value');
        $(this).focus(function(){
            text = $(this).attr('value');
            if( text == btntext ){
                $(this).attr('value', '');
            }
        }).blur(function(){
              var text2 = $(this).attr('value');
              if( text2 == '' || text2 == undefined ){
                  $(this).attr('value', btntext);
              }
        });
    });
    
    $('.news-box ul li, .crossroad ul li').hover(function(){
        $(this).addClass('hover');
    }, function(){
        $(this).removeClass('hover');
    }).click(function(){
        window.location = $(':header a', this).attr('href');
    });
    

 	$(".form .dateFrom, .form .dateTo").datepicker({
 		showOn: 'button',
 		buttonImage: './img/ico/calc.png', 
 		buttonImageOnly: true, 
 		dateFormat:'dd/mm/yy', 
 		dayNamesMin:['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
 		monthNames: ['Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Zaří', 'Říjen', 'Listopad', 'Prosinec'],
 		nextText: '▶',
 		prevText: '◀'
 	});
 	
 	if($.browser.mozilla){
 		$('body').addClass('ff');
 	}
    
});

