function closeHiden(){
	document.getElementById("message").style.display = "none";
}

$(document).ready(function() {
    $('#headfoto').cycle({fx: 'fade'});
	
	//$('#imagesList4').cycle({fx: 'fade'});
    
	$("#slider").smoothDivScroll({
		autoScroll: "onstart",
		autoScrollDirection: "endlessloopright",
		autoScrollStep: 1,
		autoScrollInterval: 15
	});

	/* $("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	}); */
	
	
	
	$('div#gallery').css('display', 'block');
			
	var onMouseOutOpacity = 0.5;
	$('#thumbs ul.thumbs li, div.navigation a.pageLink').opacityrollover({
		mouseOutOpacity:   onMouseOutOpacity,
		mouseOverOpacity:  1.0,
		fadeSpeed:         'fast',
		exemptionSelector: '.selected'
	});
			
	// Initialize Minimal Galleriffic Gallery
	$('#imagesList4').galleriffic({
		autoStart: 				true,
		numThumbs:				21,
		preloadAhead:			20,
		imageContainerSel: 		'#slideshow',
		controlsContainerSel: 	'#controls',
		renderSSControls:		false,
		renderNavControls:		true,
		playLinkText:			'Odtwrzaj Slideshow',
		pauseLinkText:			'Pause Slideshow',
		prevLinkText:			'&lsaquo; Poprzednie',
		nextLinkText:			'Następne &rsaquo;',
		nextPageLinkText:		'&rsaquo;',
		prevPageLinkText:		'&lsaquo;',
		
		onSlideChange: function(prevIndex, nextIndex) {
			// 'this' refers to the gallery, which is an extension of $('#thumbs')
			this.find('ul.thumbs').children()
				.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
				.eq(nextIndex).fadeTo('fast', 1.0);
		},
		onPageTransitionOut: function(callback) {
			this.fadeTo('fast', 0.0, callback);
		},
		onPageTransitionIn: function() {
			this.fadeTo('fast', 1.0);
		}

	});

	
});



Cufon.replace('h3',{
		textShadow: '0px 0px #7A1F1A',
		color: '#7A1F1A'
		});
		
Cufon.replace('.menu a',{
		fontSize: '18px',
		textShadow: '0px 0px #7A1F1A',
		color: '#7A1F1A',
		hover: {color:'#b9100e'}
	});
	
Cufon.replace('#spl a',{
		fontSize: '18px',
		textShadow: '0px 0px #7A1F1A',
		color: '#7A1F1A',
		hover: {color:'#b9100e'}
	});

