// JavaScript Document
//łśćłżź

/* =============================== headline_rotate [START] ========================== */

$JQ(document).ready(function(){
	setInterval(headline_move,70);
});

function headline_move(){
	try{
		var Height = $JQ("div.headline").height();
		var ActualTop=$JQ("div.headline").css("top");
		ActualTop = parseInt(ActualTop.replace('px',''));
		//ActualTop = parseInt(ActualTop.replace('-',''));
			
		if(ActualTop <= (-1)*Height){
				$JQ("div.headline").css('top',180);
		}else{
			ActualTop-=1;
			$JQ("div.headline").css('top',ActualTop);
		}
	}catch(err){ }
}

$JQ(document).ready(function(){
	setInterval(headline_move2,70);
});

function headline_move2(){
	try{
		var Height = $JQ("div.headline2").height();
		var ActualTop=$JQ("div.headline2").css("top");
		ActualTop = parseInt(ActualTop.replace('px',''));
		//ActualTop = parseInt(ActualTop.replace('-',''));
			
		if(ActualTop <= (-1)*Height){
				$JQ("div.headline2").css('top',180);
		}else{
			ActualTop-=1;
			$JQ("div.headline2").css('top',ActualTop);
		}
	}catch(err){ }
}

/*
$JQ(document).ready(function(){
	var HeightA2=$JQ("div.headline2").height() + 180;						 
	$JQ("div.headline2").animate({"top": "-=" + HeightA2 + "px"}, 75000);
	setInterval(headline_move2,1000);
});

function headline_move2(){
	var Position2 = "-" + $JQ("div.headline2").height() + 'px';
	if($JQ("div.headline2").css("top") == Position2){
		var HeightParent2=$JQ("#info_referencje").height();
		
		$JQ("div.headline2").css("top",HeightParent2+"px");
		var HeightA2=$JQ("div.headline2").height() + 180;		
		$JQ("div.headline2").animate({"top": "-=" + HeightA2 + "px"}, 75000);
	}
}
*/

/* =============================== headline_rotate [END] ============================ */
