var ttElems = ''
$(document).ready( function(){
	
ttMainRefresh()

})

function ttMainRefresh()
{
	ttElems = $('.turnusy').children().children(':gt(0)')
		if( typeof lvl3 == 'undefined' )
		{
			ttElems.click( function(e){
				if( !$(e.target).is('a') )
					location.href = $(this).find('a:first').attr('href');
			}).mouseover( function(){ $(this).css('cursor', 'pointer'); });
		}
		else
		{
			ttElems.each( function(){
				var link = $(this).find('a:first');
				link.parent().html(link.html());
			})
		}
		ttElems.find('.mapLink').click( function(e){
			e.preventDefault();
			$(this).colorbox({
				iframe: true,
				href: $(this).attr('href')+'&output=embed',
				width: $(window).width()*0.9,
				height: $(window).height()*0.9
			})
		});
}
