﻿jQuery(function(){
	jQuery('ul.sf-menu').superfish({
		animation: {opacity:'show',height:'show'},
		speed: 200,
		autoArrows:    true
	});
});

$(document).ready(function () {

	$('#naglowek').fadeIn(1000);
	$('#tytul').fadeIn(2000);
	$('.menu').fadeIn(3000);
	$('#lewy').fadeIn(2000);
	$('#srodek').fadeIn(1000);
	$('#prawy').fadeIn(500);
	$('#motto').fadeIn(3000);
	$('#laduje').remove();
	$('#stopka').html("<span style='color:white;'>Wszelkie prawa zastrzeżone, kontakt: <a href='mailto:kontakt@mojebezrobocie.pl'>kontakt@mojebezrobocie.pl</a>, Webmaster <a style='color:white;' href='http://www.pklopotowski.pl' target='_blank'>www.pklopotowski.pl</a></span>").fadeIn(1000);
	$('#link').html("<hr /><p><small>&copy; <a href='http://www.mojebezrobocie.pl'>www.mojebezrobocie.pl</a></small></p><br>").fadeIn(1000);
	
	if($('#srodek').height()>1400){
		$('#lewy').height($('#srodek').height() + 100);
	}

	$('div#naglowek a')
	.hover(function() {
		$(this).stop().animate({"color" : "red"}, 150);
	}, function() {
		$(this).stop().animate({"color" : "#006600"}, 1000);
	});	
	
	$('div#lewy a')
	.hover(function() {
		$(this).stop().animate({"fontSize" : "13px"}, 50);
	}, function() {
		$(this).stop().animate({"fontSize" : "11px"}, 100);
	});
	
	$('#srodek a:not(div#b ul li a), #prawy a')
	.hover(function() {
		$(this).stop().animate({"color" : "red"}, 150);
	}, function() {
		$(this).stop().animate({"color" : "#15456C"}, 1000);
	});
	
	$('.menu a')
	.hover(function() {
		$(this).stop().animate({"color" : "#003300"}, 150);
	}, function() {
		$(this).stop().animate({"color" : "white"}, 1000);
	});	
	
	// google analytics counters loader
		$.ajax({
			url:"php/example.counters.php",
			success: function(x){
				$('#licznik-loader').fadeOut(500, function(){
					$('#licznik-pokaz').html(x).fadeIn(200);
				});
			}
		});
	
	
/*
	$(".link").live('click',function(){
	var strona = $(this).attr("name")+'.php';
		$('#srodek').fadeOut("fast", function(){
			$.get(strona, function(dane){
				$('#srodek').html(dane);
				$('#srodek').fadeIn("fast");
				
				});
		});
	});
*/
	
});




	function pokaz(j) {
	$('#motto p:visible').fadeOut(200,function() {
		$('#motto p').eq(j).fadeIn(200);
	});
	if (++j >= $('#motto p').length){j=0};
	setTimeout('pokaz(' + j + ')',8000);	
}

$(function() { $('#motto p:first').show(); setTimeout('pokaz(0)',1000); });



