// Function Clock
function myclock(){
	var today = new Date();
	var hh = ((today.getHours() > 9)?today.getHours():"0"+today.getHours());
	var mm = ((today.getMinutes() > 9)?today.getMinutes():"0"+today.getMinutes());
	var ss = ((today.getSeconds() > 9)?today.getSeconds():"0"+today.getSeconds());
	
	
	document.getElementById("clock-view").innerHTML = hh + ":" + mm + ":" + ss;
	setTimeout(myclock);
}

function flying_text(){
	$('#block-fly-text .flying-text').css({opacity:0});
	$('#block-fly-text .active-text').animate({opacity:1, marginLeft: "100px"}, 4000);

	var int = setInterval(changeText, 5000);
}
function changeText(){
	
	var $activeText = $("#block-fly-text .active-text");	
	
	var $nextText = $activeText.next(); 
	if($activeText.next().length == 0) $nextText = $('#block-fly-text .flying-text:first');
	
	$activeText.animate({opacity:0}, 1000);
	$activeText.animate({marginLeft: "-300px"});
		
	$nextText.css({opacity: 0}).addClass('active-text').animate({opacity:1, marginLeft: "150px"}, 4000, function(){
		
		$activeText.removeClass('active-text');											  
	});
} // End Function Change Text()
