/*!
 *	Betoltesek 
 *
 */

var timer;
function forgat(pos){
	$('.spinner').css({
		backgroundPosition : '0 -' + pos + 'px'
	})
	timer = setTimeout('forgat(' + (pos + 42) + ')', 80);
}

duration = 300;

$(document).ready(function(){	
	
	currYear = new Date();
	currYear = currYear.getFullYear();
	$("#evveg").html(currYear);
	
	forgat(42);
	$(".boxlogo").click(function(){
		window.location = "http://pc-box.hu";
	});
	
	$("#close").click(function(){
		window.close();
	});
	
	$.post("datab.php", function(data){
		$("#ide").append(data);
		$(".fadelos").each(function(n){
			$(this).delay(400 + (n * duration)).fadeIn(500, function(){clearTimeout(timer); $('.spinner').hide(); })
		});
		
	});
	$("#menutop").animate({"top" : 15}, 330, function(){
		$("#menutop").animate({"top" : 4}, 80, function(){
			$("#menutop").animate({"top" : 10}, 80, function(){
				
			});
		});
	});
	
	

});
