//HIGHSLIDE
hs.graphicsDir = base+'images/highslide/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.dimmingOpacity = 0.8;
hs.outlineType = 'rounded-white';
hs.captionEval = 'this.thumb.alt';
hs.marginBottom = 105; // make room for the thumbstrip and the controls
hs.numberPosition = 'caption';


// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	//slideshowGroup: 'group1',
	interval: 5000,
	repeat: false,
	useControls: true,
	overlayOptions: {
		className: 'text-controls',
		position: 'bottom center',
		relativeTo: 'viewport',
		offsetY: -60
	},
	thumbstrip: {
		position: 'bottom center',
		mode: 'horizontal',
		relativeTo: 'viewport'
	}
});

//top
var flashvars = {
	dataXML: base+"flash/data.xml",
	curTarget: activePage,
	mainURL: base
};
var params = {
	menu: "false",
	scale: "default",
	bgcolor: "#ffffff",
	allowsciptaccess: "always",
	wmode:'transparent'
};
swfobject.embedSWF(base+"flash/top.swf", "flash_top", "1000", "378", "9.0.0", false, flashvars, params);

//slider
var flashvars = {
	xmlData: base+"flash/data_slider/data.xml"
};
var params = {
	menu: "false",
	scale: "default",
	wmode:'transparent'
};
swfobject.embedSWF(base+"flash/slider.swf", "flash_slider", "130", "325", "9.0.0", false, flashvars, params);

hs.Expander.prototype.onAfterExpand  = function () {
	$('#flash_top').css('visibility','hidden')
		}
hs.Expander.prototype.onAfterClose  = function(){
	$('#flash_top').css('visibility','visible')
}

$(function(){
	if($('h1').text()=='Renowacja Zabytków'){
		$('.text_renowacje p').not(':first').hide();
		$('.text_renowacje p:first').append('<br><a id="czytaj_wiecej">czytaj więcej...</a>');
		
		$('#czytaj_wiecej').click(function(){
			$('.text_renowacje p').show();
			$(this).remove();
		})
		
	}
})

