// use js (with css) to remove unwanted submit buttons
$('html').addClass('js');

$(function() {
  vFixer();
  clickBlock('#bann-links');
});

function vFixer() {
	if (jQuery.browser.msie && (parseInt(jQuery.browser.version) == 6 || parseInt(jQuery.browser.version) == 7)) {
		$('.item .signs').css('background', 'transparent');
		$('.item .thumb, .item h2').prepend('<span class="edge"></span>');
	}
}

function clickBlock(selector){
	$(selector + ' .inner > ul > li').each(function(){
		var href = $(this).find('h3').find('a').attr('href');
		$(this).click(function(event){
			var $targ = $(event.target);
			if (!($targ.attr('href')) || ($targ.attr('href') == href)) {
				window.status = href;
				window.location = href;
			}
		});
		$(this).hover(function(event){
			var $targ = $(event.target);
			if (!($targ.attr('href')) || ($targ.attr('href') == href)) {
				window.status = href;
			}
		});
	});
}

$(function() {
    $('.panel_tool_tip').tooltip({
	    track: true,
	    delay: 0,
	    showURL: false,
	    showBody: " - ",
	    opacity: 0.9
    });	 	
    $('.panel_tool_tip img').attr('alt','');
});

$(function() {
    if ($('.form-error').length) {
        $('.form-error a').click(function () {
             var href = $(this).attr('href');
             $(href).focus();
             return false;
         });
     }
});

	$(function(){
		if ($('#w').val() == '') {
			$('#w').val(TRANSLATE_VYHLEDAVANI);
		}
		$('#w').click(function(){
		    if ($(this).val() == TRANSLATE_VYHLEDAVANI) {
		    	$(this).val('');
		    }
		});
	});

