$(document).ready(function(){
	$('#menu-page li').pngFix();
	$('li:lt(3)', '#menu-top').hover(function(){
		$('a:first', this).animate({
			opacity: 0
		  }, 70);	
		$('ul', this).fadeIn();
	});
	
	$('li:lt(3)', '#menu-top').mouseleave(function(){
		$('a:first', this).animate({
			opacity: 1
		  }, 0);	
		$('ul', this).fadeOut(50);
	});
	
	$('a', '#menu').hover(function(){
		$(this).animate({
			opacity: 0
		  }, 70);	
	});
	
	$('#pokaz-menu a').hover(function(){
		$(this).addClass('hov');
		$('#menu-page').fadeIn();
	});
	
	$('a', '#menu').mouseleave(function(){
		$(this).animate({
			opacity: 1
		  }, 0);	
	});
	
	$('#pokaz-menu a').mouseleave(function(){
		$(this).removeClass('hov');
		$('#pokaz-menu a').addClass('hov');
	});
	
	$('#menu-page').mouseleave(function(){
		$(this).fadeOut();
		$('#pokaz-menu a').removeClass('hov');
	});
	
	$('.sidebox li:last').addClass('noBorder');
	
	$('#wiecej, #share img, #change-round li a').hover(function(){
		$(this).addClass('sfhover');						
	}, function(){
		$(this).removeClass('sfhover');		
	});
	
	$('#newsbox p').click(function(){
		var rodzic = $(this).parents('#newsbox');	
		document.location.href  = $('h2 a', rodzic).attr('href');
	});
	
	$('#newsbox p, #archive img').hover(function(){
		$(this).addClass('phover');
	}, function(){
		$(this).removeClass('phover');
	});
	
	$('a', '#gallery').hover(function(){
		$(this).addClass('sfhover');
	}, function(){
		$(this).removeClass('sfhover');
	});
	
	$('#ads img').addClass('sfhover');
	$('#ads img').hover(function(){
		$(this).removeClass('sfhover');						
	}, function(){	
		$(this).addClass('sfhover');
	});
	
	$('span:eq(0)', '#table li').addClass('t0');
	$('span:eq(1)', '#table li').addClass('t1');
	$('span:eq(2)', '#table li').addClass('t2');
	$('span:eq(3)', '#table li').addClass('t3');
	
});
