function aslogan() {

      $("#slogan div").css("left","290px");
      $("#slogan div")
	.animate( { left:"0px"}, 1000 )
	.animate( { left:"0px"}, 1000 )
        .animate( { opacity: 0 }, 200)
        .animate( { opacity: 1 }, 200)
        .animate( { opacity: 0 }, 200)
        .animate( { opacity: 1 }, 200)
        .animate( {left:"-290px"}, 1000)
	.animate({ left:"-290px"}, 1000,null,aslogan);

}
var bdel = -5000;
var fxW = 0;
var fxA = ['Up','Down','Left','Right'];
function bslogan() {

      $("#slogan").css('opacity', 0);
      $("#sloganB").css('opacity', 0);

      $("#sloganB")
	.animate( { opacity: 0 }, 1500)
	.animate( { opacity: 1 }, 1000, null, function(){  $("#slogan").css('opacity', 1); } )
	.animate( { opacity: 0 }, 1000)
	.animate( { opacity: 0 }, 4000)
	.animate( { opacity: 1 }, 1000, null, function(){  $("#slogan").css('opacity', 0); } )
	.animate( { opacity: 0 }, 1000,null,bslogan);
	

}

$(document).ready( function(){
	/*
	
	$("#introTxt div:eq(0)").show("slow", function () {
        // use callee so don't have to name the function
		$(this).hide("slow", arguments.callee);
		$(this).next().show("slow", arguments.callee);
		

     });
	 */

bslogan();
	cScrollInit();

	 $('#homeRight').cycle({ 
			fx: 'fade' 
		});

	  $('.fanim').cycle({ timeout: 5000, fx: 'fade'});
	 
	  $('.anim').each(function () {
		 $(this).cycle({delay: bdel, timeout: 10000, fx: 'fade'});
		bdel += 500;
		++fxW;

		});
	 
	  $('.anim2').each(function () {
		 $(this).cycle({delay: bdel+2500, timeout: 10000, fx: 'fade'});
		bdel += 500;
		++fxW;
		});
	
	

	
	$("#menu li.nosel a").mouseover(function(){
		$(this)
			
			.animate({ backgroundColor: "#FF810A" }, 100);
		

		
	});
	
	
	$("#menu li.nosel a").mouseout(function(){
		$(this)
			
			
			.animate({ backgroundColor: "#073B78" }, 600);

		
	});

	$("#submenu li a.l1").mouseover(function(){
		$(this)
			
			.animate({ backgroundColor: "#ffffff" }, 100);

		
	});
	
	
	$("#submenu li a.l1").mouseout(function(){
		$(this)
			
			
			.animate({ backgroundColor: "#ECEFF5" }, 600);

		
	});


});


function pobierz(nazwa) {
    if (document.cookie.length > 0) {
        startc = document.cookie.indexOf(nazwa + "=");
        if (startc != -1) {
            startc += nazwa.length + 1;
            endc = document.cookie.indexOf(";", startc);
            if (endc == -1) {
                endc = document.cookie.length;
            }
            return unescape(document.cookie.substring(startc,endc));
        }
	return false;
    }
    return false;
}

function rejestruj(nazwa, wartosc,dni) {
    var dzisiaj=new Date();
    var wygasnie=new Date();
    !dni ?dni=7 :"";
    wygasnie.setTime(dzisiaj.getTime()+1000*60*60*24*dni);
	document.cookie=nazwa+"="+escape(wartosc)+";expires="+wygasnie.toGMTString();
}

