
function kartinka(i){
	$('#contD'+aktNav).cycle('pause');
	$('#contD'+aktNav).cycle(i);
	return false;
}

function gotoCont(i){
	if($('div#contT'+i).hasClass('thmbGal')){
		$('div#txtInh div.vgGalL').css('display', 'block');
		$('div#txtInh div.vgGalR').css('display', 'block');
	}else{
		$('div#txtInh div.vgGalL').css('display', 'none');
		$('div#txtInh div.vgGalR').css('display', 'none');
	}
	menjaj('div#contD', aktNav, i);
	menjaj('div#contT', aktNav, i);

	if(aktNav !==0)		$('#contD'+aktNav).cycle('stop');
	if(!$('#contD'+i).hasClass('gmap')){
		$('#contD'+i).cycle({timeout:  4000});
		$('#contD'+i).cycle('resume');
	}

	$('div#txtInh').animate({ height: (txtHeight[i]-11)+'px'});
	$('div#txt').animate({ height: txtHeight[i]+'px'});


	if($('#txtInh').find('div.jScrollPaneContainer').length !== 0){
		$('#contT'+aktNav).jScrollPaneRemove();
	}

	if($('#contT'+i).find('div.scrollableCont').length !== 0 && $('#txtInh').find('div.jScrollPaneContainer').length==0){
		$('#contT'+i).css('min-height', (txtHeight[i]-21)+'px');
		$('#contT'+i).css('height', (txtHeight[i]-21)+'px');
		$('#contT'+i).jScrollPane();
	}
	aktNav = i;
}

function menjaj(kontainer, starij, novo){
	if(($(kontainer+starij) && kontainer !== 'div#contT') || ( kontainer == 'div#contT' && starij !== 0)){
		$(kontainer+starij).fadeOut('fast', function(){ $(kontainer+novo).fadeIn('slow'); });
	}else{ $(kontainer+novo).fadeIn('slow'); }
}

