
/* ## SRC: class/galerie/js/galerie.js ## */
/* MD GALERIE */
$(document).ready(function(){

	var maxDataHeight = 0;
	$('.fotonahled .data').each( function(){
		if( $(this).height() >  maxDataHeight ){
			maxDataHeight = $(this).height();
		}
	});
	if( maxDataHeight > 0 ){
		$('.fotonahled .data').height(maxDataHeight);
	}else{
		$('.fotonahled .data').hide();
	}
	$('.gShow').click(function(){
		if( $('.gShowDiv').css('display') == 'none' ){
			$('.gShowDiv').fadeIn(400);
			$('.gShowStav').html('- ');
		}else{
			$('.gShowDiv').fadeOut(400);
			$('.gShowStav').html('+ ');
		}
	});
	$('.gShowLast').click(function(){
		if( $('.gShowLastDiv').css('display') == 'none' ){
			$('.gShowLastDiv').fadeIn(400);
			$('.gShowLastStav').html('- ');
		}else{
			$('.gShowLastDiv').fadeOut(400);
			$('.gShowLastStav').html('+ ');
		}
	});
	/* TAB */
	// tabs
	var TABS_COOKIE1 = 'galerie_tabs_cookie';
	var prvniTabIndex1 = prvniTabIndexJazyka;
	if( prvniTabIndex1 == 0 ) prvniTabIndex1 = parseInt($.cookie(TABS_COOKIE1))||0;
    $("#container").tabs(
    	( prvniTabIndex1 )
    	,{ //
    		onClick: function(clicked){ //
				var lastTab = $(clicked).parents("ul").find("li").index(clicked.parentNode) + 1;
				$.cookie(TABS_COOKIE1, lastTab);
			}
			,fxSlide: true
			,fxFade:  true
			,fxSpeed: "fast"
			,cache: true
		}
	);
	
});

/* ## SRC: js/autorizace.js ## */
$(document).ready(function() { 
	if( typeof(self.parent.TB_HEIGHT) != "undefined" ) { 
		$(".bCancel").click(function() {
			if( typeof(self.parent.tb_reload) != "undefined" ){   
				//self.parent.tb_reload = false;
				self.parent.tb_remove();
			} 
		});
		$('input[name=OK]').click(function(){
			self.parent.tb_reload = true;
			return true;
		});
		
	}else{
		$(".bCancel").remove();	
	}
 });
