$(document).ready(function() {

	$('#link1').hover(
	
		function()  {
			$('#logo').css('background-image','url("image/logo2.png")');
			$('#logo').stop(true,true).fadeIn('slow');
			$('#link1h').fadeOut('slow');
		},
		function() {
			$('#logo').fadeOut(0);
			$('#link1h').fadeIn(0);
		}
	);  
	$('#link2').hover(
	
		function()  {
			$('#logo').css('background-image','url("image/logo3.png")');
			$('#logo').stop(true,true).fadeIn('slow');
			$('#link2h').fadeOut('slow');
		},
		function() {
			$('#logo').fadeOut(0);
			$('#link2h').fadeIn(0);
		}
	); 
	$('#link3').hover(
	
		function()  {
			$('#logo').css('background-image','url("image/logo4.png")');
			$('#logo').stop(true,true).fadeIn('slow');
			$('#link3h').fadeOut('slow');
		},
		function() {
			$('#logo').fadeOut(0);
			$('#link3h').fadeIn(0);
		}
	); 
	$('#link4').hover(
	
		function()  {
			$('#logo').css('background-image','url("image/logo5.png")');
			$('#logo').stop(true,true).fadeIn('slow');
			$('#link4h').fadeOut('slow');
		},
		function() {
			$('#logo').fadeOut(0);
			$('#link4h').fadeIn(0);
		}
	); 
	$('#link5').hover(
	
		function()  {
			$('#logo').css('background-image','url("image/logo6.png")');
			$('#logo').stop(true,true).fadeIn('slow');
			$('#link5h').fadeOut('slow');
		},
		function() {
			$('#logo').fadeOut(0);
			$('#link5h').fadeIn(0);
		}
	); 

$("#foo3").carouFredSel({
	auto		: true,

	visible: 1,
	pagination	: {
		container :"#foo3_pag",
		onBefore: function(oldItems, newItems) {
			//alert($(oldItems.get(0)).attr('id'));
			$('.tlo_group').css('background-image', 'url("image/tlo_dzial.png")');

			$('#'+$(oldItems.get(0)).attr('id')+"_title").fadeOut();
			$('#'+$(oldItems.get(0)).attr('id')+"_desc").fadeOut();
		},
		onAfter	: function(oldItems, newItems) {
			//alert('#'+$(newItems.get(0)).attr('id')+"title");
			$('.'+$(newItems.get(0)).attr('id')).css('background-image', 'url("image/'+$(newItems.get(0)).attr('id')+'.png")');
			$('#'+$(newItems.get(0)).attr('id')+"_title").fadeIn();
			$('#'+$(newItems.get(0)).attr('id')+"_desc").fadeIn();
		}
	},
	
	auto	: {

		pauseOnHover: true,
		onBefore: function(oldItems, newItems) {
			//alert($(oldItems.get(0)).attr('id'));
			$('.tlo_group').css('background-image', 'url("image/tlo_dzial.png")');
			$('#'+$(oldItems.get(0)).attr('id')+"_title").fadeOut();
			$('#'+$(oldItems.get(0)).attr('id')+"_desc").fadeOut();
		},
		onAfter	: function(oldItems, newItems) {
			//alert('#'+$(newItems.get(0)).attr('id')+"title");
			$('.'+$(newItems.get(0)).attr('id')).css('background-image', 'url("image/'+$(newItems.get(0)).attr('id')+'.png")');
			$('#'+$(newItems.get(0)).attr('id')+"_title").fadeIn();
			$('#'+$(newItems.get(0)).attr('id')+"_desc").fadeIn();
		}
	}
});
});

