$(function(){
	if($.isSet($.Lightbox)){
		// doprovodne obrazky v detailu clanku
		$.Lightbox.construct({
			show_helper_text:	false,
			show_linkback: false,
			show_extended_info: true,
			text: {
				image:		'Obrázek',
				of:			'z',
				close:		'<strong>Zavřít X</strong>',
				closeInfo:	'Obrázek můžete zavřít kliknutím kamkoli mimo něj.',
				download:	'Stáhnout.',
				help: {
					close:		'Klikněte pro zavření',
					interact:	'Přejeďte myší pro ovládání'
				}
			}
		});
		
		$('body:not(.admin) #content a:has(img):not(.article_box .image a):not([rel^=lightbox])').filter('[href$=.jpg],[href$=.jpeg],[href$=.png],[href$=.gif]').lightbox();
	}
	

	// striped tables
	$('#content table:not(.noStripes)').each(function(){
		$(this).find('tbody tr:even:not([class])').addClass('even');
	});
	
	// search form
	$('#search-form').submit(function(){
		var text = $('.search-text', this).val();
		if($.browser.msie && text != ''){
			window.location = $('#search-form').attr('action')+'?search='+text;
			return false;
		}
		return text != '';
	})
});
