
	var params = {
		allowscriptaccess: 'always'
	};
	var flashvars = { base: base, dataXML: base + mapBase, curTarget: 0, logo: base};
	var attributes = {};
	
	swfobject.embedSWF(base+"flash/top.swf?t=" + new Date().getTime(), "main-flash", "948", "452", "10.0.0", base+"flash/games/expressInstall.swf", flashvars, params, attributes);

	var params = {
		allowscriptaccess: 'always',
		wmode:'transparent'
	};
	var flashvars = {base: base, dataXML: base + mapBase, curTarget: 1, logo: base};
	var attributes = {};
	
	swfobject.embedSWF(base+"flash/menu.swf?t=" + new Date().getTime(), "main-flash-subpage", "948", "84", "10.0.0", base+"flash/games/expressInstall.swf", flashvars, params, attributes);

	var flashvars = {
	baseURL: base+'sklepy',
	symbol: symb,
	active: woj //bylo wojewodztwo
};
	var params = {
		menu: "false",
		scale: "noScale",
		bgcolor: "#ffffff",
		allowScriptAccess: "always"
	};

	var attributes = {};
	swfobject.embedSWF(base+"flash/mapa.swf?t=" + new Date().getTime(), "map-flash", "301", "285", "10.0.0", false, flashvars, params, attributes);


	
	

$(function(){
	
	$('.subpage').equalHeights();
	$( '.to-scroll' ).scrollFollow({speed: 1000,offset: 30});
	
	
	$(".slider a").lightBox();
	$("a.showLightbox").lightBox_();
	
	//$(".section-lb a").fancybox({titleShow:false});
	$(".section-lb a").lightBox();
	
	
	if($('.slider ul li').length>1){	
		$(".slider").configurableSlider({/*slideCallback : theCallback,*/ startPos : 0,infiniteMode : true, speed : 400, easing : 'swing'/*, naviContainer : '.slider-navi'*/});
	}
	
	$('.print a').click(function(){
		window.print();
		return false;
	})
	
	$('.return_link a').click(function(){
		history.back();
		return false;
	})
	
	if(lang === 1)
	{
		var selected_type = '';
		var selected_stores = '';
		//Filtrowanie po wymiarach
		$('#home-sort select[name=collection_type]').change(function(){
			
			selected_type = $(this).val();
			
			if(selected_type!=0){
				var cat_id = $(this).val();
			
				$.ajax({
				   type: "GET",
				   url: base+"ajax_stores/"+cat_id, 
				   success: function(msg){
						if(msg){
							$('#home-sort select[name=stores]').removeAttr('disabled').html(msg).val(selected_stores);
						}
						else{
							$('#home-sort select[name=stores]').attr('disabled','disabled').html('<option>Brak sklepów</option>');
						}
				   }
				 });
			}
			
			
		})
		
		//Filtrowanie po marketach
		$('#home-sort select[name=stores]').change(function(){
			
			selected_stores = $(this).val();
			
			if(selected_stores!=0){
				var cat_id = $(this).val();
				
				$.ajax({
				   type: "GET",
				   url: base+"ajax_categories/"+cat_id, 
				   success: function(msg){
						if(msg){
							$('#home-sort select[name=collection_type]').removeAttr('disabled').html(msg).val(selected_type);
						}
						else{
							$('#home-sort select[name=collection_type]').attr('disabled','disabled').html('<option>Brak kolekcji</option>');
						}
				   }
				});
			}
			
			
		})
		
	}
})


window.onload = function(){
	
	$('#home-sort select[name=stores]').trigger('change');
	$('#home-sort select[name=collection_type]').trigger('change');

}

$.fn.equalHeights = function(px) {
	
	$(this).each(function(){
		var currentTallest = 0;
		$(this).children().each(function(i){
			if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
		});
		
		if ($.browser.msie && $.browser.version == 6.0){ $(this).children().css({'height': currentTallest}); }
		$(this).children(':not(.clear)').css({'min-height': currentTallest}); 
	});
	return this;
	
};


