/* Code by Tobias | www.augentier.eu */


/* News Ticker */

window.setTimeout(function(){
$(".news_ticker").css("display","block");
$(".news_ticker").animate({
	top: 0
}, 1000);
},2000)


active = window.setInterval("newsticker()", 9000)
var i = 0;

function newsticker () {

if(i == 3){
i = -1;
}

$(".news_ticker a").fadeOut(1000,function(){
	$('.news_ticker').load('http://www.keydmedia.net/news/newsticker?i='+i+'',
		function(){
		$(".news_ticker a").hide().fadeIn(1000);
		}
	)
});


i++;


} /* End newsticker */



$(document).ready(function(){


$("a.back_to_top").click(function(){
    $("html, body").animate({scrollTop:0}, 500);
    return false;
});


window.setTimeout(function(){
$(".lang_info").fadeIn(1000);
$(".lang_info .close").click(function(){
	$(".lang_info").fadeOut(400);
	var a = new Date();
	a = new Date(a.getTime() +1000*60*60*24*14);
	document.cookie = 'langinfo=false; expires='+a.toGMTString()+';'; 
	return false;
})
},400)
window.setTimeout(function(){$(".lang_info").fadeOut(1000);},10000)



/* Gallery */

$(".photos .view img").hide().fadeIn();

$(".photos nav ul a").click(function (){
	$(".photos .view img").fadeOut();
})
$(".photos .prev a").click(function (){
	$(".photos .view img").fadeOut();
})
$(".photos .next a").click(function (){
	$(".photos .view img").fadeOut();
})

});

